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.

A300248 Filter sequence combining A046523(n) and A078898(n), the prime signature of n and the number of times the smallest prime factor of n is the smallest prime factor for numbers <= n.

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 5, 3, 6, 2, 7, 2, 8, 4, 9, 2, 10, 2, 11, 12, 13, 2, 14, 3, 15, 16, 17, 2, 18, 2, 19, 20, 21, 4, 22, 2, 23, 8, 24, 2, 25, 2, 26, 27, 28, 2, 29, 3, 30, 31, 32, 2, 33, 12, 34, 35, 36, 2, 37, 2, 38, 39, 40, 6, 41, 2, 42, 43, 44, 2, 45, 2, 46, 47, 48, 4, 49, 2, 50, 51, 52, 2, 53, 20, 54, 55, 56, 2, 57, 12, 58, 59, 60, 8, 61, 2, 62, 63, 64, 2
Offset: 1

Views

Author

Antti Karttunen, Mar 03 2018

Keywords

Comments

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

Examples

			a(10) = a(65) (= 6) because A078898(10) = A078898(65) = 5 (both numbers occur in column 5 of A083221) and because both have the same prime-signature (both are nonsquare semiprimes).
		

Crossrefs

Programs

  • PARI
    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])); }
    A020639(n) = { if(1==n,n,vecmin(factor(n)[, 1])); };
    A046523(n) = my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]) \\ From A046523
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A078898(n) = { if(n<=1,n, my(spf=A020639(n),k=1,m=n/spf); while(m>1,if(A020639(m)>=spf,k++); m--); (k)); };
    Aux300248(n) = if(1==n,0,(1/2)*(2 + ((A078898(n)+A046523(n))^2) - A078898(n) - 3*A046523(n)));
    write_to_bfile(1,rgs_transform(vector(65537,n,Aux300248(n))),"b300248.txt");