We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
1000 queries of nth value in the known integer sequence : https://oeis.org/A147811
Sample intput/output : https://oeis.org/A147811/b147811.txt The numbers are of the form p(p+d)(p+(p^2+1)/d), where d runs over divisors of p^2+1 and p runs over all positive integers.
As the numbers are of the form p^4, int64 is not sufficient.
The real challenge seems to resides inside divisors of p^2+1.
Prime factors of p^2+1 are always 4k+1 or 2.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #221: Alexandrian Integers
You are viewing a single comment's thread. Return to all comments →
1000 queries of
n
th value in the known integer sequence : https://oeis.org/A147811Sample intput/output : https://oeis.org/A147811/b147811.txt
The numbers are of the form p(p+d)(p+(p^2+1)/d), where d runs over divisors of p^2+1 and p runs over all positive integers.
As the numbers are of the form p^4,
int64
is not sufficient.The real challenge seems to resides inside divisors of p^2+1.
Prime factors of
p^2+1
are always4k+1
or2
.