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 A158943 #36 Jan 22 2025 09:31:02 %S A158943 1,1,3,5,10,19,36,69,131,250,476,907,1728,3292,6272,11949,22765,43371, %T A158943 82629,157422,299915,571388,1088589,2073943,3951206,7527704,14341527, %U A158943 27322992,52054840,99173120,188941273,359964521,685792227,1306548149 %N A158943 INVERT transform of A027656: (1, 0, 2, 0, 3, 0, 4, 0, 5, ...). %C A158943 Equals row sums of triangle A158945. %C A158943 Number of compositions of n into odd parts where there is 1 sort of part 1, 2 sorts of part 3, 3 sorts of part 5, ..., k sorts of part 2*k-1. - _Joerg Arndt_, Aug 04 2014 %H A158943 Vincenzo Librandi, <a href="/A158943/b158943.txt">Table of n, a(n) for n = 1..1000</a> %H A158943 Jean-Luc Baril, Nathanaël Hassler, Sergey Kirgizov, and José L. Ramírez, <a href="https://arxiv.org/abs/2402.04851">Grand zigzag knight's paths</a>, arXiv:2402.04851 [math.CO], 2024. See p. 18. %H A158943 Jia Huang, <a href="https://arxiv.org/abs/2501.07463">A coin flip game and generalizations of Fibonacci numbers</a>, arXiv:2501.07463 [math.CO], 2025. See p. 9. %H A158943 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,0,-1). %F A158943 INVERT transform of (1, 0, 2, 0, 3, 0, 4, ...); i.e., the natural numbers interleaved with zeros. %F A158943 From _R. J. Mathar_, Apr 02 2009: (Start) %F A158943 a(n) = a(n-1) + 2*a(n-2) - a(n-4). %F A158943 G.f.: x/(1 - x - 2*x^2 + x^4). (End) %F A158943 The sequence is the second INVERT transform of (1, -1, 3, -5, 10, -19, ...). - _Gary W. Adamson_, Jul 08 2019 %F A158943 a(n) = Sum_{k=0..floor(n/2)} binomial(2*n-3*k-1,k). - _Seiichi Manyama_, Jun 12 2024 %e A158943 The INVERT transform of (1, N, ...) begins (1, (N+1), ...) so that we have (1, 1, ...) placed in ascending magnitude in the bottom row. In the top row we place an equal number of descending terms: (..., 0, 3, 0, 2, 0, 1). Take the dot product of terms in top and bottom rows, adding the result to the next term A027656: (1, 0, 2, 0, 3, ...). a(6) = 19 given: 3, 0, 2, 0, 1 1, 1, 3, 5, 10 Dot product of top row terms * bottom row terms = (1, 0, 2, 0, 3) dot (1, 1, 3, 5, 10) = (3 + 0 + 6 + 0 + 10) = 19, which is added to the next term in (1, 0, 2, 0, 3, ...); i.e., (an 0) = 19. %p A158943 A027656 := proc(n) if type(n,odd) then 0; else n/2+1 ; fi; end: L := [seq(A027656(n), n=0..100)] ; read("transforms"); INVERT(L) ; # _R. J. Mathar_, Apr 02 2009 %t A158943 LinearRecurrence[{1, 2, 0, -1}, {1, 1, 3, 5}, 40] (* _Vincenzo Librandi_, Jul 09 2019 *) %o A158943 (Magma) I:=[1,1,3,5]; [n le 4 select I[n] else Self(n-1)+2*Self(n-2)-Self(n-4): n in [1..40]]; // _Vincenzo Librandi_, Jul 09 2019 %o A158943 (PARI) my(x='x+O('x^40)); Vec(x/(1-x-2*x^2+x^4)) \\ _G. C. Greubel_, Jul 12 2019 %o A158943 (Sage) a=(x/(1-x-2*x^2+x^4)).series(x, 40).coefficients(x, sparse=False); a[1:] # _G. C. Greubel_, Jul 12 2019 %o A158943 (GAP) a:=[1,1,3,5];; for n in [5..40] do a[n]:=a[n-1]+2*a[n-2]-a[n-4]; od; a; # _G. C. Greubel_, Jul 12 2019 %Y A158943 Cf. A027656, A052535, A158944, A158945. %K A158943 nonn %O A158943 1,3 %A A158943 _Gary W. Adamson_, Mar 31 2009 %E A158943 Extended by _R. J. Mathar_, Apr 02 2009