login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A220779 Exponent of highest power of 2 dividing the sum 1^n + 2^n + ... + n^n. 2
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 (list; graph; refs; listen; history; text; internal format)
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. 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
a(n) = d - 1 or 2*(d - 1), according as n or n+1 = 2^d * odd, with d > 0.
a(n) = A007814(A031971(n)).
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
Sequence in context: A319574 A204040 A325773 * A347928 A317554 A089975
KEYWORD
nonn,easy
AUTHOR
Jonathan Sondow, Dec 20 2012
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 15:34 EDT 2024. Contains 371794 sequences. (Running on oeis4.)