OFFSET
1,2
LINKS
Gheorghe Coserea, Table of n, a(n) for n = 1..65536
Peter J. Grabner, A note on the parity of the sum-of-digits function, Séminaire Lotharingien de Combinatoire, B30e (1993), 8 pp.
FORMULA
a(n) is of order n^(log(5)/log(16)).
a(2*16^n) = 2*5^n, a(4*16^n) = a(8*16^n) = 4*5^n, a(16^(n+1)) = 6*5^n. - Gheorghe Coserea, Dec 03 2016
MATHEMATICA
Accumulate[(-1)^Array[DigitCount[5*#, 2, 1] &, 100]] (* Amiram Eldar, Jul 18 2023 *)
PROG
(PARI) a(n) = sum(k=1, n, (-1)^hammingweight(5*k));
(PARI)
seq(N) = {
my(v = vector(N), w=0); v[1] = 1;
for (k = 2, N, w = hammingweight(5*k)%2; v[k] = v[k-1] + 1-2*w);
v;
};
seq(75) \\ Gheorghe Coserea, Dec 03 2016
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ralf Stephan, Sep 27 2004
EXTENSIONS
Name corrected by Michel Marcus, Dec 03 2016
STATUS
approved