cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A286584 a(n) = A048673(n) mod 4.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 31 2017

Keywords

Crossrefs

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

Programs

  • 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);
    
  • 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
  • Scheme
    (define (A286584 n) (modulo (A048673 n) 4))
    

Formula

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