OFFSET
1,1
COMMENTS
All terms, except for the first one, are multiples of 5. All corresponding primes, except the first, end in 1. Cf. A027861, where in pairs of successive numbers the larger one is a multiple of 5 and is a term in this sequence.
LINKS
Daniel Starodubtsev, Table of n, a(n) for n = 1..10000
FORMULA
a(n)^2 = A075577(n). - David A. Corneth, Apr 25 2021
EXAMPLE
25 is a term because 25^2 + 24^2 = 1201 and 25^2 + 26^2 = 1301 are both primes.
MATHEMATICA
Select[Range[2, 10000], PrimeQ[ #^2+(#+1)^2]&&PrimeQ[ #^2+(#-1)^2]&]
PROG
(PARI) for(k=1, 2060, my(j=2*k^2+1); if(isprime(j-2*k)&&isprime(j+2*k), print1(k, ", "))) \\ Hugo Pfoertner, Dec 07 2019
(Python)
from sympy import isprime
def aupto(limit):
alst, is2 = [], False
for k in range(1, limit+1):
is1, is2 = is2, isprime(k**2 + (k+1)**2)
if is1 and is2: alst.append(k)
return alst
print(aupto(2060)) # Michael S. Branicky, Apr 25 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Jun 25 2005
EXTENSIONS
Definition corrected by Walter Kehowski, Jul 04 2005
STATUS
approved