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.

A114900 Number of compositions of n such that no two adjacent parts are equal, allowing 0.

This page as a plain text file.
%I A114900 #12 Feb 08 2017 08:49:53
%S A114900 2,4,8,24,60,152,400,1032,2656,6876,17776,45912,118664,306680,792480,
%T A114900 2047984,5292564,13677160,35345112,91340568,236046088,610000528,
%U A114900 1576390448,4073776744,10527631456,27205966108,70306845872,181690021616,469531293752,1213383282936
%N A114900 Number of compositions of n such that no two adjacent parts are equal, allowing 0.
%H A114900 Alois P. Heinz, <a href="/A114900/b114900.txt">Table of n, a(n) for n = 0..1000</a>
%H A114900 A. Knopfmacher and H. Prodinger, <a href="http://www.sciencedirect.com/science/article/pii/S0195669898902165">On Carlitz compositions</a>, European Journal of Combinatorics, Vol. 19, No. 5, Jul 1998, pp. 579-589.
%F A114900 G.f.: 2*B(x)/(2-B(x)) where B(x) is g.f. of A003242.
%e A114900 The 8 compositions of 2 are 2, 2+0, 1+0+1, 1+0+1+0, 0+2, 0+2+0, 0+1+0+1, 0+1+0+1+0.
%p A114900 b:= proc(n, i) option remember; `if`(n=0, `if`(i=0, 1, 2),
%p A114900       add(`if`(i=j, 0, b(n-j, `if`(j>n-j, -1, j))), j=0..n))
%p A114900     end:
%p A114900 a:= n-> b(n, -1):
%p A114900 seq(a(n), n=0..30);  # _Alois P. Heinz_, Sep 04 2015
%t A114900 b[n_, i_] := b[n, i] = If[n==0, If[i==0, 1, 2], Sum[If[i==j, 0, b[n-j, If[j > n-j, -1, j]]], {j, 0, n}]]; a[n_] := b[n, -1]; Table[a[n], {n, 0, 30}] (* _Jean-François Alcover_, Feb 08 2017, after _Alois P. Heinz_ *)
%Y A114900 Cf. A003242, A114903.
%K A114900 nonn
%O A114900 0,1
%A A114900 _Christian G. Bower_, Jan 05 2006
%E A114900 Replaced broken link, _Vaclav Kotesovec_, May 01 2014