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 A052942 #53 Jul 02 2025 16:01:58 %S A052942 1,1,1,1,3,5,7,9,15,25,39,57,87,137,215,329,503,777,1207,1865,2871, %T A052942 4425,6839,10569,16311,25161,38839,59977,92599,142921,220599,340553, %U A052942 525751,811593,1252791,1933897,2985399,4608585,7114167,10981961 %N A052942 Expansion of 1/((1+x)*(1-2*x+2*x^2-2*x^3)). %C A052942 The compositions of n in which each natural number is colored by one of p different colors are called p-colored compositions of n. For n >= 4, 3*a(n-4) equals the number of 3-colored compositions of n with all parts >= 4, such that no adjacent parts have the same color. - _Milan Janjic_, Nov 27 2011 %C A052942 a(n+3) equals the number of ternary words of length n having at least 3 zeros between every two successive nonzero letters. - _Milan Janjic_, Mar 09 2015 %H A052942 G. C. Greubel, <a href="/A052942/b052942.txt">Table of n, a(n) for n = 0..1000</a> %H A052942 INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=933">Encyclopedia of Combinatorial Structures 933</a> %H A052942 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,0,2). %F A052942 G.f.: 1/(1-x-2*x^4). %F A052942 a(n) = a(n-1) + 2*a(n-4), with a(1)=1, a(0)=1, a(2)=1, a(3)=1. %F A052942 a(n) = Sum_{alpha=RootOf(-1+_Z+2*_Z^4)} (1/539)*(27 + 72*alpha^3 + 96*alpha^2 + 128*alpha)*alpha^(-1-n)). %F A052942 a(n) = Sum_{k=0..floor(n/3)} A128099(n-2*k, k). - _Johannes W. Meijer_, Aug 28 2013 %F A052942 a(n) = hypergeom([(1-n)/4,(2-n)/4,(3-n)/4,-n/4],[(1-n)/3,(2-n)/3,-n/3],-512/27) for n>=9. - _Peter Luschny_, Mar 09 2015 %p A052942 spec := [S,{S=Sequence(Union(Z,Prod(Union(Z,Z),Z,Z,Z)))},unlabeled ]: seq(combstruct[count ](spec,size=n), n=0..20); %p A052942 seq(add(binomial(n-3*k,k)*2^k, k=0..floor(n/3)), n=0..39); # _Zerinvary Lajos_, Apr 03 2007 %p A052942 with(combstruct): SeqSeqSeqL := [T, {T=Sequence(S), S=Sequence(U, card >= 1), U=Sequence(Z, card >3)}, unlabeled]: seq(count(SeqSeqSeqL, size=j+4), j=0..39); # _Zerinvary Lajos_, Apr 04 2009 %p A052942 a := n -> `if`(n<9, [1, 1, 1, 1, 3, 5, 7, 9, 15][n+1], hypergeom([(1-n)/4,(2-n)/4,(3-n)/4,-n/4], [(1-n)/3,(2-n)/3,-n/3], -512/27)): %p A052942 seq(simplify(a(n)),n=0..39); # _Peter Luschny_, Mar 09 2015 %t A052942 CoefficientList[Series[1/(1-x-2*x^4), {x,0,40}], x] (* _Vincenzo Librandi_, Mar 10 2015 *) %t A052942 LinearRecurrence[{1,0,0,2},{1,1,1,1},50] (* _Harvey P. Dale_, Aug 17 2024 *) %o A052942 (PARI) Vec( 1/(1-x-2*x^4) + O(x^66)) \\ _Joerg Arndt_, Aug 28 2013 %o A052942 (Magma) I:=[1,1,1,1]; [n le 4 select I[n] else Self(n-1)+2*Self(n-4): n in [1..40]]; // _Vincenzo Librandi_, Mar 10 2015 %o A052942 (Sage) (1/(1-x-2*x^4)).series(x, 40).coefficients(x, sparse=False) # _G. C. Greubel_, Jun 12 2019 %o A052942 (GAP) a:=[1,1,1,1];; for n in [5..40] do a[n]:=a[n-1]+2*a[n-4]; od; a; # _G. C. Greubel_, Jun 12 2019 %Y A052942 Column k=3 of A143453. %K A052942 easy,nonn %O A052942 0,5 %A A052942 encyclopedia(AT)pommard.inria.fr, Jan 25 2000 %E A052942 More terms from _James Sellers_, Jun 06 2000