OFFSET
1,1
COMMENTS
The corresponding indices k are in A196815.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(3) = 43 is the smallest initial prime of a subset of 4 consecutive primes {43, 47, 53, 59} such that 59 - 43 = 16 = 4^2.
MAPLE
A196874:= proc(n)
for k from 1 do
if issqr(ithprime(k+n)-ithprime(k)) then
return ithprime(k);
end if;
end do:
end proc:
MATHEMATICA
spk[n_]:=Module[{k=1}, While[!IntegerQ[Sqrt[Prime[n+k]-Prime[k]]], k++]; Prime[k]]; Array[spk, 70] (* Harvey P. Dale, Jul 23 2012 *)
PROG
(PARI) a(n) = {my(k=1); while (! issquare(prime(k+n)- prime(k)), k++); prime(k); } \\ Michel Marcus, Dec 28 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Oct 07 2011
STATUS
approved