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.

A364881 First significant digit of the decimal expansion of n/(2^n).

Original entry on oeis.org

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

Views

Author

Ejder Aysun, Aug 10 2023

Keywords

Comments

a(n) is also the first digit of n*5^n = A036291(n).

Examples

			n     n/(2^n)
1     0.5                            a(1) = 5
2     0.5                            a(2) = 5
3     0.375                          a(3) = 3
4     0.25                           a(4) = 2
5     0.15625                        a(5) = 1
6     0.9375                         a(6) = 9
7     0.0546875                      a(7) = 5
8     0.03125                        a(8) = 3
9     0.017578125                    a(9) = 1
10    0.009765625                    a(10) = 9
...
		

Crossrefs

Programs

  • Maple
    a:= n-> parse((""||(n*5^n))[1]):
    seq(a(n), n=1..100);  # Alois P. Heinz, Aug 18 2023
  • Mathematica
    Table[Floor[n/(2^n)/10^Floor[Log10[n/(2^n)]]], {n, 100000}]
  • Python
    def A364881(n): return (n*5**(m:=len(str((1<>n-m) % 10 # Chai Wah Wu, Aug 24 2023

Formula

a(n) = floor(n/(2^n)/10^floor(log_10(n/(2^n)))), for n > 0.
a(n) = floor(n/A000079(n)/10^floor(log_10(n/A000079(n)))).
a(n) = floor(A036291(n)/10^floor(log_10(A036291(n)))).
a(n) = A000030(A036291(n)).