The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A299112 Record values in A243145. 1
1, 2, 6, 12, 16, 30, 42, 54, 66, 78, 105, 120, 156, 330, 525, 546, 831, 1071, 1251, 1386, 1875, 1890, 2136, 2241, 2331, 2541, 2565, 2736, 2871, 3165, 3606, 3885, 4710, 5106, 5220, 5505, 6375, 6390, 6426, 6615, 6786, 8310, 8571, 9066, 10050, 10176, 10221, 10611, 11865, 11955, 12096 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
MAPLE
f:= proc(n) local k;
for k from (n mod 2)+1 by 2 do
if isprime(n+k) and isprime(n+k^2) then return k fi
od
end proc:
f(1):= 1:
vmax:= 0: recvals:= NULL:
for n from 1 to 10^7 do
v:= f(n);
if v > vmax then
vmax:= v; recvals:= recvals, v;
fi
od:
recvals;
MATHEMATICA
f[n_] := Module[{k}, For[k = Mod[n, 2]+1, True, k += 2, If[PrimeQ[n + k] && PrimeQ[n + k^2], Return [k]]]]; f[1] = 1;
vmax = 0;
Reap[For[n = 1, n <= 10^6, n++, v = f[n]; If[v > vmax, vmax = v; Print["n = ", n, " v = ", v]; Sow[v]]]][[2, 1]] (* Jean-François Alcover, Oct 16 2020, after Maple *)
CROSSREFS
Sequence in context: A084790 A130237 A053457 * A154030 A055560 A237719
KEYWORD
nonn,more
AUTHOR
Robert Israel, Feb 02 2018
EXTENSIONS
a(34)-a(51) from Chai Wah Wu, Sep 10 2019
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 June 8 13:51 EDT 2024. Contains 373217 sequences. (Running on oeis4.)