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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A353072 Numbers k such that nextprime(k)-k is a positive square. 3
 1, 2, 4, 6, 7, 10, 12, 13, 16, 18, 19, 22, 25, 28, 30, 33, 36, 37, 40, 42, 43, 46, 49, 52, 55, 58, 60, 63, 66, 67, 70, 72, 75, 78, 79, 82, 85, 88, 93, 96, 97, 100, 102, 103, 106, 108, 109, 112, 118, 123, 126, 127, 130, 133, 136, 138, 140, 145, 148, 150, 153 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Numbers p-1, where p is prime is a subsequence (see A006093). LINKS David A. Corneth, Table of n, a(n) for n = 1..10000 EXAMPLE The next prime after 7 is 11, and 11-7 = 4 a square, so 7 is in this sequence. The next prime after 118 is 127, 127-118 = 9 is a square, so 118 is a term. MATHEMATICA Select[Range[2000], NextPrime[#] - # > 0 && IntegerQ[Sqrt[NextPrime[#] - #]] &] npsQ[n_]:=With[{c=NextPrime[n]-n}, c>0&&IntegerQ[Sqrt[c]]]; Select[Range[200], npsQ] (* Harvey P. Dale, May 05 2023 *) PROG (PARI) upto(n) = {my(res = List(1), q = 2, u = nextprime(n + 1)); forprime(p = 3, u, forstep(i = sqrtint(p - q), 1, -1, listput(res, p-i^2) ); q = p ); res } \\ David A. Corneth, Apr 22 2022 (PARI) isok(k) = issquare(nextprime(k+1)-k); \\ Michel Marcus, Apr 22 2022 CROSSREFS Cf. A006093, A013632, A029710. Sequence in context: A026504 A026230 A026144 * A286047 A325426 A227090 Adjacent sequences: A353069 A353070 A353071 * A353073 A353074 A353075 KEYWORD nonn AUTHOR Tanya Khovanova, Apr 21 2022 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.

Last modified September 14 21:48 EDT 2024. Contains 375929 sequences. (Running on oeis4.)