Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #12 Jun 12 2017 18:03:18
%S 0,1,4,9,3,25,0,10,23,81,39,5,8,169,83,225,24,39,143,361,17,53,7,529,
%T 263,625,19,101,363,53,12,41,43,21,543,1225,63,9,683,1521,29,269,25,
%U 61,923,127,221,365,1103,22,1199,437,175,2809,68,3025,182,557,1623,157
%N Smallest k > 0 such that 1 + n^2 and 1 + (n+k)^2 have the same largest factor, or 0 if no such k exists.
%C Numbers k such that A014442(n) = A014442(n+k), otherwise 0.
%C A014442(n) is the largest prime factor of n^2 + 1.
%C a(n) = 0 when A014442(n) is the last possible largest prime, for instance a(1) = 0, a(7) = 0 whose corresponding largest primes are respectively 2 and 5. The general case for the numbers n such that a(n) = 0 is difficult.
%e a(1) = 0 because A014442(1) = 2 is the unique largest prime of A014442(n);
%e a(2) = 1 because A014442(2) = 5 and A014442(2+1) = 5;
%e a(3) = 4 because A014442(3) = 5 and A014442(3+4) = 5;
%e a(4) = 9 because A014442(4) = 17 and A014442(4+17) = 17.
%e a(57) = 182 because A014442(57) = 13 and A014442(182+57) = 13.
%p with(numtheory):T:=array(1..300): for n from 1 to 300 do:x:=factorset(n^2+1):n1:=nops(x): T[n] := x[n1]:od:for a from 1 to 60 do:p:=T[a]:ii:=0:for b from a to 10000 do: z:=factorset(b^2+1): n2:=nops(z):if z[n2]=p and ii=0 then b0:=b:ii:=1:else if z[n2]=p and ii=1 then b1:=b:printf(`%d, `,b1-b0):ii:=2:else fi:fi:od:if ii=1 then printf(`%d, `,0):else fi:od:
%Y Cf. A014442.
%K nonn
%O 1,3
%A _Michel Lagneau_, Oct 02 2012