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!)
A354462 a(n) is the least number k such that there are exactly n pairs (p,q) of primes with p<q such that p+q = 2*k and that 2*k+p, 2*k+q, p*q-2*k and p*q+2*k are primes. 1
1, 4, 15, 315, 420, 825, 2310, 3150, 1785, 8925, 6090, 6405, 8610, 24990, 19305, 12705, 14175, 15015, 18165, 19635, 24255, 48510, 63525, 33915, 48195, 54285, 35490, 50505, 55650, 69615, 71610, 80850, 78540, 103740, 39270, 157920, 60060, 65835, 90090, 147840, 120120, 183645 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
a(n) is the least solution to A354449(k) = n.
LINKS
EXAMPLE
a(2) = 15 because for k = 15 there are two such pairs, (7,23) and (13,17): 2*15+7 = 37, 2*15+23 = 53, 7*23-2*15 = 131, 7*23+2*15 = 191, 2*15+13 = 43, 2*15+17 = 47, 13*17-2*15 = 191 and 13*17+2*15 = 251 are all prime; and 15 is the least k that works.
MAPLE
f:= proc(n) local count, p, q;
p:= 2*n-1 ; count:= 0;
do
p:= prevprime(p);
if p < n then return count fi;
q:= 2*n-p;
if isprime(q) and isprime(2*n+q) and isprime(2*n+p) and isprime(p*q-2*n) and isprime(p*q+2*n) then count:=count+1 fi;
od
end proc:
f(1):= 0: f(2):= 0:
V:= Array(0..12): count:= 0:
for n from 1 while count < 13 do
v:= f(n);
if v <= 12 and V[v] = 0 then
count:= count+1; V[v]:= n
fi
od:
convert(V, list);
MATHEMATICA
f[n_] := Sum[If[AllTrue[{k, 2*n - k, 2*n + k, 4*n - k, k*(2 n - k) - 2*n, k*(2 n - k) + 2*n}, PrimeQ], 1, 0], {k, 1, n}]; seq[len_, max_] := Module[{s = Table[0, {len}], n = 1, c = 0, i}, While[c < len && n <= max, i = f[n] + 1; If[i<= len && s[[i]] == 0, c++; s[[i]] = n]; n++]; s]; seq[13, 10^4] (* Amiram Eldar, May 31 2022 *)
PROG
(PARI) a354449(n) = my(x=2*n, i=0); forprime(q=1, x, forprime(p=1, q-1, if(p+q==x && ispseudoprime(x+p) && ispseudoprime(x+q) && ispseudoprime(p*q-x) && ispseudoprime(p*q+x), i++))); i
a(n) = for(k=1, oo, if(a354449(k)==n, return(k))) \\ Felix Fröhlich, May 31 2022
(PARI) upto(n) = {n*=2; v = vector(n\2); forprime(p = 3, n, forprime(q = 3, min(p, n-p), k2 = p+q; if(ispseudoprime(k2+p) && ispseudoprime(k2+q) && ispseudoprime(p*q-k2) && ispseudoprime(p*q+k2), v[k2\2]++ ) ) ); res = [0]; for(i = 1, #v, if(v[i]+1 > #res, res = concat(res, vector(v[i]+1-#res)) ); if(res[v[i]+1] == 0, res[v[i]+1] = i ) ); res } \\ David A. Corneth, Jun 01 2022
CROSSREFS
Sequence in context: A048731 A363351 A000881 * A109923 A006524 A299683
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, May 31 2022
EXTENSIONS
a(13)-a(32) from Amiram Eldar, May 31 2022
More terms from David A. Corneth, Jun 01 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 May 2 04:23 EDT 2024. Contains 372178 sequences. (Running on oeis4.)