login
A378992
a(n) = A011371(n) - A048881(n); The exponent of the highest power of 2 dividing the n-th factorial minus the exponent of the highest power of 2 dividing n-th Catalan number.
1
0, 0, 0, 1, 2, 2, 2, 4, 6, 6, 6, 7, 8, 8, 8, 11, 14, 14, 14, 15, 16, 16, 16, 18, 20, 20, 20, 21, 22, 22, 22, 26, 30, 30, 30, 31, 32, 32, 32, 34, 36, 36, 36, 37, 38, 38, 38, 41, 44, 44, 44, 45, 46, 46, 46, 48, 50, 50, 50, 51, 52, 52, 52, 57, 62, 62, 62, 63, 64, 64, 64, 66, 68, 68, 68, 69, 70, 70, 70, 73, 76, 76, 76
OFFSET
0,5
COMMENTS
Apparently, after the initial three 0's, only terms of A092054 occur, every other as a single copy, and every other in a batch of 3 duplicated terms.
FORMULA
a(n) = A007814(A000142(n)) - A007814(A000108(n)) = A011371(n) - A048881(n).
a(0) = 0; for n > 0, a(n) = A050605(n-1) + a(n-1), where A050605(n) = A007814(n+1)+A007814(n+2)-1.
MATHEMATICA
A378992[n_] := n - DigitCount[n, 2, 1] - DigitCount[n + 1, 2, 1] + 1;
Array[A378992, 100, 0] (* or *)
MapIndexed[#2[[1]] - # &, Total[Partition[DigitCount[Range[0, 100], 2, 1], 2, 1], {2}]] (* Paolo Xausa, Dec 28 2024 *)
PROG
(PARI) A378992(n) = (1+(n-hammingweight(n)-hammingweight(1+n)));
CROSSREFS
Partial sums of A050605.
Sequence in context: A361404 A248781 A236840 * A182539 A170887 A103265
KEYWORD
nonn,easy
AUTHOR
Antti Karttunen, Dec 16 2024
STATUS
approved