login
A374468
Parity of the digit sum of n in factorial base.
2
0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1
OFFSET
0
FORMULA
a(n) = A000035(A034968(n)) = A066829(A276076(n)).
A262725(n+1) = (-1)^a(n).
MATHEMATICA
A034968[n_] := Module[{a = n, i = 2}, While[i! <= n, a-=(i-1)*Floor[n/i++!]]; a];
Array[Mod[A034968[#], 2] &, 100, 0] (* Paolo Xausa, Sep 02 2024 *)
PROG
(PARI)
A034968(n) = { my(s=0, b=2, d); while(n, d = (n%b); s += d; n = (n-d)/b; b++); (s); };
A374468(n) = (A034968(n)%2);
CROSSREFS
Characteristic function of A227149, whose complement A227148 gives the indices of 0's.
Sequence in context: A284905 A291197 A269927 * A246146 A191162 A234046
KEYWORD
nonn,base
AUTHOR
Antti Karttunen and Peter Munn, Aug 08 2024
STATUS
approved