A320113 Filter sequence for counting the residue classes mod 12 of divisors of n.
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, 24, 25, 5, 26, 7, 27, 28, 10, 29, 30, 13, 14, 31, 32, 5, 33, 7, 34, 35, 20, 11, 36, 37, 38, 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
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..100000
Programs
-
PARI
up_to = 100000; A320112(n) = { my(m=1); fordiv(n,d,if(d>1, m *= prime(1+(d%12)))); (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; }; v320113 = rgs_transform(vector(up_to,n,A320112(n))); A320113(n) = v320113[n];
Comments