|
|
|
|
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
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|