login
A387219
Product of the first n terms of the paperfolding sequence A034947, or the Kronecker symbol (-1|n!).
0
1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, -1, 1, 1, 1
OFFSET
1
COMMENTS
A 2-automatic sequence.
FORMULA
a(n) = (-1)^A255070(n). - Kevin Ryde, Dec 31 2025
EXAMPLE
For n=4, the first 4 terms of A034947 are 1,1,-1,1 and their product is a(4) = -1.
MATHEMATICA
FoldList[Times, Table[KroneckerSymbol[-1, n], {n, 1, 100}]] (* Amiram Eldar, Dec 22 2025 *)
PROG
(PARI) a(n) = if(bittest(n, 1) == bittest(hammingweight(bitxor(n, n>>1)), 1), 1, -1); \\ Kevin Ryde, Dec 31 2025
CROSSREFS
Sequence in context: A262725 A070748 A154990 * A209615 A242179 A319117
KEYWORD
sign,easy
AUTHOR
Jeffrey Shallit, Dec 22 2025
STATUS
approved