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 A119407 #31 Sep 08 2022 08:45:25 %S A119407 1,3,7,15,31,62,122,238,462,894,1727,3333,6429,12397,23901,46076, %T A119407 88820,171212,330028,636156,1226237,2363655,4556099,8782171,16928187, %U A119407 32630138,62896622,121237146,233692122,450456058,868281979,1673667337,3226097529,6218502937,11986549817,23104817656 %N A119407 Number of nonempty subsets of {1,2,...,n} with no gap of length greater than 4 (a set S has a gap of length d if a and b are in S but no x with a < x < b is in S, where b-a=d). %C A119407 The numbers of subsets of {1,2,...,n} with no gap of length greater than d, for d=1,2 and 3, seem to be given in A000217, A001924 and A062544, respectively. %H A119407 G. C. Greubel, <a href="/A119407/b119407.txt">Table of n, a(n) for n = 1..1000</a> %H A119407 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (3,-2,0,0,-1,1). %F A119407 G.f. for number of nonempty subsets of {1,2,...,n} with no gap of length greater than d is x/((1-x)*(1-2*x+x^(d+1))). - _Vladeta Jovovic_, Apr 27 2008 %F A119407 From _Michael Somos_, Dec 28 2012: (Start) %F A119407 G.f.: x/((1-x)^2*(1-x-x^2-x^3-x^4)) = x/((1-x)*(1-2*x+x^5)). %F A119407 First difference is A107066. (End) %F A119407 a(n-3) = Sum_{k=0..n} (n-k)*A000078(k) for n>3. - _Greg Dresden_, Jan 01 2021 %e A119407 G.f. = x + 3*x^2 + 7*x^3 + 15*x^4 + 31*x^5 + 62*x^6 + 122*x^7 + 238*x^8 + 462*x^9 + ... %t A119407 Rest@CoefficientList[Series[x/((1-x)*(1-2*x+x^5)), {x, 0, 40}], x] (* _G. C. Greubel_, Jun 05 2019 *) %t A119407 LinearRecurrence[{3,-2,0,0,-1,1},{1,3,7,15,31,62},40] (* _Harvey P. Dale_, Dec 04 2019 *) %o A119407 (PARI) {a(n) = if( n<0, n = -n; polcoeff( x^5 / ((1 - x)^2 * (1 + x + x^2 + x^3 - x^4)) + x * O(x^n), n), polcoeff( x / ((1 - x)^2 * (1 - x - x^2 - x^3 - x^4)) + x * O(x^n), n))} /* _Michael Somos_, Dec 28 2012 */ %o A119407 (PARI) my(x='x+O('x^40)); Vec(x/((1-x)*(1-2*x+x^5))) \\ _G. C. Greubel_, Jun 05 2019 %o A119407 (Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( x/((1-x)*(1-2*x+x^5)) )); // _G. C. Greubel_, Jun 05 2019 %o A119407 (Sage) a=(x/((1-x)*(1-2*x+x^5))).series(x, 40).coefficients(x, sparse=False); a[1:] # _G. C. Greubel_, Jun 05 2019 %Y A119407 Cf. A000217, A001924, A062544, A107066. %K A119407 nonn %O A119407 1,2 %A A119407 _John W. Layman_, Jul 25 2006 %E A119407 Terms a(25) onward added by _G. C. Greubel_, Jun 05 2019