login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) is the smallest k >= n such that prime(n)*prime(k) - prime(n+k) is a perfect square.
1

%I #11 Sep 13 2017 00:33:26

%S 1,3,5,57,99,10,30,17,28,91,398,2638,292,1383,69,1055,860,679,10782,

%T 5440,1630,997,640,34,186,1248,102,2039,1457,95,7621,3980,273,4005,

%U 1071,889,56,6309,4295,211,6423,1004,2689,427,542,463,2430,4815,223,277,70

%N a(n) is the smallest k >= n such that prime(n)*prime(k) - prime(n+k) is a perfect square.

%C Conjecture: a(n) exists for all n.

%C 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, ...

%H Michel Lagneau, <a href="/A248923/b248923.txt">Table of n, a(n) for n = 1..500</a>

%e a(3)=5 because prime(3)*prime(5) - prime(3+5) = 5*11 - 19 = 6^2.

%e a(4)=57 because prime(4)*prime(57) - prime(4+57) = 7*269 - 283 = 40^2.

%p with(numtheory):nn:=70:

%p for n from 1 to nn do:

%p pn:=ithprime(n):ii:=0:

%p for k from n to 10^9 while(ii=0)do:

%p pk:=ithprime(k):pnk:=ithprime(n+k):c:=pn*pk-pnk:c2:=sqrt(c):

%p if c2=floor(c2)

%p then

%p printf(`%d, `,k):

%p ii:=1:

%p else

%p fi:

%p od:

%p od:

%t Do[k=n;While[!IntegerQ[Sqrt[Prime[k]*Prime[n]-Prime[n+k]]],k++];Print [n," ",k],{n,1,60}]

%o (PARI) a(n) = {k = n; while(! issquare(prime(n)*prime(k) - prime(n+k)), k++); k;} \\ _Michel Marcus_, Nov 13 2014

%Y Cf. A000040, A000290.

%K nonn

%O 1,2

%A _Michel Lagneau_, Oct 16 2014