cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A077462 Prime factor configuration patterns.

Original entry on oeis.org

0, 1, 2, 2, 3, 2, 4, 2, 5, 3, 4, 2, 6, 2, 4, 4, 7, 2, 8, 2, 6, 4, 4, 2, 9, 3, 4, 5, 6, 2, 10, 2, 11, 4, 4, 4, 12, 2, 4, 4, 9, 2, 10, 2, 6, 6, 4, 2, 13, 3, 8, 4, 6, 2, 14, 4, 9, 4, 4, 2, 15, 2, 4, 6, 16, 4, 10, 2, 6, 4, 10, 2, 17, 2, 4, 8, 6, 4, 10, 2, 13, 7, 4
Offset: 0

Views

Author

Michael Somos, Nov 07 2002

Keywords

Comments

Call two numbers equivalent if they have the same prime factorization exponents (in the same order). This sequence enumerates the equivalence classes.
A055932(a(n)) = A071364(n). - David Wasserman, Dec 21 2004
From Antti Karttunen, Jun 13 2018: (Start)
After a(0) = 0, this is the restricted growth sequence transform of A071364. The latter sequence is an "ordered variant" of A046523, and because A101296 is the rgs-transform of A046523, it follows that for all i, j: a(i) = a(j) => A101296(i) = A101296(j).
(End)

Examples

			12 = 2^2*3^1 has exponents {2,1}, and is the first number with that pattern, so its value is one more than the largest previous value; a(12) = 6. Contrast that with 18 = 2^1*3^2 having exponents {1,2}, which is different from {2,1}, so a(18) is not equal to a(12). - _Franklin T. Adams-Watters_, Aug 01 2012
		

Crossrefs

One more than A079616.

Programs

  • Mathematica
    fList = {{0}}; Join[{0, 1}, Table[e = Transpose[FactorInteger[n]][[2]]; pos = Position[fList, e]; If[pos == {}, AppendTo[fList, e]; Length[fList], pos[[1, 1]]], {n, 2, 100}]] (* T. D. Noe, Aug 01 2012 *)
  • PARI
    a(n)=local(vn); if(n<1,return(0)); vn=factor(n)[,2]; for(i=1,n,if(vn==factor(i)[,2],return(#Set(vector(i,j,factor(j)[,2])))))
    
  • PARI
    up_to = 100000;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A071364(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = prime(i)); factorback(f); }; \\ From A071364
    v077462 = rgs_transform(vector(up_to,n,A071364(n)));
    A077462(n) = if(!n,n,v077462[n]); \\ Antti Karttunen, Jun 13 2018

A079617 Occurrences of prime factorization templates, unordered.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 4, 2, 3, 1, 5, 1, 3, 3, 6, 1, 5, 1, 5, 3, 3, 1, 7, 2, 3, 4, 5, 1, 8, 1, 9, 3, 3, 3, 10, 1, 3, 3, 7, 1, 8, 1, 5, 5, 3, 1, 11, 2, 5, 3, 5, 1, 7, 3, 7, 3, 3, 1, 12, 1, 3, 5, 13, 3, 8, 1, 5, 3, 8, 1, 14, 1, 3, 5, 5, 3, 8, 1, 11, 6, 3, 1, 12, 3, 3, 3, 7, 1, 12, 3, 5, 3, 3, 3, 15, 1, 5, 5, 10, 1, 8
Offset: 2

Views

Author

Jon Perry, Jan 29 2003

Keywords

Comments

1=p, 2=p^2, 3=p.q, 4=p^3, 5=p^2.q, 6=p^4 7=p^3.q, 8=p.q.r, 9=p^5, 10=p^2.q^2, 11=p^4.q

Examples

			Primes are given 1. The next prime factorization pattern is 4=p^2, so a(4)=2 and similarly a(6)=3. a(12)=a(18), etc...
		

Crossrefs

Programs

  • PARI
    primetemplate2(n)=local(f,fl,fs,res,eres); f=factor(n); fl=length(f[,1]); fs=f[,2]; fs=vecsort(fs); res=""; for (i=1,fl,res=concat(res,fs[i])); eres=eval(res); if (v[eres]==0,v[eres]=vc; vc++); eres vc=1; v=vector(10000); for (j=2,50,print1(v[primetemplate2(j)]","))

Formula

a(n) = A101296(n)-1. - David Wasserman, Dec 27 2004

Extensions

More terms from David Wasserman, Dec 27 2004
Showing 1-2 of 2 results.