OFFSET
1,1
COMMENTS
a(n) is also the first digit of n*5^n = A036291(n).
FORMULA
EXAMPLE
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
...
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}]
PROG
(Python)
def A364881(n): return (n*5**(m:=len(str((1<<n)//n)))>>n-m) % 10 # Chai Wah Wu, Aug 24 2023
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Ejder Aysun, Aug 10 2023
STATUS
approved