OFFSET
1,1
COMMENTS
If m is the sum of the first k odd-indexed factorial numbers (A000142), for k >= 2, then m-1 is a term, since the factorial-base representation of m is 1010...10, with the block "10" repeated k times, and the factorial-base representation of m-1 is the 1010...1001, with the block "10" repeated k-1 times and followed by "01" (these numbers are 25, 745, 41065, 3669865, 482671465, ...).
LINKS
EXAMPLE
25 is a term since the factorial-base representations of 25 and 26 are 1001 and 1010, respectively, and both have 2 odd digits and 2 even digits.
MATHEMATICA
With[{max = 7}, fctBaseDigits[n_] := IntegerDigits[n, MixedRadix[Range[max, 2, -1]]]; s = Select[Range[1, max!], EvenQ[Length[(d = fctBaseDigits[#])]] && Count[d, _?EvenQ] == Length[d]/2 &]; ind = Position[Differences[s], 1] // Flatten; s[[ind]]]
PROG
(PARI) iseq(n) = {my(p = 2, o = 0, e = 0); while(n > 0, if((n%p) %2 == 0, e++, o++); n \= p; p++); e == o; }
lista(kmax) = {my(q1 = 0, q2); for(k = 1, kmax, q2 = iseq(k); if(q1 && q2, print1(k-1, ", ")); q1 = q2); }
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Amiram Eldar, Jun 07 2024
STATUS
approved