cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A099034 a(n) = Sum_{k=1..n} (-1)^A000120(5*k).

Original entry on oeis.org

1, 2, 3, 4, 3, 4, 3, 4, 5, 4, 3, 4, 5, 4, 5, 6, 7, 8, 9, 8, 9, 8, 7, 8, 9, 10, 11, 10, 9, 10, 9, 10, 11, 12, 13, 14, 13, 14, 15, 14, 13, 14, 15, 14, 15, 14, 15, 16, 17, 18, 19, 20, 19, 20, 21, 20, 19, 18, 17, 18, 19, 18, 19, 20, 21, 22, 23, 24, 23, 24, 23, 24, 25, 24, 23
Offset: 1

Views

Author

Ralf Stephan, Sep 27 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate[(-1)^Array[DigitCount[5*#, 2, 1] &, 100]] (* Amiram Eldar, Jul 18 2023 *)
  • 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

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

Extensions

Name corrected by Michel Marcus, Dec 03 2016