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.

Showing 1-10 of 22 results. Next

A357639 Number of reversed integer partitions of 2n whose half-alternating sum is 0.

Original entry on oeis.org

1, 0, 2, 1, 6, 4, 15, 13, 37, 37, 86, 94, 194, 223, 416, 497, 867, 1056, 1746, 2159, 3424, 4272, 6546, 8215, 12248, 15418, 22449, 28311, 40415, 50985, 71543, 90222, 124730, 157132, 214392, 269696, 363733, 456739, 609611, 763969, 1010203, 1263248, 1656335, 2066552, 2688866
Offset: 0

Views

Author

Gus Wiseman, Oct 11 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 - ...

Examples

			The a(0) = 1 through a(6) = 15 reversed partitions:
  ()  .  (112)   (123)  (134)       (145)      (156)
         (1111)         (224)       (235)      (246)
                        (2222)      (11233)    (336)
                        (11222)     (1111123)  (3333)
                        (1111112)              (11244)
                        (11111111)             (11334)
                                               (12333)
                                               (1111134)
                                               (1111224)
                                               (1112223)
                                               (1122222)
                                               (11112222)
                                               (111111222)
                                               (11111111112)
                                               (111111111111)
		

Crossrefs

The non-reverse version is A035363/A035444.
The non-reverse skew version appears to be A035544/A035594.
These partitions are ranked by A357631, skew A357632.
The skew-alternating version is A357640.
This is the central column of A357704.
A000041 counts integer partitions (also reversed integer partitions).
A316524 gives alternating sum of prime indices, reverse A344616.
A344651 counts alternating sum of partitions by length, ordered A097805.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357629 gives half-alternating sum of prime indices, skew A357630.
A357633 gives half-alternating sum of Heinz partition, skew A357634.
A357637 counts partitions by half-alternating sum, skew A357637.

