cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A357706 Numbers k such that the k-th composition in standard order has half-alternating sum and skew-alternating sum both 0.

Original entry on oeis.org

0, 15, 45, 54, 59, 153, 170, 179, 204, 213, 230, 235, 247, 255, 561, 594, 611, 660, 677, 710, 715, 727, 735, 750, 765, 792, 809, 842, 851, 871, 879, 894, 908, 917, 934, 939, 951, 959, 973, 982, 987, 1005, 1014, 1019
Offset: 1

Views

Author

Gus Wiseman, Oct 13 2022

Keywords

Comments

We define the half-alternating sum of a sequence (A, B, C, D, E, F, G, ...) to be A + B - C - D + E + F - G - ..., and the skew-alternating sum to be A - B - C + D + E - F - G + ...
The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. This gives a bijective correspondence between nonnegative integers and integer compositions.

Crossrefs

For partitions and half only (or both): A000583, counted by A035363.
These compositions are counted by A228248.
For half-alternating only: A357625, reverse A357626, counted by A357641.
For skew-alternating only: A357627, reverse A357628, counted by A001700.
For reversed partitions and half only: A357631, counted by A357639.
For reversed partitions and skew only A357632, counted by A357640.
For partitions and skew only: A357636, counted by A035594.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}];
    Select[Range[0,1000],halfats[stc[#]]==0&&skats[stc[#]]==0&]

Formula

Intersection of A357625 and A357627.