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.

A324468 a(n) = r(n) + r(n+1) + r(n+2), where r(n) is the ruler sequence A007814.

Original entry on oeis.org

1, 3, 2, 3, 1, 4, 3, 4, 1, 3, 2, 3, 1, 5, 4, 5, 1, 3, 2, 3, 1, 4, 3, 4, 1, 3, 2, 3, 1, 6, 5, 6, 1, 3, 2, 3, 1, 4, 3, 4, 1, 3, 2, 3, 1, 5, 4, 5, 1, 3, 2, 3, 1, 4, 3, 4, 1, 3, 2, 3, 1, 7, 6, 7, 1, 3, 2, 3, 1, 4, 3, 4, 1, 3, 2, 3, 1, 5, 4, 5, 1, 3, 2, 3, 1
Offset: 1

Views

Author

N. J. A. Sloane, Mar 03 2019

Keywords

Crossrefs

Cf. A001511, A007814, A050603 (r(n)+r(n+1)), A324465.

Programs

  • Magma
    [&+[Valuation(n+k, 2): k in [0..2]]: n in [1..70]]; // Vincenzo Librandi, Mar 10 2019
    
  • Mathematica
    Table[Sum[IntegerExponent[n + k, 2], {k, 0, 2}], {n, 100}] (* Vincenzo Librandi, Mar 10 2019 *)
  • PARI
    a(n) = sum(k=0, 2, valuation(n+k, 2)); \\ Michel Marcus, Mar 10 2019
    
  • Python
    def A324468(n): return (~n & n-1).bit_length()+(~(n+1) & n).bit_length()+(~(n+2) & n+1).bit_length() # Chai Wah Wu, Jul 01 2022

Formula

1 <= a(n) <= 1 + log_2(n+2). - Charles R Greathouse IV, Jul 01 2022
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 3. - Amiram Eldar, Sep 10 2024