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.

A300246 Filter sequence combining A046523(n) and A078899(n), the prime signature of n and the number of times the greatest prime factor of n is the greatest prime factor for numbers <= n.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 6, 4, 2, 7, 2, 4, 8, 9, 2, 10, 2, 7, 8, 4, 2, 11, 12, 4, 13, 7, 2, 14, 2, 15, 8, 4, 16, 17, 2, 4, 8, 18, 2, 14, 2, 7, 19, 4, 2, 20, 21, 22, 8, 7, 2, 23, 16, 24, 8, 4, 2, 25, 2, 4, 22, 26, 16, 14, 2, 7, 8, 27, 2, 28, 2, 4, 29, 7, 30, 14, 2, 31, 32, 4, 2, 33, 16, 4, 8, 24, 2, 34, 30, 7, 8, 4, 16, 35, 2, 36, 22, 37, 2, 14, 2, 24, 38
Offset: 1

Views

Author

Antti Karttunen, Mar 09 2018

Keywords

Comments

Restricted growth sequence transform of P(A046523(n), A078899(n)), where P(a,b) is a two-argument form of A000027 used as a Cantor pairing function N x N -> N.

Examples

			a(30) = a(42) (= 14) because A078899(30) = A078899(42) = 6 and both numbers are products of three distinct primes, thus have the same prime signature.
a(35) = a(55) = a(65) (= 16) because A078899(35) = A078899(55) = A078899(65) = 5 and because all three are nonsquare semiprimes.
		

Crossrefs

Cf. also A300247, A300248.
Differs from A300226 for the first time at n=40, where a(40) = 18.

Programs

  • PARI
    up_to = 65537;
    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; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A006530(n) = if(1==n, n, vecmax(factor(n)[, 1]));
    A078899(n) = { if(n<=1,n, my(gpf=A006530(n),k=1,m=n/gpf); while(m>1,if(A006530(m)<=gpf,k++); m--); (k)); };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    Aux300246(n) = if(1==n,0,(1/2)*(2 + ((A078899(n)+A046523(n))^2) - A078899(n) - 3*A046523(n)));
    write_to_bfile(1,rgs_transform(vector(up_to,n,Aux300246(n))),"b300246.txt");