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!)
A357816 a(n) is the first even number k such that there are exactly n pairs (p,q) where p and q are prime, p<=q, p+q = k, and p+A001414(k) and q+A001414(k) are also prime. 1
2, 16, 60, 72, 220, 132, 374, 276, 492, 638, 636, 852, 620, 854, 996, 1056, 1026, 1212, 2070, 1530, 2610, 3976, 3844, 1488, 1572, 4812, 4770, 3942, 2484, 5028, 3234, 4668, 6036, 3276, 5172, 5532, 6756, 2730, 6084, 4230, 6390, 9132, 14134, 4620, 9674, 10692, 6600, 8910, 10836, 12204, 18852, 9660 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
LINKS
EXAMPLE
a(3) = 72 because A001414(72) = 12 and there are 3 pairs: (5,67), (11,61) and (31,41) where 5+67 = 11+61 = 31+41 = 72 and 5, 5+12 = 17, 67, 67+12 = 79, 11, 11+12 = 23, 61, 61+12 = 73, 31, 31+12 = 43, 41, and 41+12 = 53 are all prime; and this is the first even number with 3 such pairs.
MAPLE
sp:= proc(n) local t; add(t[1]*t[2], t=ifactors(n)[2]) end proc:
f:= proc(n) local s, p, q, count;
s:= sp(n);
if s::odd then return 0 fi;
p:= 2; count:= 0;
do
p:= nextprime(p);
q:= n-p;
if p > q then return count fi;
if isprime(p+s) and isprime(q) and isprime(q+s) then count:= count+1 fi;
od;
end proc:
V:= Array(0..60): count:= 0:
for n from 2 by 2 while count < 61 do
v:= f(n);
if v <= 60 and V[v] = 0 then V[v]:= n; count:= count+1; fi
od:
convert(V, list);
MATHEMATICA
a[n_] := Block[{k=2, s}, While[True, s = Plus @@ Times @@@ FactorInteger@ k; If[n == Length@ Select[ Prime@ Range@ PrimePi[k/2], And @@ PrimeQ@ {k-#, #+s, k-#+s} &], Break[]]; k += 2]; k]; a /@ Range[0, 20] (* Giovanni Resta, Oct 24 2022 *)
CROSSREFS
Sequence in context: A123791 A293620 A206980 * A170991 A209219 A207688
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Oct 13 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 September 2 22:15 EDT 2024. Contains 375617 sequences. (Running on oeis4.)