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.

Previous Showing 21-24 of 24 results.

A342194 Number of strict compositions of n with equal differences, or strict arithmetic progressions summing to n.

Original entry on oeis.org

1, 1, 1, 3, 3, 5, 7, 7, 7, 13, 11, 11, 17, 13, 15, 25, 17, 17, 29, 19, 23, 35, 25, 23, 39, 29, 29, 45, 33, 29, 55, 31, 35, 55, 39, 43, 65, 37, 43, 65, 51, 41, 77, 43, 51, 85, 53, 47, 85, 53, 65, 87, 61, 53, 99, 67, 67, 97, 67, 59, 119, 61, 71, 113, 75, 79, 123, 67, 79, 117
Offset: 0

Views

Author

Gus Wiseman, Apr 02 2021

Keywords

Examples

			The a(1) = 1 through a(9) = 13 compositions:
  (1)  (2)  (3)    (4)    (5)    (6)      (7)    (8)    (9)
            (1,2)  (1,3)  (1,4)  (1,5)    (1,6)  (1,7)  (1,8)
            (2,1)  (3,1)  (2,3)  (2,4)    (2,5)  (2,6)  (2,7)
                          (3,2)  (4,2)    (3,4)  (3,5)  (3,6)
                          (4,1)  (5,1)    (4,3)  (5,3)  (4,5)
                                 (1,2,3)  (5,2)  (6,2)  (5,4)
                                 (3,2,1)  (6,1)  (7,1)  (6,3)
                                                        (7,2)
                                                        (8,1)
                                                        (1,3,5)
                                                        (2,3,4)
                                                        (4,3,2)
                                                        (5,3,1)
		

Crossrefs

Strict compositions in general are counted by A032020.
The unordered version is A049980.
The non-strict version is A175342.
A000203 adds up divisors.
A000726 counts partitions with alternating parts unequal.
A003242 counts anti-run compositions.
A224958 counts compositions with alternating parts unequal.
A342343 counts compositions with alternating parts strictly decreasing.
A342495 counts compositions with constant quotients.
A342527 counts compositions with alternating parts equal.

Programs

  • Mathematica
    Table[Length[Select[Join@@Permutations/@Select[IntegerPartitions[n],UnsameQ@@#&],SameQ@@Differences[#]&]],{n,0,30}]

Formula

a(n > 0) = A175342(n) - A000005(n) + 1.
a(n > 0) = 2*A049988(n) - 2*A000005(n) + 1 = 2*A049982(n) + 1.

A333631 Number of permutations of {1..n} with three consecutive terms in arithmetic progression.

Original entry on oeis.org

0, 0, 0, 2, 6, 40, 238, 1760, 14076, 131732, 1308670, 14678452, 176166906, 2317481348, 32416648496, 490915956484, 7846449011500, 134291298372632, 2416652824505150, 46141903780094080, 922528719841017424, 19456439433050482412, 427837767407051523776, 9873256397944571377332
Offset: 0

Views

Author

Gus Wiseman, Mar 31 2020

Keywords

Comments

Also permutations whose second differences have at least one zero.

Examples

			The a(3) = 2 and a(4) = 6 permutations:
  (1,2,3)  (1,2,3,4)
  (3,2,1)  (1,4,3,2)
           (2,3,4,1)
           (3,2,1,4)
           (4,1,2,3)
           (4,3,2,1)
		

Crossrefs

The complement is counted by A295370.
The version for prime indices is A333195.
Strict partitions with equal differences are A049980.
Partitions with equal differences are A049988.
Compositions without triples in arithmetic progression are A238423.
Partitions without triples in arithmetic progression are A238424.
Strict partitions without triples in arithmetic progression are A332668.

Programs

  • Mathematica
    Table[Select[Permutations[Range[n]],MatchQ[Differences[#],{_,x_,x_,_}]&]//Length,{n,0,8}]

Formula

a(n) = n! - A295370(n).

Extensions

a(11)-a(21) (using A295370) from Giovanni Resta, Apr 07 2020
a(22)-a(23) (using A295370) from Alois P. Heinz, Jan 27 2024

A049995 Number of arithmetic progressions of 4 or more positive integers, nondecreasing with sum <= n.

Original entry on oeis.org

0, 0, 0, 1, 2, 3, 4, 6, 7, 10, 11, 14, 15, 18, 21, 25, 26, 30, 31, 37, 40, 44, 45, 51, 55, 59, 62, 69, 70, 79, 80, 86, 89, 94, 101, 111, 112, 117, 120, 132, 133, 143, 144, 152, 162, 168, 169, 180, 184, 196, 200, 209, 210, 221, 230, 242, 246, 253, 254, 274, 275, 282, 291, 302, 312, 325, 326, 336
Offset: 1

Views

Author

Keywords

Crossrefs

Formula

From Petros Hadjicostas, Sep 29 2019: (Start)
a(n) = Sum_{k = 1..n} A049994(k).
G.f.: (g.f. of A049994)/(1-x). (End)

Extensions

More terms from Petros Hadjicostas, Sep 29 2019

A342531 Triangle read by rows where T(n,k) is the number of strict integer partitions of n with maximal descent k, n >= 0, 0 <= k <= n.

Original entry on oeis.org

1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 2, 1, 1, 0, 1, 0, 0, 1, 2, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 2, 2, 1, 1, 1, 0, 1, 0, 0, 1, 1, 2, 3, 1, 1, 1, 1, 0, 1, 0, 0
Offset: 0

Views

Author

Gus Wiseman, Mar 25 2021

Keywords

Comments

The maximal descent of an empty or singleton partition is considered to be 0.

Examples

			Triangle begins:
1
1 0
1 0 0
1 1 0 0
1 0 1 0 0
1 1 0 1 0 0
1 1 1 0 1 0 0
1 1 1 1 0 1 0 0
1 0 2 1 1 0 1 0 0
1 2 1 1 1 1 0 1 0 0
1 1 2 2 1 1 1 0 1 0 0
1 1 2 3 1 1 1 1 0 1 0 0
1 1 3 2 3 1 1 1 1 0 1 0 0
1 1 3 3 3 2 1 1 1 1 0 1 0 0
1 1 3 4 3 3 2 1 1 1 1 0 1 0 0
1 3 3 4 4 3 2 2 1 1 1 1 0 1 0 0
1 0 5 5 5 4 3 2 2 1 1 1 1 0 1 0 0
1 1 4 7 5 5 4 2 2 2 1 1 1 1 0 1 0 0
1 2 5 6 7 6 4 4 2 2 2 1 1 1 1 0 1 0 0
1 1 5 9 7 7 6 4 3 2 2 2 1 1 1 1 0 1 0 0
1 1 6 9 9 7 8 5 4 3 2 2 2 1 1 1 1 0 1 0 0
Row n = 15 counts the following strict partitions (empty columns indicated by dots, A..F = 10..15):
  F  87     753   96    762   A5   A41   B4   B31  C3  C21  D2  .  E1  .  .
     654    6432  852   843   861  9321  A32
     54321  6531  7431  951   942
                  7521  8421
		

Crossrefs

The non-strict version is A238353.
A000041 counts partitions (strict: A000009).
A049980 counts strict partitions with equal differences.
A325325 counts partitions with distinct differences (ranking: A325368).
A325545 counts compositions with distinct differences.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&If[Length[#]<=1,k==0,Max[Differences[Reverse[#]]]==k]&]],{n,0,15},{k,0,n}]
Previous Showing 21-24 of 24 results.