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.
%I A232394 #25 Jun 27 2025 00:46:55 %S A232394 1,1,2,4,7,15,29,57,111,218,429,841,1651,3239,6355,12473,24475,48029, %T A232394 94249,184946,362932,712194,1397569,2742507,5381729,10560797,20723884, %U A232394 40667338,79803197,156601100,307304821,603036937,1183364302,2322164658,4556879623 %N A232394 The number of compositions of n with no more than 3 consecutive identical parts (summands). %H A232394 Alois P. Heinz, <a href="/A232394/b232394.txt">Table of n, a(n) for n = 0..1000</a> %F A232394 The g.f. for the number of compositions of n with no more than m consecutive identical parts is 1/( 1 - sum_{j>=1} x^j*(1 - x^(j*m))/(1 - x^j)/ (1 + x^j*(1 - x^(j*m))/(1 - x^j)) ); set m = 3 for this sequence. %F A232394 a(n) ~ c * d^n, where d=1.962341312018097075518216734398388302205091029921968626465436021267458..., c=0.506212613637348069558928622560083229757824786467201325660889396545904... - _Vaclav Kotesovec_, May 01 2014 %e A232394 a(6) = 29 because there are 32 compositions of 6 but we exclude: 1+1+1+1+1+1, 1+1+1+1+2, 2+1+1+1+1. %p A232394 b:= proc(n, t, c) option remember; %p A232394 `if`(n=0, 1, add(`if`(t<>j, b(n-j, j, 1), %p A232394 `if`(c<3, b(n-j, j, c+1), 0)), j=1..n)) %p A232394 end: %p A232394 a:= n-> b(n, 0, 1): %p A232394 seq(a(n), n=0..50); # _Alois P. Heinz_, Nov 24 2013 %t A232394 nn=34; CoefficientList[Series[1/(1-Sum[(z^j+z^(2j)+z^(3j))/(1+z^j+z^(2j)+z^(3j)),{j,1,nn}]),{z,0,nn}],z] %Y A232394 Cf. A003242, A128695, A232464. %K A232394 nonn %O A232394 0,3 %A A232394 _Geoffrey Critzer_, Nov 23 2013