login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

A220780
Nonzero terms of A220779: exponent of highest power of 2 dividing an even sum 1^n + 2^n + ... + n^n.
2
2, 1, 4, 2, 2, 1, 6, 3, 2, 1, 4, 2, 2, 1, 8, 4, 2, 1, 4, 2, 2, 1, 6, 3, 2, 1, 4, 2, 2, 1, 10, 5, 2, 1, 4, 2, 2, 1, 6, 3, 2, 1, 4, 2, 2, 1, 8, 4, 2, 1, 4, 2, 2, 1, 6, 3, 2, 1, 4, 2, 2, 1, 12, 6, 2, 1, 4, 2, 2, 1, 6, 3, 2, 1, 4, 2, 2, 1, 8, 4, 2, 1, 4, 2, 2, 1
OFFSET
1,1
COMMENTS
2-adic valuation of Sum_{k=1..n} k^n for n == 0 or 3 mod 4.
See references, links, formulas, and example in A220779.
MATHEMATICA
Table[n = 2*k + Mod[k, 2]; IntegerExponent[ Sum[a^n, {a, 1, n}], 2], {k, 150}]
PROG
(Python)
from sympy import harmonic
def A220780(n): return (~(m:=int(harmonic(k:=(n<<1)+(n&1), -k)))&m-1).bit_length() # Chai Wah Wu, Jul 11 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Jonathan Sondow, Dec 20 2012
STATUS
approved