%I #24 Jul 01 2024 13:20:19
%S 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,
%T 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,
%U -1,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,-1,0,0,0,0,0,1,0
%N 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.
%F a(n) = 1 iff n is in A333242.
%F a(n) = -1 iff n is in A262275.
%F a(n) = 0 iff n is in A018252.
%o (PARI) b(n)={my(k=0); while(isprime(n), k++; n=primepi(n)); k}; \\ A078442
%o a(n) = if ((n==1) || !isprime(n), return(0)); if (b(n)%2, 1, -1); \\ _Michel Marcus_, Jun 11 2024
%Y Cf. A333242, A262275, A018252.
%K sign
%O 1,1
%A _Michael P. May_, Jun 06 2024
%E More terms from _Michel Marcus_, Jun 11 2024