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.

A227833 3-adic valuation of A005130(n).

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 2, 3, 5, 5, 3, 2, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 2, 3, 5, 6, 6, 7, 8, 9, 11, 13, 15, 18, 18, 15, 13, 11, 9, 8, 7, 6, 6, 5, 3, 2, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 2, 3, 5, 5, 3, 2, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 2, 3, 5, 6, 6, 7, 8, 9, 11, 13, 15, 18, 19, 18, 18, 18, 18, 19
Offset: 0

Views

Author

N. J. A. Sloane, Aug 04 2013, based on a suggestion from Victor H. Moll

Keywords

Comments

3^a(n) is the highest power of 3 dividing A005130(n).

Crossrefs

Programs

  • Magma
    A005130:=func; [Valuation(A005130(n),3): n in [0..100]]; // Bruno Berselli, Aug 05 2013
  • Mathematica
    s[n_] := Plus @@ IntegerDigits[n, 3]; a[0] = 0; a[n_] := a[n] = a[n - 1] + (s[2*n - 2] + s[2*n - 1] - s[n - 1] - s[3*n - 2])/2; Array[a, 101, 0] (* Amiram Eldar, Feb 21 2021 *)

Formula

From Amiram Eldar, Feb 21 2021: (Start)
a(n) = A007949(A005130(n)).
a(n) = a(n-1) + (s(2*n-2) + s(2*n-1) - s(n-1) - s(3*n-2))/2, where s(n) = A053735(n). (End)