A220779 Exponent of highest power of 2 dividing the sum 1^n + 2^n + ... + n^n.
0, 0, 2, 1, 0, 0, 4, 2, 0, 0, 2, 1, 0, 0, 6, 3, 0, 0, 2, 1, 0, 0, 4, 2, 0, 0, 2, 1, 0, 0, 8, 4, 0, 0, 2, 1, 0, 0, 4, 2, 0, 0, 2, 1, 0, 0, 6, 3, 0, 0, 2, 1, 0, 0, 4, 2, 0, 0, 2, 1, 0, 0, 10, 5, 0, 0, 2, 1, 0, 0, 4, 2, 0, 0, 2, 1, 0, 0, 6, 3, 0, 0, 2, 1, 0, 0, 4
Offset: 1
Examples
1^3 + 2^3 + 3^3 = 1 + 8 + 27 = 36 = 2^2 * 9, so a(3) = 2.
Links
- T. D. Noe, Table of n, a(n) for n = 1..1024
- T. Lengyel, On divisibility of some power sums, INTEGERS, 7(2007), A41, 1-6.
- K. MacMillan and J. Sondow, Problem 11546: 2-adic Valuation of Bernoulli-style Sums, Amer. Math. Monthly, 118 (2011), 84 (proposal); 119 (2012), 886-887 (solution).
- K. MacMillan and J. Sondow, Divisibility of power sums and the generalized Erdos-Moser equation, arXiv:1010.2275 [math.NT], 2010-2011; Elemente der Mathematik, 67 (2012), 182-186.
Programs
-
Mathematica
Table[ IntegerExponent[ Sum[ k^n, {k, 1, n}], 2], {n, 150}]
-
PARI
a(n) = valuation(sum(k=1, n, k^n), 2); \\ Michel Marcus, Jul 09 2022
-
Python
from sympy import harmonic def A220779(n): return (~(m:=int(harmonic(n,-n)))&m-1).bit_length() # Chai Wah Wu, Jul 08 2022
Comments