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.

A091618 Number of compositions (ordered partitions) of n such that some part is repeated consecutively 4 times and no part is repeated consecutively more than 4 times.

This page as a plain text file.
%I A091618 #12 May 21 2018 04:13:27
%S A091618 1,0,2,4,10,22,46,101,218,466,991,2093,4405,9232,19288,40169,83416,
%T A091618 172806,357170,736710,1516714,3117133,6396116,13105012,26814264,
%U A091618 54795330,111842771,228030558,464439943,945029466,1921169854,3902239742,7919743405,16061152291
%N A091618 Number of compositions (ordered partitions) of n such that some part is repeated consecutively 4 times and no part is repeated consecutively more than 4 times.
%H A091618 Alois P. Heinz, <a href="/A091618/b091618.txt">Table of n, a(n) for n = 4..1000</a>
%p A091618 b:= proc(n, l, k) option remember; `if`(n=0, 1, add(`if`(
%p A091618       i=l, 0, add(b(n-i*j, i, k), j=1..min(k, n/i))), i=1..n))
%p A091618     end:
%p A091618 a:= n-> b(n, 0, 4) -b(n, 0, 3):
%p A091618 seq(a(n), n=4..50);  # _Alois P. Heinz_, Feb 08 2017
%t A091618 b[n_, l_, k_] := b[n, l, k] = If[n == 0, 1, Sum[If[i == l, 0, Sum[b[n - i*j, i, k], {j, 1, Min[k, n/i]}]], {i, 1, n}]];
%t A091618 a[n_] :=  b[n, 0, 4] - b[n, 0, 3];
%t A091618 Table[a[n], {n, 4, 50}] (* _Jean-François Alcover_, May 21 2018, after _Alois P. Heinz_ *)
%Y A091618 Column k=4 of A091613.
%K A091618 nonn
%O A091618 4,3
%A A091618 _Christian G. Bower_, Jan 23 2004