OFFSET
1,4
COMMENTS
0 = 1, 1 = p, 2 = p^2, 3 = p.q, 4 = p^3, 5 = p^2.q, 6 = p^4, 7 = p.q^2, 8 = p^3.q, 9 = p.q.r, 10 = p^5, 11 = p^2.q^2, 12 = p^4.q (p<q<r).
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
FORMULA
a(n) = A077462(n) - 1. - David Wasserman, Dec 21 2004
EXAMPLE
Primes are given 1. The next prime factorization pattern is 4=p^2, so a(4)=2 and similarly a(6)=3.
PROG
(PARI) primetemplate(n)=local(f, fl, res, eres); f=factor(n); fl=length(f[, 1]); res=""; for (i=1, fl, res=concat(res, f[, 2][i])); eres=eval(res); if (v[eres]==0, v[eres]=vc; vc++); eres vc=1; v=vector(10000); for (j=2, 50, print1(v[primetemplate(j)]", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Jon Perry, Jan 29 2003
EXTENSIONS
More terms from David Wasserman, Dec 21 2004
Term a(1) = 0 prepended, superfluous 1 after that removed, extended up to a(105) - Antti Karttunen, Jun 13 2018
STATUS
approved