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

A300825
Filter sequence combining A300823(n) and A300824(n).
4
1, 2, 2, 3, 2, 4, 2, 5, 6, 7, 2, 8, 2, 9, 10, 9, 2, 11, 2, 12, 13, 14, 2, 15, 16, 17, 18, 19, 2, 20, 2, 21, 22, 23, 24, 25, 2, 26, 27, 28, 2, 29, 2, 30, 31, 32, 2, 33, 34, 35, 36, 37, 2, 38, 39, 40, 41, 42, 2, 43, 2, 44, 45, 44, 46, 47, 2, 48, 49, 50, 2, 51, 2, 52, 53, 54, 55, 56, 2, 57, 58, 59, 2, 60, 61, 62, 63, 64, 2, 65, 66, 64, 67, 68, 69
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of ordered pair [A300823(n), A300824(n)].
For all i, j: a(i) = a(j) => A051953(i) = A051953(j).
LINKS
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])); }
A244042(n) = fromdigits(apply(x->(x%2), digits(n, 3)), 3);
A300823(n) = -sumdiv(n, d, (d<n)*moebius(n/d)*A244042(d));
A300222(n) = (n - A244042(n));
A300824(n) = -sumdiv(n, d, (d<n)*moebius(n/d)*A300222(d));
Aux300825(n) = [A300823(n), A300824(n)];
write_to_bfile(1, rgs_transform(vector(up_to, n, Aux300825(n))), "b300825.txt");
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 14 2018
STATUS
approved