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!)
A178825 a(1) = 1, a(n+1) = least prime p > a(n) such that a(n) + p is a square. 2
1, 3, 13, 23, 41, 59, 137, 263, 313, 587, 709, 2207, 2417, 2767, 4289, 4547, 5857, 8543, 9413, 9631, 18593, 20611, 45953, 50147, 52253, 55331, 58913, 62191, 67409, 69491, 82609, 98867, 100049, 102451, 157649, 171827, 173917, 215459, 220141 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(1) = 1, a(n+1) = MIN{p in A000040 >= a(n) such that a(n) + p is in A000290}.
EXAMPLE
a(1) = 1 by definition.
a(2) = 3 as 3 is prime and 1 + 3 = 4 = 2^2.
a(3) = 13 as 13 is prime and 3 + 13 = 16 = 4^2.
a(4) = 23 as 23 is prime and 13 + 23 = 36 = 6^2.
MATHEMATICA
lps[n_]:=Module[{p=NextPrime[n]}, While[!IntegerQ[Sqrt[n+p]], p= NextPrime[ p]]; p]; NestList[lps, 1, 40] (* Harvey P. Dale, Sep 07 2020 *)
PROG
(PARI) {print1(1, ", "); p=1; a=1; for(i=1, 10^4, p=nextprime(p+1); if(issquare(a+p), print1(p, ", "); a=p))}
CROSSREFS
Cf. A000040, A000290, A083016 Rearrangement of primes such that the sum of two consecutive terms is a square.
Cf. A062064 (case a(1)=2). - Zak Seidov, Oct 11 2014
Sequence in context: A367296 A018709 A121756 * A147473 A030431 A090146
KEYWORD
nonn,easy
AUTHOR
Jonathan Vos Post, Dec 27 2010
STATUS
approved

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 April 20 00:26 EDT 2024. Contains 371798 sequences. (Running on oeis4.)