OFFSET
1,1
COMMENTS
a(2*n-1) = 2.
a(n) = n + 1 for some prime n + 1 congruent to {2, 3} mod 4.
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..1000
EXAMPLE
a(8) = 3 because:
1^(2-1) - 8 = -7 but -7 mod 2 = 1;
1^(3-1) + 2^(3-1) - 8 = -3 and -3 mod 3 = 0;
MAPLE
P:=proc(q) local j, k, n; for n from 1 to q do for k from 2 to q do
if (add(j^(k-1), j=1..k-1)-n) mod k=0 then print(k); break; fi; od; od; end: P(10^3);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paolo P. Lava, Nov 02 2016
STATUS
approved