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.

A357628 Numbers k such that the reversed k-th composition in standard order has skew-alternating sum 0.

Original entry on oeis.org

0, 3, 10, 14, 15, 36, 43, 44, 45, 52, 54, 58, 59, 61, 63, 136, 147, 149, 152, 153, 166, 168, 170, 175, 178, 179, 181, 183, 185, 190, 200, 204, 211, 212, 213, 217, 219, 221, 228, 230, 234, 235, 237, 239, 242, 246, 247, 250, 254, 255, 528, 547, 549, 553, 560
Offset: 1

Views

Author

Gus Wiseman, Oct 08 2022

Keywords

Comments

We define the skew-alternating sum of a sequence (A, B, C, D, E, F, G, ...) 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.

Examples

			The sequence together with the corresponding compositions begins:
    0: ()
    3: (1,1)
   10: (2,2)
   14: (1,1,2)
   15: (1,1,1,1)
   36: (3,3)
   43: (2,2,1,1)
   44: (2,1,3)
   45: (2,1,2,1)
   52: (1,2,3)
   54: (1,2,1,2)
   58: (1,1,2,2)
   59: (1,1,2,1,1)
   61: (1,1,1,2,1)
   63: (1,1,1,1,1,1)
		

Crossrefs

See link for sequences related to standard compositions.
The alternating form is A344619.
Positions of zeros are A357624, non-reverse A357623.
The half-alternating form is A357626, non-reverse A357625.
The non-reverse version is A357627.
The version for prime indices is A357632.
The version for Heinz numbers of partitions is A357636.
A124754 gives alternating sum of standard compositions, reverse A344618.
A357637 counts partitions by half-alternating sum, skew A357638.
A357641 counts comps w/ half-alt sum 0, partitions A357639, even A357642.

Programs

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