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”).

A319349
Filter sequence combining parity of n, A003557(n) and A051953(n).
3
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, 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, 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
OFFSET
1,2
COMMENTS
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)].
LINKS
FORMULA
For n >= 3, a(n) = 1 + A319348(n).
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; };
A003557(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 2] = f[i, 2]-1); factorback(f); };
A051953(n) = (n-eulerphi(n));
v319349 = rgs_transform(vector(up_to, n, [(n%2), A003557(n), A051953(n)]));
A319349(n) = v319349[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Sep 29 2018
STATUS
approved