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.

A238571 Number of partitions of n avoiding any 3-term arithmetic progression.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 6, 8, 12, 12, 19, 23, 27, 34, 43, 49, 62, 74, 88, 104, 127, 145, 176, 199, 239, 272, 324, 378, 430, 490, 583, 654, 750, 876, 988, 1112, 1291, 1441, 1642, 1877, 2121, 2358, 2682, 2977, 3365, 3830, 4237, 4734, 5357, 5868, 6590, 7398, 8182, 9049
Offset: 0

Views

Author

Joerg Arndt and Alois P. Heinz, Feb 28 2014

Keywords

Examples

			a(3) = 2: [2,1], [3].
a(4) = 4: [2,1,1], [2,2], [3,1], [4].
a(5) = 5: [2,2,1], [3,1,1], [3,2], [4,1], [5].
a(6) = 6: [2,2,1,1], [3,3], [4,1,1], [4,2], [5,1], [6].
a(7) = 8: [3,2,2], [3,3,1], [4,2,1], [4,3], [5,1,1], [5,2], [6,1], [7].
a(8) = 12: [3,3,1,1], [3,3,2], [4,2,1,1], [4,2,2], [4,3,1], [4,4], [5,2,1], [5,3], [6,1,1], [6,2], [7,1], [8].
		

Crossrefs

Cf. A003407 (the same for permutations).
Cf. A178932 (the same for strict partitions).
Cf. A238569 (the same for compositions).
Cf. A238433 (partitions avoiding equidistant 3-term arithmetic progressions).
Cf. A238424 (partitions avoiding three consecutive parts in arithmetic progression).
Cf. A238687.

Programs

  • Mathematica
    a[n_] := a[n] = Count[IntegerPartitions[n], P_ /; {} == SequencePosition[P, {_, i_, _, j_, _, k_, _} /; j - i == k - j, 1]];
    Table[Print[n, " ", a[n]]; a[n], {n, 0, 50}] (* Jean-François Alcover, Oct 29 2021 *)