OFFSET
1,2
COMMENTS
From Robert Israel, Feb 13 2019: (Start)
a(n)+n-1 is the least divisor of (n-1)^4 + n^4 that is not less than n.
In particular, a(n) = (n-1)^4 + n^4 - n + 1 if (n-1)^4 + n^4 is prime, i.e. if n-1 is in A155211; otherwise a(n) <= ((n-1)^4 + n^4)/17 - n + 1 (because the least prime that can divide (n-1)^4 + n^4 is 17). (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
MAPLE
f:= proc(n) min(select(`>=`, numtheory:-divisors((n-1)^4+n^4), n))-n+1 end proc:
map(f, [$1..100]); # Robert Israel, Feb 13 2019
MATHEMATICA
a[n_] := For[x = 1, True, x++, If[Mod[x^4 + n^4, x + n - 1] == 0, Return[x]]]; Array[a, 30] (* Jean-François Alcover, Feb 17 2018 *)
PROG
(PARI) a(n) = {my(k=1); while((k^4+n^4)%(k+n-1) != 0, k++); k; } \\ Altug Alkan, Feb 17 2018
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Benoit Cloitre, Jan 02 2002
EXTENSIONS
More terms from Jean-François Alcover, Feb 17 2018
STATUS
approved