OFFSET
0,2
COMMENTS
These are prime-factorization representations of single-variable polynomials where the coefficient of term x^(k-1) (encoded as the exponent of prime(k) in the factorization of n) is equal to the number of times a nonzero digit k occurs in the factorial base representation of n. See the examples.
LINKS
FORMULA
EXAMPLE
For n = 0 whose factorial base representation (A007623) is also 0, there are no nonzero digits at all, thus there cannot be any prime present in the encoding, and a(0) = 1.
For n = 1 there is just one 1, thus a(1) = prime(1) = 2.
For n = 2 ("10", there is just one 1-digit, thus a(2) = prime(1) = 2.
For n = 3 ("11") there are two 1-digits, thus a(3) = prime(1)^2 = 4.
For n = 18 ("300") there is just one 3, thus a(18) = prime(3) = 5.
For n = 19 ("301") there is one 1 and one 3, thus a(19) = prime(1)*prime(3) = 2*5 = 10.
For n = 141 ("10311") there are three 1's and one 3, thus a(141) = prime(1)^3 * prime(3) = 2^3 * 5^1 = 40.
PROG
(Scheme, with memoization-macro definec)
(Python)
from sympy import prime
from operator import mul
import collections
def a007623(n, p=2): return n if n<p else a007623(n//p, p+1)*10 + n%p
def a(n):
y=collections.Counter(map(int, list(str(a007623(n)).replace("0", "")))).most_common()
return 1 if n==0 else reduce(mul, [prime(y[i][0])**y[i][1] for i in range(len(y))])
print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 19 2017
(PARI)
A276076(n) = { my(i=0, m=1, f=1, nextf); while((n>0), i=i+1; nextf = (i+1)*f; if((n%nextf), m*=(prime(i)^((n%nextf)/f)); n-=(n%nextf)); f=nextf); m; };
A181819(n) = factorback(apply(e->prime(e), (factor(n)[, 2])));
CROSSREFS
KEYWORD
AUTHOR
Antti Karttunen, Aug 09 2016
STATUS
approved