OFFSET
1,2
COMMENTS
Numbers k for which minimal number of factorials needed to add to get k is even.
This sequence offers one possible analog to A001969 (evil numbers) in factorial base system. A227130 gives another kind of analog.
In each range [0,n!-1] exactly half of the integers are found in this sequence, and the other half of them are found in the complement, A227149.
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..2520
Wikipedia, Parity of permutation.
MATHEMATICA
q[n_] := Module[{k = n, m = 2, s = 0, r}, While[{k, r} = QuotientRemainder[k, m]; k != 0|| r != 0, s += r; m++]; EvenQ[s]]; Select[Range[0, 125], q] (* Amiram Eldar, Jan 24 2024 *)
PROG
(Scheme, with Antti Karttunen's IntSeq-library): (define A227148 (MATCHING-POS 1 0 (lambda (i) (even? (A034968 i)))))
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Jul 02 2013
STATUS
approved