Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Filter sequence for counting the residue classes mod 12 of divisors of n.
5

%I #7 Oct 08 2018 08:09:26

%S 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,5,17,7,18,19,20,11,21,22,23,

%T 24,25,5,26,7,27,28,10,29,30,13,14,31,32,5,33,7,34,35,20,11,36,37,38,

%U 15,39,5,40,29,41,19,10,11,42,13,14,43,44,45,46,7,18,28,47,11,48,13,23,49,25,29,50,7,51,52,10,11,53,45,14,15,54,5,55,56,34,19,20,29,57,13,58,59,60,5

%N Filter sequence for counting the residue classes mod 12 of divisors of n.

%C Restricted growth sequence transform of A320112.

%C For all i, j:

%C a(i) = a(j) => A320115(i) = A320115(j).

%C a(i) = a(j) => A320117(i) = A320117(j).

%H Antti Karttunen, <a href="/A320113/b320113.txt">Table of n, a(n) for n = 1..100000</a>

%o (PARI)

%o up_to = 100000;

%o A320112(n) = { my(m=1); fordiv(n,d,if(d>1, m *= prime(1+(d%12)))); (m); };

%o 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; };

%o v320113 = rgs_transform(vector(up_to,n,A320112(n)));

%o A320113(n) = v320113[n];

%Y Cf. A320109, A320112, A320115, A320117.

%K nonn

%O 1,2

%A _Antti Karttunen_, Oct 06 2018