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.

A262445 Number of exact 3-colored partitions such that no adjacent parts have the same color.

Original entry on oeis.org

0, 0, 0, 6, 24, 72, 186, 438, 990, 2142, 4560, 9492, 19620, 40068, 81534, 164892, 332808, 669528, 1345554, 2699448, 5412636, 10843038, 21714972, 43467342, 86995428, 174069306, 348265164, 696694692, 1393652298, 2787646380, 5575837836, 11152384044, 22305891948, 44613248352, 89228806704, 178460625402, 356925987924
Offset: 0

Views

Author

Ran Pan, Sep 23 2015

Keywords

Comments

a(1) = a(2) = 0 because we need to use exactly three colors, which means the number of parts should be greater than two.
All terms are multiples of 6.

Examples

			a(3)=6 because there are three partitions of 3 and there are no ways to color [3] or [2,1] but there are six ways to color [1,1,1].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, k) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1, k) +`if`(i>n, 0, k*b(n-i, i, k))))
        end:
    a:= n-> `if`(n=0, 0, b(n$2, 2)/2*3-6*b(n$2, 1)+3):
    seq(a(n), n=0..40);  # Alois P. Heinz, Sep 23 2015
  • Mathematica
    b[n_, i_, k_] := b[n, i, k] = If[n == 0, 1, If[i < 1, 0, b[n, i - 1, k] + If[i > n, 0, k*b[n - i, i, k]]]]; a[n_] := If[n == 0, 0, b[n, n, 2]/2*3 - 6*b[n, n, 1] + 3]; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Feb 07 2017, after Alois P. Heinz *)

Formula

G.f.: 3/2*Product_{k>=1} (1/(1-2*x^k)) - 6*Product_{k>=1} (1/(1-x^k)) + 3/(1-x) + 3/2.
a(n) = A262444(n) - 6*A000041(n) + 3, for n >= 1.
a(n) = 6 * A262495(n,3). - Alois P. Heinz, Sep 24 2015