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

This page as a plain text file.
%I A364881 #50 Aug 24 2023 10:14:30
%S A364881 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,
%T A364881 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,
%U A364881 1,5,3,1,7,3,1,1,5,2,1,6,3,1,8,4,2,1,5
%N A364881 First significant digit of the decimal expansion of n/(2^n).
%C A364881 a(n) is also the first digit of n*5^n = A036291(n).
%F A364881 a(n) = floor(n/(2^n)/10^floor(log_10(n/(2^n)))), for n > 0.
%F A364881 a(n) = floor(n/A000079(n)/10^floor(log_10(n/A000079(n)))).
%F A364881 a(n) = floor(A036291(n)/10^floor(log_10(A036291(n)))).
%F A364881 a(n) = A000030(A036291(n)).
%e A364881 n     n/(2^n)
%e A364881 1     0.5                            a(1) = 5
%e A364881 2     0.5                            a(2) = 5
%e A364881 3     0.375                          a(3) = 3
%e A364881 4     0.25                           a(4) = 2
%e A364881 5     0.15625                        a(5) = 1
%e A364881 6     0.9375                         a(6) = 9
%e A364881 7     0.0546875                      a(7) = 5
%e A364881 8     0.03125                        a(8) = 3
%e A364881 9     0.017578125                    a(9) = 1
%e A364881 10    0.009765625                    a(10) = 9
%e A364881 ...
%p A364881 a:= n-> parse((""||(n*5^n))[1]):
%p A364881 seq(a(n), n=1..100);  # _Alois P. Heinz_, Aug 18 2023
%t A364881 Table[Floor[n/(2^n)/10^Floor[Log10[n/(2^n)]]], {n, 100000}]
%o A364881 (Python)
%o A364881 def A364881(n): return (n*5**(m:=len(str((1<<n)//n)))>>n-m) % 10 # _Chai Wah Wu_, Aug 24 2023
%Y A364881 Cf. A000030, A000079, A000799, A036291, A111395.
%K A364881 easy,nonn,base
%O A364881 1,1
%A A364881 _Ejder Aysun_, Aug 10 2023