OFFSET
1,4
COMMENTS
a(n) = 1 for prime n; a(n) = 11, 111, 1111, ... if n = product of two, three, four, ... distinct primes. - Zak Seidov, Dec 15 2006
The sequence of (nonzero) exponents in the prime factorization of n, sorted in decreasing order, is called the prime signature of n, cf. A124010. - M. F. Hasler, Apr 17 2008, edited Oct 12 2018
LINKS
Zak Seidov and Michael De Vlieger, Table of n, a(n) for n = 1..10000 (First 2000 terms from Zak Seidov)
Wikipedia, Prime signature.
EXAMPLE
12 = 2^2 * 3^1, so a(12) = 21.
MATHEMATICA
Join[{0}, Table[FromDigits[Flatten[IntegerDigits/@Transpose[ FactorInteger[ n]][[2]]]], {n, 2, 80}]] (* Harvey P. Dale, Sep 29 2012 *)
PROG
(PARI) A037916(n)=if( n>1, eval(concat(concat([""], factor(n)[, 2]~)))) \\ M. F. Hasler, Apr 17 2008
(Python)
from sympy import factorint
def a(n): return 0 if n<2 else int("".join(map(str, factorint(n).values())))
print([a(n) for n in range(1, 79)]) # Michael S. Branicky, Mar 18 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
More terms from Erich Friedman
STATUS
approved