|
|
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.
|
|
1
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
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.
|
|
LINKS
|
|
|
EXAMPLE
|
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.
|
|
PROG
|
(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
write_to_bfile(1, rgs_transform(vector(up_to, n, Aux300246(n))), "b300246.txt");
|
|
CROSSREFS
|
Differs from A300226 for the first time at n=40, where a(40) = 18.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|