

A320115


Filter sequence for counting the residue classes mod 4 of divisors of n.


6



1, 2, 3, 4, 5, 6, 3, 7, 8, 9, 3, 10, 5, 6, 11, 12, 5, 13, 3, 14, 11, 6, 3, 15, 16, 9, 11, 10, 5, 17, 3, 18, 11, 9, 11, 19, 5, 6, 11, 20, 5, 17, 3, 10, 21, 6, 3, 22, 8, 23, 11, 14, 5, 17, 11, 15, 11, 9, 3, 24, 5, 6, 25, 26, 27, 17, 3, 14, 11, 17, 3, 28, 5, 9, 25, 10, 11, 17, 3, 29, 30, 9, 3, 24, 27, 6, 11, 15, 5, 31, 11, 10, 11, 6, 11, 32, 5, 13, 25, 33, 5, 17, 3, 20
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Restricted growth sequence transform of A320114.
For all i, j:
A319994(i) = A319994(j) => a(i) = a(j),
A320004(i) = A320004(j) => a(i) = a(j),
a(i) = a(j) => A002654(i) = A002654(j).


LINKS

Antti Karttunen, Table of n, a(n) for n = 1..100000


PROG

(PARI)
up_to = 100000;
A320114(n) = { my(m=1); fordiv(n, d, if(d>1, m *= prime(1+(d%4)))); (m); };
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; };
v320115 = rgs_transform(vector(up_to, n, A320114(n)));
A320115(n) = v320115[n];


CROSSREFS

Cf. A319994, A320004, A320109, A320113, A320114, A320117.
Sequence in context: A323081 A274630 A278058 * A319994 A319714 A320004
Adjacent sequences: A320112 A320113 A320114 * A320116 A320117 A320118


KEYWORD

nonn


AUTHOR

Antti Karttunen, Oct 06 2018


STATUS

approved



