login
Filter sequence combining A046523(n) and A052126(n), the prime signature of n and n/(largest prime dividing n).
16

%I #6 Mar 01 2018 14:52:46

%S 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,

%T 15,8,4,16,17,2,4,8,11,2,14,2,7,18,4,2,19,20,21,8,7,2,22,16,11,8,4,2,

%U 23,2,4,18,24,16,14,2,7,8,25,2,26,2,4,27,7,28,14,2,19,29,4,2,23,16,4,8,11,2,30,28,7,8,4,16,31,2,32,18,33,2,14,2,11,34

%N Filter sequence combining A046523(n) and A052126(n), the prime signature of n and n/(largest prime dividing n).

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

%H Antti Karttunen, <a href="/A300226/b300226.txt">Table of n, a(n) for n = 1..65537</a>

%e a(6) = a(10) (= 4) because both are nonsquare semiprimes (2*3 and 2*5), and when the largest prime factor is divided out, both yield the same quotient, 2.

%o (PARI)

%o 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; };

%o write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }

%o A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523

%o A052126(n) = if(1==n,n, my(f=factor(n)[, 1], gpf = f[#f]); n/gpf); \\ After code in A052126.

%o Aux300226(n) = (1/2)*(2 + ((A052126(n)+A046523(n))^2) - A052126(n) - 3*A046523(n));

%o write_to_bfile(1,rgs_transform(vector(65537,n,Aux300226(n))),"b300226.txt");

%Y Cf. A046523, A052126.

%Y Cf. also A291761, A300229.

%K nonn

%O 1,2

%A _Antti Karttunen_, Mar 01 2018