[go: up one dir, main page]

login
A356060
a(n) is the least prime p such that 2*prime(n)^2 + p is the square of a prime.
2
17, 7, 71, 23, 47, 23, 263, 239, 311, 167, 887, 71, 359, 23, 71, 4583, 2447, 479, 431, 1367, 1223, 4679, 2351, 1319, 503, 2399, 983, 3671, 887, 1031, 503, 2927, 2063, 167, 7127, 4127, 431, 1151, 10271, 9311, 5087, 7919, 479, 4463, 8231, 887, 11447, 1031, 17351, 4679, 983, 7559, 5639, 2879, 2591
OFFSET
1,1
LINKS
FORMULA
2*A001248(n) + a(n) = A356048(n)^2.
EXAMPLE
a(3) = 71 because the third prime is 5, 2*5^2 + 71 = 121 = 11^2 where 11 is prime, and 71 is the least prime that works.
MAPLE
f:= proc(n) local q;
q:= floor(sqrt(2)*n);
do
q:= nextprime(q);
if isprime(q^2-2*n^2) then return q^2-2*n^2 fi;
od
end proc:
map(f, [seq(ithprime(i), i=1..100)]);
PROG
(PARI) a(n) = my(p=2, q=prime(n), s); while (! (issquare(s=2*q^2+p) && isprime(sqrtint(s))), p = nextprime(p+1)); p; \\ Michel Marcus, Aug 04 2022
CROSSREFS
Sequence in context: A114032 A107807 A075710 * A048368 A040275 A355237
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Jul 24 2022
STATUS
approved