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!)
A357373 a(n) is the first prime p such that (p+q)/(2*n) is the square of a prime, where q is the next prime after p. 2
3, 17, 11, 47521, 43, 149, 26041, 71, 79, 3607, 97, 107, 6871, 53, 59, 61, 31397, 71, 73, 179, 2539, 197, 2777, 599, 223, 647, 107, 61843, 1520777, 113, 277, 283, 823, 5743, 313, 139, 254887, 337, 349, 157, 75797, 1049, 5197, 173, 179, 409, 2297, 191, 439, 6047, 457, 892357, 8951, 242399, 491 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(3) = 11 because (11+13)/(2*3) = 4 = 2^2 where 2 is prime, and 11 is the first prime that works.
MAPLE
f:= proc(n) local r, v, p, q;
r:= 1:
do
r:= nextprime(r);
v:= n*r^2;
p:= prevprime(v);
if 2*v-p = nextprime(v) then return p fi
od
end proc:
map(f, [$1..100]);
MATHEMATICA
f[n_] := Module[{r, v, p, q}, r = 1; While[True, r = NextPrime[r]; v = n*r^2; p = NextPrime[v, -1]; If[2*v - p == NextPrime[v], Return[p]]]];
Table[f[n], {n, 1, 100}] (* Jean-François Alcover, Oct 16 2022, after Robert Israel *)
CROSSREFS
Sequence in context: A033467 A096475 A088122 * A273702 A273710 A087964
KEYWORD
nonn
AUTHOR
Robert Israel, Sep 25 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 July 19 11:36 EDT 2024. Contains 374394 sequences. (Running on oeis4.)