A308945 Number of totient numbers, phi(k), k <= 10^n, whose initial digit is 1.
2, 20, 213, 2152, 21594, 216009, 2159776, 21595522, 215951111, 2159507603, 21595061256, 215950604593
Offset: 1
Examples
a(1)=2 as the first 10 totient numbers are {1, 1, 2, 2, 4, 2, 6, 4, 6, 4} and the occurrence of numbers with an initial 1 is 2.
Links
- Wikipedia, Benford's law
Programs
-
Mathematica
lst1={}; Do[lst=Table[0, {n, 1, 9}]; Do[++lst[[First@IntegerDigits@EulerPhi[n]]], {n, 1, 10^m}]; AppendTo[lst1, lst[[1]]], {m, 1, 7}]; lst1
-
PARI
a(n) = {k=0; for(j=1, 10^n, if(digits(eulerphi(j))[1]==1, k++)); k} \\ Jinyuan Wang, Jul 04 2019
Extensions
a(10)-a(12) from Giovanni Resta, Jul 04 2019
Comments