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.

A032005 "AFK" (ordered, size, unlabeled) transform of 2,2,2,2,...

Original entry on oeis.org

1, 2, 2, 10, 10, 18, 66, 74, 122, 178, 610, 666, 1146, 1586, 2450, 6778, 8026, 12738, 18258, 27194, 36938, 96226, 110578, 177930, 246474, 368354, 491426, 717418, 1543978, 1874418, 2855394, 3985322, 5765786, 7791250, 11066626, 14636538, 29870490, 35722514
Offset: 0

Views

Author

Keywords

Comments

Number of compositions of n into distinct parts of 2 kinds. a(3) = 10: 3, 3', 21, 21', 2'1, 2'1', 12, 12', 1'2, 1'2'. - Alois P. Heinz, Sep 05 2015

Crossrefs

a(n) = 2 * A032043(n) - 2 for n>0.

Programs

  • Maple
    b:= proc(n, i, p) option remember;
          `if`(n=0, p!, `if`(i<1, 0, b(n, i-1, p)+
          `if`(i>n, 0, 2*b(n-i, i-1, p+1))))
        end:
    a:= n-> b(n$2, 0):
    seq(a(n), n=0..40);  # Alois P. Heinz, Sep 05 2015
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!, If[i < 1, 0, b[n, i - 1, p] + If[i > n, 0, 2*b[n - i, i - 1, p + 1]]]];
    a[n_] := b[n, n, 0];
    a /@ Range[0, 40] (* Jean-François Alcover, Sep 11 2019, after Alois P. Heinz *)
  • PARI
    seq(n)={apply(p->subst(serlaplace(p), y, 1), Vec(prod(k=1, n, 1 + 2*x^k*y + O(x*x^n))))} \\ Andrew Howroyd, Jun 21 2018

Extensions

a(0)=1 prepended by Alois P. Heinz, Sep 05 2015