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.

A373497 If n is prime, a(n) = 1 if the number of steps in its prime index chain is odd, a(n) = -1 if the number of steps is even, and a(n) = 0 is n is composite or 1.

Original entry on oeis.org

0, 1, -1, 0, 1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0
Offset: 1

Views

Author

Michael P. May, Jun 06 2024

Keywords

Crossrefs

Programs

  • PARI
    b(n)={my(k=0); while(isprime(n), k++; n=primepi(n)); k}; \\ A078442
    a(n) = if ((n==1) || !isprime(n), return(0)); if (b(n)%2, 1, -1); \\ Michel Marcus, Jun 11 2024

Formula

a(n) = 1 iff n is in A333242.
a(n) = -1 iff n is in A262275.
a(n) = 0 iff n is in A018252.

Extensions

More terms from Michel Marcus, Jun 11 2024