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.

A035536 Number of partitions of n with equal number of parts congruent to each of 1 and 2 (mod 3).

Original entry on oeis.org

1, 0, 0, 2, 0, 0, 6, 0, 0, 14, 0, 0, 32, 0, 0, 66, 0, 0, 134, 0, 0, 256, 0, 0, 480, 0, 0, 868, 0, 0, 1540, 0, 0, 2664, 0, 0, 4536, 0, 0, 7574, 0, 0, 12474, 0, 0, 20234, 0, 0, 32428, 0, 0, 51324, 0, 0, 80388, 0, 0, 124582, 0, 0, 191310, 0, 0, 291114, 0, 0, 439394, 0, 0, 657936, 0, 0
Offset: 0

Views

Author

Keywords

Crossrefs

Trisection gives: A035592.

Programs

  • Maple
    b:= proc(n, i, c) option remember; `if`(n=0,
          `if`(c=0, 1, 0), `if`(i<1, 0, b(n, i-1, c)+
           b(n-i, min(n-i, i), c+[0, 1, -1][1+irem(i, 3)])))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..70);  # Alois P. Heinz, Sep 04 2020
  • Mathematica
    equalQ[partit_] := Total[Switch[Mod[#, 3], 0, 0, 1, 1, 2, -1]& /@ partit] == 0; a[n_] := If[Mod[n, 3] != 0, 0, Select[IntegerPartitions[n], equalQ] // Length]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 71}] (* Jean-François Alcover, Dec 07 2016 *)

Extensions

More terms from David W. Wilson