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-3 of 3 results.

A238424 Number of partitions of n without three consecutive parts in arithmetic progression.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 6, 8, 13, 13, 19, 24, 30, 36, 47, 54, 72, 85, 106, 123, 151, 178, 220, 256, 314, 362, 432, 505, 605, 692, 827, 953, 1121, 1303, 1522, 1729, 2037, 2321, 2691, 3095, 3577, 4061, 4699, 5334, 6126, 6959, 7966, 9005, 10317, 11638, 13252, 14977
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 26 2014

Keywords

Comments

Also the number of partitions of n whose first differences are an anti-run, meaning there are no adjacent equal differences. - Gus Wiseman, Mar 31 2020

Examples

			The a(8) = 13 such partitions are:
01:  [ 3 2 2 1 ]
02:  [ 3 3 1 1 ]
03:  [ 3 3 2 ]
04:  [ 4 2 1 1 ]
05:  [ 4 2 2 ]
06:  [ 4 3 1 ]
07:  [ 4 4 ]
08:  [ 5 2 1 ]
09:  [ 5 3 ]
10:  [ 6 1 1 ]
11:  [ 6 2 ]
12:  [ 7 1 ]
13:  [ 8 ]
		

Crossrefs

Cf. A238433 (partitions avoiding equidistant arithmetic progressions).
Cf. A238571 (partitions avoiding any arithmetic progression).
Cf. A238687.
The version for compositions is A238423, with strict case A325849.
The version for permutations is A295370.
The strict case is A332668.
The Heinz numbers of these partitions are the complement of A333195.
Partitions with equal differences are A049988.

Programs

  • Mathematica
    a[n_,r_,d_] := a[n,r,d] = Block[{j}, If[n == 0, 1, Sum[If[j == r+d, 0, a[n-j, j, j - r]], {j, Min[n, r]}]]]; a[n_] := a[n, 2*n+1, 0]; a /@ Range[0, 100] (* Giovanni Resta, Mar 02 2014 *)
    Table[Length[Select[IntegerPartitions[n],!MemberQ[Differences[#,2],0]&]],{n,0,30}] (* Gus Wiseman, Mar 31 2020 *)

A332668 Number of strict integer partitions of n without three consecutive parts in arithmetic progression.

Original entry on oeis.org

1, 1, 1, 2, 2, 3, 3, 5, 6, 6, 9, 11, 11, 15, 20, 19, 26, 31, 34, 41, 50, 53, 67, 78, 84, 99, 120, 130, 154, 177, 193, 226, 262, 291, 332, 375, 419, 479, 543, 608, 676, 765, 859, 961, 1075, 1202, 1336, 1495, 1672, 1854, 2050, 2301, 2536, 2814, 3142, 3448, 3809
Offset: 0

Views

Author

Gus Wiseman, Mar 28 2020

Keywords

Comments

Also the number of strict integer partitions of n whose first differences are an anti-run, meaning there are no adjacent equal differences.

Examples

			The a(1) = 1 through a(10) = 9 partitions (A = 10):
  (1)  (2)  (3)   (4)   (5)   (6)   (7)    (8)    (9)    (A)
            (21)  (31)  (32)  (42)  (43)   (53)   (54)   (64)
                        (41)  (51)  (52)   (62)   (63)   (73)
                                    (61)   (71)   (72)   (82)
                                    (421)  (431)  (81)   (91)
                                           (521)  (621)  (532)
                                                         (541)
                                                         (631)
                                                         (721)
		

Crossrefs

Anti-run compositions are counted by A003242.
Normal anti-runs of length n + 1 are counted by A005649.
Strict partitions with equal differences are A049980.
Partitions with equal differences are A049988.
The non-strict version is A238424.
The version for permutations is A295370.
Anti-run compositions are ranked by A333489.

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],UnsameQ@@#&&!MatchQ[Differences[#],{_,x_,x_,_}]&]],{n,0,30}]

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
Showing 1-3 of 3 results.