Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #46 Sep 24 2022 01:43:29
%S 1,2,3,5,8,11,15,20,25,31,38,45,52,60,69,78,88,99,110,122,135,148,161,
%T 175,190,205,221,238,255,273,292,311,330,350,371,392,414,437,460,484,
%U 509,534,559,585,612,639,667,696,725,755,786,817,848,880,913,946,980,1015,1050,1086
%N a(n) is the number of divisors of 10^n whose first digit is 1.
%H Michel Marcus, <a href="/A356549/b356549.txt">Table of n, a(n) for n = 0..500</a>
%F a(n) = A357299(A011557(n)).
%e The divisors of 1000 with initial digit 1 are: 1, 10, 100, 125 and 1000, so a(3)=5.
%p a:= n-> add(`if`((""||d)[1]="1", 1, 0), d=numtheory[divisors](10^n)):
%p seq(a(n), n=0..60); # _Alois P. Heinz_, Sep 23 2022
%t a[n_] := DivisorSum[10^n, 1 &, IntegerDigits[#][[1]] == 1 &]; Array[a, 60, 0] (* _Amiram Eldar_, Sep 23 2022 *)
%o (PARI) a(n) = sumdiv(10^n, d, digits(d)[1] == 1);
%o (Python)
%o from sympy import divisors
%o def a(n): return sum(1 for d in divisors(10**n, generator=True) if str(d)[0]=="1")
%o print([a(n) for n in range(60)]) # _Michael S. Branicky_, Sep 23 2022
%o (Python)
%o def A356549(n): return n+1+sum(n-m+1 for m in range(1,n+2) for d in (2,5) if str(d**m).startswith('1')) # _Chai Wah Wu_, Sep 23 2022
%Y Cf. A011557, A357299.
%K nonn,base
%O 0,2
%A _Michel Marcus_, Sep 23 2022