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.

Showing 1-2 of 2 results.

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).

A073851 Cumulative sum of initial digits of (n base 5).

Original entry on oeis.org

0, 1, 3, 6, 10, 11, 12, 13, 14, 15, 17, 19, 21, 23, 25, 28, 31, 34, 37, 40, 44, 48, 52, 56, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121
Offset: 0

Views

Author

Jonathan Vos Post, Aug 28 2005

Keywords

Examples

			    n in   init  cumulative
n  base 5   dgt     sum
-  ------  ----  ----------
0     0      0       0
1     1      1       1
2     2      2       3
3     3      3       6
4     4      4      10
5    10      1      11
		

Crossrefs

Cf. A000030, A007091, A109453, A339255 (first differences).

Programs

  • PARI
    a(n) = if (n, sum(k=1, n, digits(k, 5)[1]), 0); \\ Michel Marcus, Dec 13 2017

Formula

a(n) = Sum_{i=0..n} A000030(A007091(n)).
a(n) = Sum_{i=0..n} first-digit(i base 4) where (i base 5) = A007091(i);
A007091(0)=0, A007091(i) = 10*A007091(i/5) if i == 0 (mod 5), A007091(i) = A007091(i-1) + 1 otherwise.
a(n) = Sum_{i=1..n} floor(n / 5^(floor(log_5(n)))).
a(n+1) = a(n) + first-digit-of((n+1) (base 5)).
Showing 1-2 of 2 results.