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.

A120118 a(n) is the number of binary strings of length n such that no subsequence of length 5 or less contains 3 or more ones.

This page as a plain text file.
%I A120118 #25 May 06 2023 09:01:05
%S A120118 1,2,4,7,11,16,26,43,71,116,186,300,487,792,1287,2087,3382,5484,8898,
%T A120118 14438,23423,37993,61625,99965,162165,263065,426736,692229,1122903,
%U A120118 1821538,2954849,4793266,7775472,12613097,20460538,33190414,53840404
%N A120118 a(n) is the number of binary strings of length n such that no subsequence of length 5 or less contains 3 or more ones.
%H A120118 G. C. Greubel, <a href="/A120118/b120118.txt">Table of n, a(n) for n = 0..1000</a>
%H A120118 Kees Immink and Kui Cai, <a href="https://doi.org/10.1109/LCOMM.2020.2993467">Properties and constructions of energy-harvesting sliding-window constrained codes</a>, IEEE Comm. Lett., May 2020.
%H A120118 <a href="/index/Rec#order_10">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,0,2,0,0,-1,0,-1).
%F A120118 a(n) = a(n-1) + a(n-3) + 2*a(n-5) - a(n-8) - a(n-10).
%F A120118 G.f.: 1 + x*(1+x+x^2)*(2+x^2+x^3-x^4-x^5-x^7)/(1-x-x^3-2*x^5+x^8+x^10). - _R. J. Mathar_, Nov 28 2011
%e A120118 This sequence is similar to A118647 - where no subsequence of length 4 contains 3 ones. It is obvious that the first 4 terms of these two sequences are the same. There are only 3 sequences of length 5 that contain 3 ones such that no subsequence of length 4 contains 3 ones: 10101, 11001, 10011. Hence the fifth term for this sequence is 3 less than the corresponding term of A118647.
%t A120118 LinearRecurrence[{1,0,1,0,2,0,0,-1,0,-1}, {1,2,4,7,11,16,26,43,71,116, 186}, 50] (* _Harvey P. Dale_, Nov 27 2013 *)
%o A120118 (Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( 1 +x*(1 +x+x^2)*(2+x^2+x^3-x^4-x^5-x^7)/(1-x-x^3-2*x^5+x^8+x^10) )); // _G. C. Greubel_, May 05 2023
%o A120118 (SageMath)
%o A120118 def A120118_list(prec):
%o A120118     P.<x> = PowerSeriesRing(ZZ, prec)
%o A120118     return P( 1 +x*(1+x+x^2)*(2+x^2+x^3-x^4-x^5-x^7)/(1-x-x^3-2*x^5 +
%o A120118      x^8+x^10) ).list()
%o A120118 A120118_list(40) # _G. C. Greubel_, May 05 2023
%Y A120118 Cf. A118647, A133523, A133551, A334251, A335247.
%K A120118 nonn,easy
%O A120118 0,2
%A A120118 _Tanya Khovanova_, Aug 15 2006, Oct 11 2006