OFFSET
1,2
COMMENTS
To get the factorization pattern of the divisors of n, take the list of divisors of n, and factor each one, using p,q,r,... to represent the prime divisors of n in order. E.g., when factoring 14 as a divisor of 84, the prime divisors of 84 are p=2, q=3, r=7, so 14 => p*r.
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000
EXAMPLE
The factors of any prime p are 1,p, so this is the factorization pattern for all primes. The first prime, 2, is thus in the sequence, and no other primes are. Semiprimes have either the pattern 1,p,p^2 or 1,p,q,p*q, so the semiprimes in this sequence are the first instances of each of these, respectively 4 and 6.
For numbers which are the product of the square of a prime and a different prime (A054753), there are three possible patterns: 1,p,q,p^2,p*q,p^2*q, 1,p,q,p*q,q^2,p*q^2, and 1,p,p^2,q,p*q,p*q^2; the exemplars in the sequence are 12, 18, and 20 respectively.
MATHEMATICA
f[n_] := If[n==1, 1, Block[{p = First /@ FactorInteger@n, z}, z = Table[p[[i]] -> x[i], {i, Length@p}]; Times @@ (((#[[1]] /. z)^#[[2]]) & /@ FactorInteger[#]) & /@ Divisors[n]]]; A = <||>; L={}; Do[k = f[n]; If[! KeyExistsQ[A, k], AppendTo[L, n]; A[k] = 1], {n, 330}]; L (* Giovanni Resta, Jul 20 2017 *)
PROG
(PARI)
vecfnd(v, x)={ for(k=1, #v, if(v[k]==x, return(k))); return(0); }
vecfndn(v, x, n)={ for(k=1, n, if(v[k]==x, return(k))); return(0); }
factfmt(k, ps)=
{
local(r, fm); r=""; fm=factor(k);
for(i=1, matsize(fm)[1],
if(i>1, r=Str(r"*"));
r=Str(r, vecfnd(ps, fm[i, 1]));
if(fm[i, 2]>1, r=Str(r"^"fm[i, 2]))
);
return(r);
} /* end factfmt() */
factpatt(n)=
{
local(ps, ds, r); r=""; ps=factor(n)[, 1]~; ds=divisors(n);
for(k=1, #ds, if(k>1, r=Str(r", ")); r=concat(r, factfmt(ds[k], ps)));
return(r);
} /* end factpatt() */
al(n)=
{
local(k, r, st, m, pt); k=1; r=vector(n); st=vector(n);
while(m<n, pt=factpatt(k); if(!vecfndn(st, pt, m), m++; r[m]=k; st[m]=pt); k++);
return(r);
} /* end al() */
al(66) /* show first 66 terms */
CROSSREFS
KEYWORD
nonn
AUTHOR
Franklin T. Adams-Watters, Jun 13 2011
STATUS
approved