login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Filter sequence combining parity of n, A003557(n) and A051953(n).
3

%I #7 Jan 19 2019 04:15:43

%S 1,2,3,4,3,5,3,6,7,8,3,9,3,10,11,12,3,13,3,14,15,16,3,17,18,19,20,21,

%T 3,22,3,23,24,25,26,27,3,28,29,30,3,31,3,32,33,34,3,35,36,37,38,39,3,

%U 40,29,41,42,31,3,43,3,44,45,46,47,48,3,49,50,48,3,51,3,52,53,54,47,55,3,56,57,58,3,59,42,60,61,62,3,63,38,64,65,66,67,68,3,69,70,71,3

%N Filter sequence combining parity of n, A003557(n) and A051953(n).

%C Restricted growth sequence transform of triple [A000035(n), A003557(n), A051953(n)], or equally, of triple [A007814(n), A003557(n), A051953(n)], or equally, of ordered pair [A000035(n), A319348(n)].

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

%F For n >= 3, a(n) = 1 + A319348(n).

%o (PARI)

%o up_to = 65537;

%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 A003557(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 2] = f[i, 2]-1); factorback(f); };

%o A051953(n) = (n-eulerphi(n));

%o v319349 = rgs_transform(vector(up_to,n,[(n%2),A003557(n),A051953(n)]));

%o A319349(n) = v319349[n];

%Y Cf. A000035, A003557, A007814, A051953, A305801, A319348.

%K nonn

%O 1,2

%A _Antti Karttunen_, Sep 29 2018