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.

A050605 Column/row 2 of A050602: a(n) = add3c(n,2).

Original entry on oeis.org

0, 0, 1, 1, 0, 0, 2, 2, 0, 0, 1, 1, 0, 0, 3, 3, 0, 0, 1, 1, 0, 0, 2, 2, 0, 0, 1, 1, 0, 0, 4, 4, 0, 0, 1, 1, 0, 0, 2, 2, 0, 0, 1, 1, 0, 0, 3, 3, 0, 0, 1, 1, 0, 0, 2, 2, 0, 0, 1, 1, 0, 0, 5, 5, 0, 0, 1, 1, 0, 0, 2, 2, 0, 0, 1, 1, 0, 0, 3, 3, 0, 0, 1, 1, 0, 0, 2, 2
Offset: 0

Views

Author

Antti Karttunen, Jun 22 1999

Keywords

Comments

It seems that (n - Sum_{k=1..n} a(k) )/log(n) is bounded. - Benoit Cloitre, Oct 03 2002
2^a(n-1) is the highest power of 2 dividing the triangular number A000217(n) = n*(n+1)/2, for n >= 1. - Benoit Cloitre, Oct 03 2002 [corrected and rewritten by Wolfdieter Lang, Nov 21 2019]
a(n) is the number of trailing 0's in the binary reflected Gray code of n+1 (A014550). - Amiram Eldar, May 15 2021

Crossrefs

Bisection gives column/row 1 of A050602: A007814.

Programs

  • Magma
    [Valuation(n*(n+1)/2, 2): n in [1..120]]; // Vincenzo Librandi, Aug 11 2017
  • Maple
    with(Bits): add3c := proc(a, b) option remember; `if`(0 = And(a, b), 0, 1 + add3c(Xor(a, b), 2*And(a, b))) end: A050605 := n -> add3c(n, 2):
    seq(A050605(n), n=0..80); # Johannes W. Meijer, Jun 18 2009; updated by Peter Luschny, Jul 12 2019
  • Mathematica
    Table[IntegerExponent[(n + 1)(n + 2)/2, 2], {n, 0, 100}] (* Jean-François Alcover, Mar 04 2016 *)
  • PARI
    a(n)=valuation(n*(n+1)/2,2)
    

Formula

a(4*n+2) = A001511(n). - Johannes W. Meijer, Jun 18 2009
a(n) = A007814(n+1) + A007814(n+2) - 1. - Ridouane Oudra, Oct 08 2019