OFFSET
1,2
COMMENTS
Conjecture: a(n) exists for all n.
The corresponding squares are 1, 4, 36, 1600, 5184, 324, 1764, 1024, 2304, 12996, 81796, 853776, 76176, 481636, 15876, 438244, 386884, 304704, 7518564, 3732624, 992016, 614656, 389376, ...
LINKS
Michel Lagneau, Table of n, a(n) for n = 1..500
EXAMPLE
a(3)=5 because prime(3)*prime(5) - prime(3+5) = 5*11 - 19 = 6^2.
a(4)=57 because prime(4)*prime(57) - prime(4+57) = 7*269 - 283 = 40^2.
MAPLE
with(numtheory):nn:=70:
for n from 1 to nn do:
pn:=ithprime(n):ii:=0:
for k from n to 10^9 while(ii=0)do:
pk:=ithprime(k):pnk:=ithprime(n+k):c:=pn*pk-pnk:c2:=sqrt(c):
if c2=floor(c2)
then
printf(`%d, `, k):
ii:=1:
else
fi:
od:
od:
MATHEMATICA
Do[k=n; While[!IntegerQ[Sqrt[Prime[k]*Prime[n]-Prime[n+k]]], k++]; Print [n, " ", k], {n, 1, 60}]
PROG
(PARI) a(n) = {k = n; while(! issquare(prime(n)*prime(k) - prime(n+k)), k++); k; } \\ Michel Marcus, Nov 13 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Oct 16 2014
STATUS
approved