cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A277859 Least k > 1 such that 1^(k-1) + 2^(k-1) + 3^(k-1) + … + (k-1)^(k-1) - n == 0 (mod k).

Original entry on oeis.org

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

Views

Author

Paolo P. Lava, Nov 02 2016

Keywords

Comments

a(2*n-1) = 2.
a(n) = n + 1 for some prime n + 1 congruent to {2, 3} mod 4.

Examples

			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;
		

Crossrefs

Programs

  • 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);