|
|
A075577
|
|
k^2 is a term if k^2 + (k-1)^2 and k^2 + (k+1)^2 are primes.
|
|
3
|
|
|
4, 25, 625, 900, 1225, 4900, 7225, 10000, 12100, 50625, 52900, 67600, 81225, 84100, 102400, 152100, 168100, 225625, 240100, 245025, 265225, 348100, 462400, 483025, 504100, 562500, 577600, 714025, 902500, 1166400, 1210000, 1288225, 1380625, 1416100, 1428025
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
For a(2) onwards, a(n) == 0 (mod 25).
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
900 = 30^2 is a term because 30^2 + 29^2 = 1741 is prime and 30^2 + 31^2 = 1861 is prime.
|
|
MATHEMATICA
|
Do[s=n^2+(n-1)^2; s1=n^2+(n+1)^2; If[PrimeQ[s]&&PrimeQ[s1], Print[n^2]], {n, 1, 5000}]
|
|
PROG
|
(Python)
from sympy import isprime
def aupto(limit):
alst, is2 = [], False
for k in range(1, int(limit**.5) + 2):
is1, is2 = is2, isprime(k**2 + (k+1)**2)
if is1 and is2: alst.append(k**2)
return alst
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|