login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A277859
Least k > 1 such that 1^(k-1) + 2^(k-1) + 3^(k-1) + … + (k-1)^(k-1) - n == 0 (mod k)
1
2, 3, 2, 4, 2, 7, 2, 3, 2, 11, 2, 4, 2, 3, 2, 4, 2, 19, 2, 3, 2, 23, 2, 4, 2, 3, 2, 4, 2, 31, 2, 3, 2, 5, 2, 4, 2, 3, 2, 4, 2, 9, 2, 3, 2, 47, 2, 4, 2, 3, 2, 4, 2, 5, 2, 3, 2, 59, 2, 4, 2, 3, 2, 4, 2, 45, 2, 3, 2, 15, 2, 4, 2, 3, 2, 4, 2, 9, 2, 3, 2, 83, 2, 4, 2
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
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
Sequence in context: A365784 A235912 A339749 * A308566 A288535 A105117
KEYWORD
nonn,easy
AUTHOR
Paolo P. Lava, Nov 02 2016
STATUS
approved