login
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.
0
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,1
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.
PROG
(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
CROSSREFS
KEYWORD
sign
AUTHOR
Michael P. May, Jun 06 2024
EXTENSIONS
More terms from Michel Marcus, Jun 11 2024
STATUS
approved