A353179 a(n) is the first nonzero digit in the decimal expansion of 1/prime(n).
5, 3, 2, 1, 9, 7, 5, 5, 4, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 1
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..1000
Programs
-
Maple
a:= n-> (p-> floor(10^length(p)/p))(ithprime(n)): seq(a(n), n=1..100); # Alois P. Heinz, Apr 30 2022
-
Mathematica
Table[RealDigits[1/Prime[n],10,1][[1]],{n,100}]//Flatten (* Harvey P. Dale, Aug 25 2024 *)
-
PARI
a(n) = my(p=prime(n)); floor(10^(1+logint(p-1, 10))/p) \\ Felix Fröhlich, Apr 29 2022
Formula
a(n) = A052038(prime(n)).
Extensions
More terms from Felix Fröhlich, Apr 29 2022