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.
%I A355698 #27 Apr 17 2025 08:08:11 %S A355698 1,2,2,3,2,4,2,4,3,3,2,5,1,3,3,4,1,5,1,4,3,4,1,6,2,2,3,4,1,5,1,4,4,2, %T A355698 3,6,1,2,2,5,1,5,1,6,4,2,1,6,2,3,2,3,1,5,4,5,2,2,1,6,1,2,4,4,2,8,1,3, %U A355698 2,4,1,7,1,2,3,3,4,4,1,5,3,2,1,6,2,2,2,8,1,6,2,3,2,2,2,6,1,3,6,4,1,4,1,4,4 %N A355698 a(n) is the number of repdigits divisors of n (A010785). %C A355698 More than the usual number of terms are displayed in order to show the difference from A087990. %C A355698 The first 100 terms are the same first 100 terms of A087990, then a(101) = 1 while A087990(101) = 2, because 101 is the smallest palindrome that is not repdigit; the next difference is 121. %C A355698 Inequalities: 1 <= a(n) <= A087990(n). %H A355698 Robert Israel, <a href="/A355698/b355698.txt">Table of n, a(n) for n = 1..10000</a> %F A355698 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = (7129/2520) * A065444 = 3.11446261209177581335... . - _Amiram Eldar_, Apr 17 2025 %e A355698 66 has 8 divisors: {1, 2, 3, 6, 11, 22, 33, 66} that are all repdigits, hence a(66) = 8. %e A355698 121 has 3 divisors: {1, 11, 121} of which 2 are repdigits: {1, 11}, hence a(121) = 2. %p A355698 isrepdig:= proc(n) nops(convert(convert(n,base,10),set))=1 end proc: %p A355698 f:= proc(n) nops(select(isrepdig, numtheory:-divisors(n))) end proc: %p A355698 map(f, [$1..200]); # _Robert Israel_, Aug 07 2024 %t A355698 a[n_] := DivisorSum[n, 1 &, Length[Union[IntegerDigits[#]]] == 1 &]; Array[a, 100] (* _Amiram Eldar_, Jul 14 2022 *) %o A355698 (Python) %o A355698 from sympy import divisors %o A355698 def c(n): return len(set(str(n))) == 1 %o A355698 def a(n): return sum(1 for d in divisors(n, generator=True) if c(d)) %o A355698 print([a(n) for n in range(1, 105)]) # _Michael S. Branicky_, Jul 14 2022 %o A355698 (PARI) a(n) = my(ret=0,u=1); while(u<=n, ret+=sum(d=1,9, n%(u*d)==0); u=10*u+1); ret; \\ _Kevin Ryde_, Jul 14 2022 %o A355698 (PARI) isrep(n) = {1==#Set(digits(n))}; \\ A010785 %o A355698 a(n) = sumdiv(n, d, isrep(d)); \\ _Michel Marcus_, Jul 15 2022 %Y A355698 Cf. A010785, A065444, A087990, A190217, A340548, A355699. %Y A355698 Similar sequences: A083230, A087990, A087991, A332268, A355302. %K A355698 nonn,base %O A355698 1,2 %A A355698 _Bernard Schott_, Jul 14 2022