login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A320115 Filter sequence for counting the residue classes mod 4 of divisors of n. 6

%I #9 Oct 08 2018 08:09:39

%S 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,

%T 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,

%U 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

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

%C Restricted growth sequence transform of A320114.

%C For all i, j:

%C A319994(i) = A319994(j) => a(i) = a(j),

%C A320004(i) = A320004(j) => a(i) = a(j),

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

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

%o (PARI)

%o up_to = 100000;

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

%o A320115(n) = v320115[n];

%Y Cf. A319994, A320004, A320109, A320113, A320114, A320117.

%K nonn

%O 1,2

%A _Antti Karttunen_, Oct 06 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 04:42 EDT 2024. Contains 371964 sequences. (Running on oeis4.)