login
A182398
a(n) = (Sum_{k=1..2n} k^2n) mod 2n.
3
1, 2, 1, 4, 5, 2, 7, 8, 3, 6, 11, 4, 13, 14, 5, 16, 17, 6, 19, 12, 1, 22, 23, 8, 25, 26, 9, 28, 29, 58, 31, 32, 11, 34, 35, 12, 37, 38, 13, 24, 41, 2, 43, 44, 15, 46, 47, 16, 49, 30, 17, 52, 53, 18, 45, 56, 19, 58, 59, 116, 61, 62, 3, 64, 65, 22, 67, 68, 23
OFFSET
1,2
COMMENTS
Sum_{k=1..n} k^n (mod n) = 0 if n odd.
Properties of this sequence:
a(n) = 1 for n = 1, 3, 21, 903, ...
a(n) = n if n not divisible by 3;
a(3*n) = n except for n = 7, 10, 14, 20, 21, 26, 28, 30, 35, ...
a(21*n) = n, except for n = 10, 20, 26, 30, 40, 43, 50, 52, ...
a(903*n) = n, except for n = 10, ....
It appears that a(A007018(n)/2) = 1 and conjecturally a(m*A007018(n)/2) = m for a majority of value m.
No, a(A007018(n)/2) <> 1 for n > 4. (For example, a(A007018(5)/2) = a(1631721) = 1807.) - Jonathan Sondow, Oct 18 2013
0 < a(n) < 10 for n: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 18, 21, 24, 27, 42, 63, 84, 105, 126, 147, 168, 189, 903, 1806, 2709, 3612, 4515, 5418, 6321, 7224, 8127, .... Search limit was 25000. - Robert G. Wilson v, Jun 18 2015
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..10000 (terms 1..2499 from Michel Lagneau)
J. M. Grau, A. M. Oller-Marcen, and J. Sondow, On the congruence 1^m + 2^m + ... + m^m == n (mod m) with n|m, arXiv 1309.7941, 2013.
Mathematics Stack Exchange, 1^n + 2^n + ... + (p-1)^n mod p = ?
FORMULA
a(n) = A031971(2n) mod 2n. - Jonathan Sondow, Oct 18 2013
MAPLE
for n from 1 to 100 do: s:=sum('k^(2*n)', 'k'=1..2*n)
: x:=irem(s, 2*n): printf(`%d, `, x):od:
# second Maple program:
a:= n-> add(k&^(2*n) mod (2*n), k=1..2*n) mod (2*n):
seq(a(n), n=1..100);
MATHEMATICA
Table[Mod[Total[PowerMod[Range[2*n], 2*n, 2*n]], 2*n], {n, 100}] (* T. D. Noe, Apr 28 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Apr 27 2012
STATUS
approved