OFFSET
1,3
COMMENTS
2-adic valuation of Sum_{k = 1..n} k^n.
Omitting the zero terms (for n == 1 or 2 mod 4) gives A220780.
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.
FORMULA
EXAMPLE
1^3 + 2^3 + 3^3 = 1 + 8 + 27 = 36 = 2^2 * 9, so a(3) = 2.
MATHEMATICA
Table[ IntegerExponent[ Sum[ k^n, {k, 1, n}], 2], {n, 150}]
PROG
(Python)
from sympy import harmonic
def A220779(n): return (~(m:=int(harmonic(n, -n)))&m-1).bit_length() # Chai Wah Wu, Jul 08 2022
(PARI) a(n) = valuation(sum(k=1, n, k^n), 2); \\ Michel Marcus, Jul 09 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jonathan Sondow, Dec 20 2012
STATUS
approved