OFFSET
1,1
EXAMPLE
a(1) = 411 because 411^2+1 = 2 * 13 * 73 * 89 and 89 - (2 + 13 + 73) = 89 - 88 = 1.
MAPLE
A212710:= proc(n)
local fs, gpf, opf, k;
for k from 1 do
fs:= numtheory[factorset](k^2+1);
gpf:= max(op(fs));
opf:= add( f, f=fs)-gpf;
if gpf-opf = n then
return k;
end if;
end do:
end proc:
seq(A212710(n), n=1..50); #R. J. Mathar,Nov 14 2014
MATHEMATICA
lst={}; Do[k=1; [While[!2*FactorInteger[k^2+1][[-1, 1]]-Total[Transpose[FactorInteger[k^2+1]][[1]]]==n, k++]]; AppendTo[lst, k], {n, 0, 60}]; lst (*Michel Lagneau,Oct 28 2014 *)
PROG
(PARI) a(n) = {k = 1; ok = 0; while (!ok, f = factor(k^2+1); nbp = #f~; ok = (f[nbp, 1] - sum(i=1, nbp-1, f[i, 1]) == n); if (!ok, k++); ); k; } \\Michel Marcus,Nov 09 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau,May 24 2012
STATUS
approved