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!)
A129314 Records in A127356. 2
1, 2, 6, 12, 24, 30, 42, 54, 60, 66, 90, 132, 138, 210, 270, 300, 318, 342, 390, 420, 450, 624, 690, 696, 750, 798, 924, 930, 1170, 1224, 1326, 1362, 1428, 1434, 1500 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
EXAMPLE
As can be gathered from A127356, the first six records are A127356(1) = 1, A127356(2) = 2, A127356(3) = 6, A127356(10) = 12, A127356(13) = 24, A127356(77) = 30. Hence a(1) to a(6) are 1, 2, 6, 12, 24, 30.
MATHEMATICA
sk[n_]:=Module[{k=2}, While[!PrimeQ[n+k^2], k=k+2]; k]; DeleteDuplicates[ Join[ {1}, Table[sk[n], {n, Prime[Range[2, 1000000]]}]], GreaterEqual] (* The program generates the first 22 terms of the sequence. *) (* Harvey P. Dale, Nov 07 2022 *)
PROG
(Python)
from itertools import count, islice
from sympy import isprime, nextprime, prime
def agen():
pn = 2; record = 1; yield record
for n in count(2):
k, pn = 2, nextprime(pn)
while not isprime(pn + k*k): k += 2
if k > record: record = k; yield record
print(list(islice(agen(), 20))) # Michael S. Branicky, Nov 11 2022
CROSSREFS
Cf. A127356, A129315 (where records occur).
Sequence in context: A307740 A244043 A058868 * A137895 A194096 A099993
KEYWORD
nonn,more
AUTHOR
Klaus Brockhaus, Apr 09 2007
EXTENSIONS
a(27)-a(33) from Donovan Johnson, Dec 09 2008
a(34)-a(35) from Michael S. Branicky, Nov 11 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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 16:40 EDT 2024. Contains 371916 sequences. (Running on oeis4.)