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.

A339256 Leading digit of n in base 6.

Original entry on oeis.org

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

Views

Author

Kevin Ryde, Nov 28 2020

Keywords

Crossrefs

Cf. A007092 (base 6), A109804 (partial sums).

Programs

  • Mathematica
    Table[IntegerDigits[n,6][[1]],{n,90}] (* Harvey P. Dale, Jul 19 2023 *)
  • PARI
    a(n) = n\6^logint(n,6);

Formula

a(n) = floor(n / 6^floor(log_6(n))).
G.f.: (x + Sum_{k>=0} Sum_{d=2..5} (x^(d*6^k)-x^(6^(k+1))) )/(1-x).