login
a(n) = A048673(n) mod 4.
5

%I #13 Jun 12 2017 21:53:53

%S 1,2,3,1,0,0,2,2,1,3,3,3,1,1,2,1,2,2,0,0,0,0,3,0,1,2,3,2,0,1,3,2,1,1,

%T 3,1,1,3,3,3,2,3,0,3,0,0,3,3,1,2,0,1,2,0,2,1,2,3,3,2,2,0,2,1,0,2,0,2,

%U 1,0,1,2,0,2,3,0,0,0,2,0,1,1,1,0,3,3,2,0,1,3,2,3,1,0,1,0,3,2,3,1,0,3,2,2,1,1,3,3,1,1,3,2,0

%N a(n) = A048673(n) mod 4.

%H Antti Karttunen, <a href="/A286584/b286584.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A010873(A048673(n)) = A048673(n) mod 4.

%o (PARI)

%o A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of _Michel Marcus_

%o A048673(n) = (A003961(n)+1)/2;

%o A286584(n) = (A048673(n)%4);

%o (Scheme) (define (A286584 n) (modulo (A048673 n) 4))

%o (Python)

%o from sympy import factorint, nextprime

%o from operator import mul

%o def a048673(n):

%o f = factorint(n)

%o return 1 if n==1 else (1 + reduce(mul, [nextprime(i)**f[i] for i in f]))/2

%o def a(n): return a048673(n)%4 # _Indranil Ghosh_, Jun 12 2017

%Y Cf. A010873, A048673, A286582, A286583, A286585.

%Y Cf. A246261 (positions of odd terms), A246263 (of even terms).

%K nonn

%O 1,2

%A _Antti Karttunen_, May 31 2017