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 A109608 #21 Oct 11 2021 08:46:20 %S A109608 2,3,5,7,10,11,13,14,15,17,19,21,23,25,29,31,35,37,41,43,47,49,53,59, %T A109608 61,67,71,73,79,83,89,97,101,103,105,106,107,109,111,113,115,118,119, %U A109608 122,123,125,127,129,131,133,134,137,139,141,142,145,146,147,149,151,155 %N A109608 Numbers n such that the number of digits required to write the prime factors of n equals the number of digits of n. %C A109608 Can also be defined as numbers n such that A280827(n) = 0. - _Ely Golden_, Jan 08 2017 %H A109608 Ely Golden, <a href="/A109608/b109608.txt">Table of n, a(n) for n = 1..10000</a> %e A109608 18775 is a term because it is a 5-digit number with 5 digits in its factorization: 5*5*751 = 18775. %o A109608 (SageMath) %o A109608 def digits(x, n): %o A109608 if(x<=0|n<2): %o A109608 return [] %o A109608 li=[] %o A109608 while(x>0): %o A109608 d=divmod(x, n) %o A109608 li.insert(0,d[1]) %o A109608 x=d[0] %o A109608 return li; %o A109608 def factorDigits(x, n): %o A109608 if(x<=0|n<2): %o A109608 return [] %o A109608 li=[] %o A109608 f=list(factor(x)) %o A109608 for c in range(len(f)): %o A109608 for d in range(f[c][1]): %o A109608 ld=digits(f[c][0], n) %o A109608 li+=ld %o A109608 return li; %o A109608 def digitDiff(x,n): %o A109608 return len(factorDigits(x,n))-len(digits(x,n)) %o A109608 radix=10 %o A109608 index=1 %o A109608 value=2 %o A109608 while(index<=10000): %o A109608 if(digitDiff(value,radix)==0): %o A109608 print(str(index)+" "+str(value)) %o A109608 index+=1 %o A109608 value+=1 %o A109608 # _Ely Golden_, Jan 10 2017 %o A109608 (PARI) nbd(n) = my(f=factor(n)); sum(i=1, #f~, f[i,2]*#Str(f[i,1])); \\ A076649 %o A109608 isok(n) = nbd(n) == #Str(n); \\ _Michel Marcus_, Oct 11 2021 %o A109608 (Python) %o A109608 from sympy import factorint %o A109608 def ok(n): %o A109608 s, f = str(n), factorint(n) %o A109608 return n and len(s) == sum(len(str(p))*f[p] for p in f) %o A109608 print(list(filter(ok, range(156)))) # _Michael S. Branicky_, Oct 11 2021 %Y A109608 Cf. A076649, A280827. %K A109608 base,easy,nonn %O A109608 1,1 %A A109608 _Jason Earls_, Jul 31 2005