Programs

  • Mathematica
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Table[Length[Select[IntegerPartitions[2n],halfats[Reverse[#]]==0&]],{n,0,15}]

Extensions

a(31) onwards from Lucas A. Brown, Oct 19 2022

A357641 Number of integer compositions of 2n whose half-alternating sum is 0.

Original entry on oeis.org

1, 0, 2, 8, 28, 104, 396, 1504, 5720, 21872, 83980, 323344, 1248072, 4828784, 18721080, 72711552, 282861360, 1101980000, 4298748300, 16789002736, 65641204200, 256895795312, 1006308200040, 3945185586368, 15478849767888, 60774329914144, 238775589937976
Offset: 0

Views

Author

Gus Wiseman, Oct 12 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 - ...

Examples

			The a(0) = 1 through a(3) = 8 compositions:
  ()  .  (112)   (123)
         (1111)  (213)
                 (1212)
                 (1221)
                 (2112)
                 (2121)
                 (11121)
                 (11211)
		

Crossrefs

The skew-alternating version appears to be A001700.
The version for partitions is A035363.
The skew-alternating form is A088218 (also for full alternating sum).
These compositions are ranked by A357625, reverse A357626.
For reversed partitions we have A357639, ranked by A357631.
A124754 gives alternating sum of standard compositions, reverse A344618.
A357621 = half-alternating sum of standard compositions, reverse A357622.
A357637 counts partitions by half-alternating sum, skew A357638.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<3, [1, 0, 2][n+1],
          (8*(n-3)*(5*n-7)*(2*n-5)*a(n-3) -4*(5*n-12)*(n-2)^2*a(n-2)
           +2*(2*n-5)*(5*n-7)*n*a(n-1))/((5*n-12)*(n+1)*(n-2)))
        end:
    seq(a(n), n=0..40);  # Alois P. Heinz, Oct 19 2022
  • Mathematica
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Table[Length[Select[Join@@Permutations/@IntegerPartitions[2n],halfats[#]==0&]],{n,0,7}]

Extensions

a(11)-a(26) from Alois P. Heinz, Oct 19 2022

A357621 Half-alternating sum of the n-th composition in standard order.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 3, 1, 4, 4, 4, 2, 4, 2, 0, 0, 5, 5, 5, 3, 5, 3, 1, 1, 5, 3, 1, 1, -1, -1, -1, 1, 6, 6, 6, 4, 6, 4, 2, 2, 6, 4, 2, 2, 0, 0, 0, 2, 6, 4, 2, 2, 0, 0, 0, 2, -2, -2, -2, 0, -2, 0, 2, 2, 7, 7, 7, 5, 7, 5, 3, 3, 7, 5, 3, 3, 1, 1, 1, 3, 7, 5, 3, 3, 1
Offset: 0

Views

Author

Gus Wiseman, Oct 07 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 - ...
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 358-th composition is (2,1,3,1,2) so a(358) = 2 + 1 - 3 - 1 + 2 = 1.
		

Crossrefs

See link for sequences related to standard compositions.
The reverse version is A357622.
The skew-alternating form is A357623, reverse A357624.
Positions of zeros are A357625, reverse A357626.
The version for prime indices is A357629.
The version for Heinz numbers of partitions is A357633.
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;
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Table[halfats[stc[n]],{n,0,100}]

Formula

Positions of first appearances are powers of 2 and even powers of 2 times 7, or A029746 without 7.

A357637 Triangle read by rows where T(n,k) is the number of integer partitions of n with half-alternating sum k, where k ranges from -n to n in steps of 2.

Original entry on oeis.org

1, 0, 1, 0, 0, 2, 0, 0, 1, 2, 0, 0, 1, 1, 3, 0, 0, 0, 2, 2, 3, 0, 0, 0, 0, 5, 2, 4, 0, 0, 0, 0, 2, 6, 3, 4, 0, 0, 0, 0, 2, 3, 9, 3, 5, 0, 0, 0, 0, 0, 4, 7, 10, 4, 5, 0, 0, 0, 0, 0, 0, 11, 8, 13, 4, 6, 0, 0, 0, 0, 0, 0, 4, 15, 12, 14, 5, 6, 0, 0, 0, 0, 0, 0, 3, 7, 25, 13, 17, 5, 7
Offset: 0

Views

Author

Gus Wiseman, Oct 10 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 - ...

Examples

			Triangle begins:
  1
  0  1
  0  0  2
  0  0  1  2
  0  0  1  1  3
  0  0  0  2  2  3
  0  0  0  0  5  2  4
  0  0  0  0  2  6  3  4
  0  0  0  0  2  3  9  3  5
  0  0  0  0  0  4  7 10  4  5
  0  0  0  0  0  0 11  8 13  4  6
  0  0  0  0  0  0  4 15 12 14  5  6
  0  0  0  0  0  0  3  7 25 13 17  5  7
Row n = 9 counts the following partitions:
  (3222)       (333)      (432)     (441)  (9)
  (22221)      (3321)     (522)     (531)  (54)
  (21111111)   (4221)     (4311)    (621)  (63)
  (111111111)  (32211)    (5211)    (711)  (72)
               (222111)   (6111)           (81)
               (2211111)  (33111)
               (3111111)  (42111)
                          (51111)
                          (321111)
                          (411111)
		

Crossrefs

Row sums are A000041.
Number of nonzero entries in row n appears to be A004525(n+1).
Last entry of row n is A008619(n).
Column sums appear to be A029862.
The central column is A035363, skew A035544.
For original alternating sum we have A344651, ordered A097805.
The skew-alternating version is A357638.
The central column of the reverse is A357639, skew A357640.
The ordered version (compositions) is A357645, skew A357646.
The reverse version is A357704, skew A357705.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357629 gives half-alternating sum of prime indices, skew A357630.
A357633 gives half-alternating sum of Heinz partition, skew A357634.

Programs

  • Maple
    b:= proc(n, i, s, t) option remember; `if`(n=0, x^s, `if`(i<1, 0,
          b(n, i-1, s, t)+b(n-i, min(n-i, i), s+`if`(t<2, i, -i), irem(t+1, 4))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=-n..n, 2))(b(n$2, 0$2)):
    seq(T(n), n=0..15);  # Alois P. Heinz, Oct 12 2022
  • Mathematica
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Table[Length[Select[IntegerPartitions[n],halfats[#]==k&]],{n,0,12},{k,-n,n,2}]

Formula

Conjecture: The column sums are A029862.

A357638 Triangle read by rows where T(n,k) is the number of integer partitions of n with skew-alternating sum k, where k ranges from -n to n in steps of 2.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 3, 1, 1, 0, 0, 1, 4, 1, 1, 0, 0, 1, 4, 4, 1, 1, 0, 0, 0, 4, 5, 4, 1, 1, 0, 0, 0, 1, 10, 5, 4, 1, 1, 0, 0, 0, 1, 5, 13, 5, 4, 1, 1, 0, 0, 0, 0, 4, 13, 14, 5, 4, 1, 1, 0, 0, 0, 0, 1, 13, 17, 14, 5, 4, 1, 1
Offset: 0

Views

Author

Gus Wiseman, Oct 10 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 + ....

Examples

			Triangle begins:
  1
  0  1
  0  1  1
  0  1  1  1
  0  0  3  1  1
  0  0  1  4  1  1
  0  0  1  4  4  1  1
  0  0  0  4  5  4  1  1
  0  0  0  1 10  5  4  1  1
  0  0  0  1  5 13  5  4  1  1
  0  0  0  0  4 13 14  5  4  1  1
  0  0  0  0  1 13 17 14  5  4  1  1
  0  0  0  0  1  5 28 18 14  5  4  1  1
Row n = 7 counts the following partitions:
  .  .  .  (322)      (43)      (52)     (61)  (7)
           (331)      (421)     (511)
           (2221)     (3211)    (4111)
           (1111111)  (22111)   (31111)
                      (211111)
		

Crossrefs

Row sums are A000041.
Number of nonzero entries in row n appears to be A004396(n+1).
First nonzero entry of each row appears to converge to A146325.
The central column is A035544, half A035363.
Column sums appear to be A298311.
For original alternating sum we have A344651, ordered A097805.
The half-alternating version is A357637.
The ordered version (compositions) is A357646, half A357645.
The reverse version is A357705, half A357704.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357629 gives half-alternating sum of prime indices, skew A357630.
A357633 gives half-alternating sum of Heinz partition, skew A357634.

Programs

  • Mathematica
    skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}];
    Table[Length[Select[IntegerPartitions[n],skats[#]==k&]],{n,0,12},{k,-n,n,2}]

Formula

Conjecture: The columns are palindromes with sums A298311.

A357625 Numbers k such that the k-th composition in standard order has half-alternating sum 0.

Original entry on oeis.org

0, 14, 15, 44, 45, 46, 52, 53, 54, 59, 61, 152, 153, 154, 156, 168, 169, 170, 172, 179, 181, 185, 200, 201, 202, 204, 211, 213, 217, 230, 231, 234, 235, 239, 242, 243, 247, 254, 255, 560, 561, 562, 564, 568, 592, 593, 594, 596, 600, 611, 613, 617, 625, 656
Offset: 1

Views

Author

Gus Wiseman, Oct 08 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 - ...
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: ()
   14: (1,1,2)
   15: (1,1,1,1)
   44: (2,1,3)
   45: (2,1,2,1)
   46: (2,1,1,2)
   52: (1,2,3)
   53: (1,2,2,1)
   54: (1,2,1,2)
   59: (1,1,2,1,1)
   61: (1,1,1,2,1)
		

Crossrefs

See link for sequences related to standard compositions.
The version for full alternating sum is A344619.
Positions of zeros in A357621.
The reverse version is A357626.
The skew-alternating form is A357627, reverse A357628.
The version for prime indices is A357631.
The version for Heinz numbers of partitions is A357635.
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;
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Select[Range[0,100],halfats[stc[#]]==0&]
  • Python
    from itertools import count, islice
    def comp(n): #row n of A066099 after Franklin T. Adams-Watters
        v,k = [],0
        while n > 0:
            k += 1
            if n%2 == 1:
                v.append(k)
                k = 0
            n = n//2
        return(v[::-1])
    def a_gen():
        for n in count(0):
            c = comp(n)
            x = sum(c[i]*(-1)**(i//2) for i in range(len(c)))
            if x == 0:
                yield(n)
    A357625_list = list(islice(a_gen(), 60)) # John Tyler Rascoe, Jun 01 2024

A357629 Half-alternating sum of the prime indices of n.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 1, 4, 4, 5, 0, 6, 5, 5, 0, 7, 1, 8, -1, 6, 6, 9, -1, 6, 7, 2, -2, 10, 0, 11, 1, 7, 8, 7, -2, 12, 9, 8, -2, 13, -1, 14, -3, 1, 10, 15, 2, 8, 1, 9, -4, 16, -1, 8, -3, 10, 11, 17, -3, 18, 12, 0, 2, 9, -2, 19, -5, 11, 0, 20, 1, 21, 13, 2, -6
Offset: 1

Views

Author

Gus Wiseman, Oct 08 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 - ...
A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The prime indices of 525 are {2,3,3,4} so a(525) = 2 + 3 - 3 - 4 = -2.
		

Crossrefs

The original alternating sum is A316524, reverse A344616.
The version for standard compositions is A357621, reverse A357622.
The skew-alternating form is A357630, reverse A357634.
Positions of zeros are A357631, reverse A357635.
The reverse version is A357633.
These partitions are counted by A357637, skew A357638.
A056239 adds up prime indices, row sums of A112798.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357641 counts comps w/ half-alt sum 0, partitions A357639, even A357642.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Table[halfats[primeMS[n]],{n,30}]

A357640 Number of reversed integer partitions of 2n whose skew-alternating sum is 0.

Original entry on oeis.org

1, 1, 2, 3, 6, 9, 16, 24, 40, 59, 93, 136, 208, 299, 445, 632, 921, 1292, 1848, 2563, 3610, 4954, 6881, 9353, 12835, 17290, 23469, 31357, 42150, 55889, 74463, 98038, 129573, 169476, 222339, 289029, 376618, 486773, 630313, 810285, 1043123, 1334174
Offset: 0

Views

Author

Gus Wiseman, Oct 11 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 + ...

Examples

			The a(0) = 1 through a(5) = 9 partitions:
  ()  (11)  (22)    (33)      (44)        (55)
            (1111)  (2211)    (2222)      (3322)
                    (111111)  (3221)      (4321)
                              (3311)      (4411)
                              (221111)    (222211)
                              (11111111)  (322111)
                                          (331111)
                                          (22111111)
                                          (1111111111)
		

Crossrefs

The non-reverse half-alternating version is A035363/A035444.
The non-reverse version appears to be A035544/A035594.
These partitions are ranked by A357632, half A357631.
The half-alternating version is A357639.
A000041 counts integer partitions (also reversed integer partitions).
A316524 gives alternating sum of prime indices, reverse A344616.
A344651 counts alternating sum of partitions by length, ordered A097805.
A351005 = alternately equal and unequal partitions, compositions A357643.
A351006 = alternately unequal and equal partitions, compositions A357644.
A357621 gives half-alternating sum of standard compositions, skew A357623.
A357629 gives half-alternating sum of prime indices, skew A357630.
A357633 gives half-alternating sum of Heinz partition, skew A357634.
A357637 counts partitions by half-alternating sum, skew A357638.

Programs

  • Mathematica
    skats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[(i+1)/2]),{i,Length[f]}];
    Table[Length[Select[IntegerPartitions[2n],skats[Reverse[#]]==0&]],{n,0,15}]

Extensions

a(31) onwards from Lucas A. Brown, Oct 19 2022

A357642 Number of even-length integer compositions of 2n whose half-alternating sum is 0.

Original entry on oeis.org

1, 0, 1, 4, 13, 48, 186, 712, 2717, 10432, 40222, 155384, 601426, 2332640, 9063380, 35269392, 137438685, 536257280, 2094786870, 8191506136, 32063203590, 125613386912, 492516592620, 1932569186288, 7588478653938, 29816630378368, 117226929901676, 461151757861552
Offset: 0

Views

Author

Gus Wiseman, Oct 12 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 - ...

Examples

			The a(0) = 1 through a(4) = 13 compositions:
  ()  .  (1111)  (1212)  (1313)
                 (1221)  (1322)
                 (2112)  (1331)
                 (2121)  (2213)
                         (2222)
                         (2231)
                         (3113)
                         (3122)
                         (3131)
                         (111311)
                         (112211)
                         (113111)
                         (11111111)
		

Crossrefs

The skew-alternating version appears to be A000984.
For original alternating sum we have A001700/A088218.
The version for partitions of any length is A357639, ranked by A357631.
For length multiple of 4 we have A110145.
These compositions of any length are ranked by A357625, reverse A357626.
A124754 gives alternating sum of standard compositions, reverse A344618.
A357621 = half-alternating sum of standard compositions, reverse A357622.
A357637 counts partitions by half-alternating sum, skew A357638.

Programs

  • Mathematica
    Table[Length[Select[Join @@ Permutations/@IntegerPartitions[2n],EvenQ[Length[#]]&&halfats[#]==0&]],{n,0,9}]
  • PARI
    a(n) = {my(v, res); if(n < 3, return(1 - bitand(n,1))); res = 0; v = vector(2*n, i, binomial(n-1,i-1)); forstep(i = 4, 2*n, 2, lp = i\4 * 2; rp = i - lp; res += v[lp] * v[rp]; ); res } \\ David A. Corneth, Oct 13 2022

Extensions

More terms from Alois P. Heinz, Oct 12 2022

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

Original entry on oeis.org

0, 11, 15, 37, 38, 45, 46, 53, 54, 55, 59, 137, 138, 140, 153, 154, 156, 167, 169, 170, 171, 172, 179, 191, 201, 202, 204, 205, 206, 213, 214, 229, 230, 231, 235, 243, 247, 251, 255, 529, 530, 532, 536, 561, 562, 564, 568, 583, 587, 593, 594, 595, 596, 600
Offset: 1

Views

Author

Gus Wiseman, Oct 08 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 - ...
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: ()
   11: (2,1,1)
   15: (1,1,1,1)
   37: (3,2,1)
   38: (3,1,2)
   45: (2,1,2,1)
   46: (2,1,1,2)
   53: (1,2,2,1)
   54: (1,2,1,2)
   55: (1,2,1,1,1)
   59: (1,1,2,1,1)
		

Crossrefs

See link for sequences related to standard compositions.
The alternating form is A344619.
Positions of zeros in A357622.
The non-reverse version is A357625.
The skew-alternating form is A357628, reverse A357627.
The version for prime indices is A357631.
The version for Heinz numbers of partitions is A357635.
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;
    halfats[f_]:=Sum[f[[i]]*(-1)^(1+Ceiling[i/2]),{i,Length[f]}];
    Select[Range[0,100],halfats[Reverse[stc[#]]]==0&]
Showing 1-10 of 22 results. Next