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

A320117
Filter sequence for counting the residue classes mod 6 of divisors of n.
6
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5, 11, 7, 12, 13, 14, 5, 15, 7, 16, 17, 10, 5, 18, 19, 12, 20, 21, 5, 22, 7, 23, 13, 10, 24, 25, 7, 12, 17, 26, 5, 27, 7, 16, 28, 10, 5, 29, 30, 31, 13, 21, 5, 32, 24, 33, 17, 10, 5, 34, 7, 12, 35, 36, 24, 22, 7, 16, 13, 37, 5, 38, 7, 12, 39, 21, 24, 27, 7, 40, 41, 10, 5, 42, 24, 12, 13, 26, 5, 43, 44, 16, 17, 10, 24, 45, 7, 46, 28, 47, 5, 22, 7, 33
OFFSET
1,2
COMMENTS
Restricted growth sequence transform of A320116.
For all i, j:
A319717(i) = A319717(j) => a(i) = a(j),
A319996(i) = A319996(j) => a(i) = a(j),
A320113(i) = A320113(j) => a(i) = a(j),
a(i) = a(j) => A002324(i) = A002324(j).
LINKS
PROG
(PARI)
up_to = 100000;
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; };
A320116(n) = { my(m=1); fordiv(n, d, if(d>1, m *= prime(1+(d%6)))); (m); };
v320117 = rgs_transform(vector(up_to, n, A320116(n)));
A320117(n) = v320117[n];
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 06 2018
STATUS
approved