login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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