login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A109608
Numbers n such that the number of digits required to write the prime factors of n equals the number of digits of n.
3
2, 3, 5, 7, 10, 11, 13, 14, 15, 17, 19, 21, 23, 25, 29, 31, 35, 37, 41, 43, 47, 49, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 105, 106, 107, 109, 111, 113, 115, 118, 119, 122, 123, 125, 127, 129, 131, 133, 134, 137, 139, 141, 142, 145, 146, 147, 149, 151, 155
OFFSET
1,1
COMMENTS
Can also be defined as numbers n such that A280827(n) = 0. - Ely Golden, Jan 08 2017
EXAMPLE
18775 is a term because it is a 5-digit number with 5 digits in its factorization: 5*5*751 = 18775.
PROG
(SageMath)
def digits(x, n):
if(x<=0|n<2):
return []
li=[]
while(x>0):
d=divmod(x, n)
li.insert(0, d[1])
x=d[0]
return li;
def factorDigits(x, n):
if(x<=0|n<2):
return []
li=[]
f=list(factor(x))
for c in range(len(f)):
for d in range(f[c][1]):
ld=digits(f[c][0], n)
li+=ld
return li;
def digitDiff(x, n):
return len(factorDigits(x, n))-len(digits(x, n))
radix=10
index=1
value=2
while(index<=10000):
if(digitDiff(value, radix)==0):
print(str(index)+" "+str(value))
index+=1
value+=1
# Ely Golden, Jan 10 2017
(PARI) nbd(n) = my(f=factor(n)); sum(i=1, #f~, f[i, 2]*#Str(f[i, 1])); \\ A076649
isok(n) = nbd(n) == #Str(n); \\ Michel Marcus, Oct 11 2021
(Python)
from sympy import factorint
def ok(n):
s, f = str(n), factorint(n)
return n and len(s) == sum(len(str(p))*f[p] for p in f)
print(list(filter(ok, range(156)))) # Michael S. Branicky, Oct 11 2021
CROSSREFS
Sequence in context: A122428 A087246 A090421 * A325388 A325405 A118241
KEYWORD
base,easy,nonn
AUTHOR
Jason Earls, Jul 31 2005
STATUS
approved