login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A075577 k^2 is a term if k^2 + (k-1)^2 and k^2 + (k+1)^2 are primes. 3

%I #20 Apr 26 2021 01:48:18

%S 4,25,625,900,1225,4900,7225,10000,12100,50625,52900,67600,81225,

%T 84100,102400,152100,168100,225625,240100,245025,265225,348100,462400,

%U 483025,504100,562500,577600,714025,902500,1166400,1210000,1288225,1380625,1416100,1428025

%N k^2 is a term if k^2 + (k-1)^2 and k^2 + (k+1)^2 are primes.

%C For a(2) onwards, a(n) == 0 (mod 25).

%H Michael S. Branicky, <a href="/A075577/b075577.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A109306(n)^2. - _David A. Corneth_, Apr 25 2021

%e 900 = 30^2 is a term because 30^2 + 29^2 = 1741 is prime and 30^2 + 31^2 = 1861 is prime.

%t Do[s=n^2+(n-1)^2; s1=n^2+(n+1)^2; If[PrimeQ[s]&&PrimeQ[s1], Print[n^2]], {n, 1, 5000}]

%o (Python)

%o from sympy import isprime

%o def aupto(limit):

%o alst, is2 = [], False

%o for k in range(1, int(limit**.5) + 2):

%o is1, is2 = is2, isprime(k**2 + (k+1)**2)

%o if is1 and is2: alst.append(k**2)

%o return alst

%o print(aupto(1500000)) # _Michael S. Branicky_, Apr 25 2021

%Y Cf. A109306.

%K nonn

%O 1,1

%A _Amarnath Murthy_, Sep 25 2002

%E More terms from _Labos Elemer_, Sep 27 2002

%E a(34) and beyond from _Michael S. Branicky_, Apr 25 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 3 15:31 EDT 2024. Contains 373982 sequences. (Running on oeis4.)