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

A297162
Restricted growth sequence transform of A297172, which is Möbius transform of A253564.
5
1, 2, 3, 2, 4, 2, 5, 6, 3, 3, 7, 3, 8, 4, 3, 9, 10, 6, 11, 4, 12, 5, 13, 14, 4, 7, 14, 5, 15, 3, 16, 17, 18, 8, 4, 9, 19, 10, 20, 21, 22, 4, 23, 7, 12, 11, 24, 25, 5, 9, 26, 8, 27, 9, 18, 28, 29, 13, 30, 31, 32, 15, 18, 33, 34, 5, 35, 10, 36, 31, 37, 17, 38, 16, 14, 11, 5, 7, 39, 40, 25, 19, 41, 42, 43, 22, 44, 45, 46, 14, 20, 13, 47, 23
OFFSET
1,2
LINKS
PROG
(PARI)
up_to = 8192;
rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences, invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences, 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])); }
A064989(n) = {my(f); f = factor(n); if((n>1 && f[1, 1]==2), f[1, 2] = 0); for (i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f)};
A122111(n) = if(1==n, n, prime(bigomega(n))*A122111(A064989(n)));
A156552(n) = if(1==n, 0, if(!(n%2), 1+(2*A156552(n/2)), 2*A156552(A064989(n))));
A297172(n) = sumdiv(n, d, moebius(n/d)*A253564(d));
write_to_bfile(1, rgs_transform(vector(up_to, n, A297172(n))), "b297162.txt");
CROSSREFS
Cf. also A297113, A297157, A297161.
Sequence in context: A328368 A052297 A365049 * A322587 A372569 A058973
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 27 2017
STATUS
approved