login
A286584
a(n) = A048673(n) mod 4.
5
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, 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, 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
OFFSET
1,2
LINKS
FORMULA
a(n) = A010873(A048673(n)) = A048673(n) mod 4.
PROG
(PARI)
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
A048673(n) = (A003961(n)+1)/2;
A286584(n) = (A048673(n)%4);
(Scheme) (define (A286584 n) (modulo (A048673 n) 4))
(Python)
from sympy import factorint, nextprime
from operator import mul
def a048673(n):
f = factorint(n)
return 1 if n==1 else (1 + reduce(mul, [nextprime(i)**f[i] for i in f]))/2
def a(n): return a048673(n)%4 # Indranil Ghosh, Jun 12 2017
CROSSREFS
Cf. A246261 (positions of odd terms), A246263 (of even terms).
Sequence in context: A054438 A261015 A374849 * A174947 A010341 A072772
KEYWORD
nonn
AUTHOR
Antti Karttunen, May 31 2017
STATUS
approved