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.

A227614 Number of partitions of n into distinct parts with perimeter n-2.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 7, 8, 9, 11, 13, 14, 17, 19, 21, 25, 28, 32, 37, 42, 47, 55, 61, 69, 78, 88, 98, 112, 124, 140, 157, 176, 196, 221, 245, 274, 305, 340, 377, 420, 465, 517, 573, 634, 702, 777, 858, 949, 1047, 1154, 1273
Offset: 6

Views

Author

Alois P. Heinz, Jul 17 2013

Keywords

Comments

The perimeter is the sum of all parts having less than two neighbors.
a(n) counts all partitions of n into distinct parts where only part 2 has two neighbors.

Examples

			a(6) = 1: [1,2,3].
a(11) = 1: [1,2,3,5].
a(17) = 2: [1,2,3,5,6], [1,2,3,11].
a(19) = 3: [1,2,3,5,8], [1,2,3,6,7], [1,2,3,13].
a(21) = 4: [1,2,3,7,8], [1,2,3,5,10], [1,2,3,6,9], [1,2,3,15].
a(23) = 5: [1,2,3,5,12], [1,2,3,6,11], [1,2,3,7,10], [1,2,3,8,9], [1,2,3,17].
		

Crossrefs

Cf. A227344.

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(i<5, 0,
           b(n, i-1, 0)+`if`(i>n or t=2, 0, b(n-i, i-1, t+1))))
        end:
    a:= n-> b(n-6, n-6, 0):
    seq(a(n), n=6..100);
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[n==0, 1, If[i<5, 0, b[n, i-1, 0] + If[i>n || t==2, 0, b[n-i, i-1, t+1]]]]; a[n_] := b[n-6, n-6, 0]; Table[a[n], {n, 6, 100}] (* Jean-François Alcover, Feb 17 2017, translated from Maple *)

Formula

a(n) = A227344(n,n-2).