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.

A356549 a(n) is the number of divisors of 10^n whose first digit is 1.

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