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.

A165157 Zero followed by partial sums of A133622.

This page as a plain text file.
%I A165157 #32 Sep 08 2022 08:45:47
%S A165157 0,1,3,4,7,8,12,13,18,19,25,26,33,34,42,43,52,53,63,64,75,76,88,89,
%T A165157 102,103,117,118,133,134,150,151,168,169,187,188,207,208,228,229,250,
%U A165157 251,273,274,297,298,322,323,348,349,375,376,403,404,432,433,462,463,493,494,525
%N A165157 Zero followed by partial sums of A133622.
%C A165157 A133622 is a toothed sequence.
%C A165157 Interleaving of A055998 and A034856.
%H A165157 Vincenzo Librandi, <a href="/A165157/b165157.txt">Table of n, a(n) for n = 0..10000</a>
%H A165157 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,2,-2,-1,1).
%F A165157 a(0) = 0, a(2*n) = a(2*n-1) + n + 1, a(2*n+1) = a(2*n) + 1.
%F A165157 a(n) = (n^2+10*n)/8 if n is even, a(n) = (n^2+8*n-1)/8 if n is odd.
%F A165157 a(2*k) = A055998(k) = k*(k+5)/2; a(2*k+1) = A034856(k+1) = k*(k+5)/2+1.
%F A165157 a(n) = 2*a(n-2)-a(n-4)+1 for n > 3; a(0)=0, a(1)=1, a(2)=3, a(3)=4. - _Klaus Brockhaus_, Sep 06 2009
%F A165157 a(n) = (2*n*(n+9)-1+(2*n+1)*(-1)^n)/16. - _Klaus Brockhaus_, Sep 06 2009
%F A165157 a(n) = n+binomial(1+floor(n/2),2). - _Mircea Merca_, Feb 18 2012
%F A165157 G.f.: x*(1+2*x-x^2-x^3)/((1-x)^3*(1+x)^2). - _Klaus Brockhaus_, Sep 06 2009
%F A165157 From _Stefano Spezia_, Jul 10 2020: (Start)
%F A165157 E.g.f.: (x*(9 + x)*cosh(x) + (-1 + 11*x + x^2)*sinh(x))/8.
%F A165157 a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 4. (End)
%e A165157 From _Stefano Spezia_, Jul 10 2020: (Start)
%e A165157 Illustration of the initial terms for n > 0:
%e A165157 o    o      o      o         o        o
%e A165157      o o    o o    o o       o o      o o
%e A165157             o      o         o        o
%e A165157                    o o o     o o o    o o o
%e A165157                              o        o
%e A165157                                       o o o o
%e A165157 (1)  (3)   (4)    (7)       (8)      (12)
%e A165157 (End)
%o A165157 (Magma) m:=60; T:=[ 1+(1+(-1)^n)*n/4: n in [1..m] ]; [0] cat [ n eq 1 select T[1] else Self(n-1)+T[n]: n in [1..m] ]; // _Klaus Brockhaus_, Sep 06 2009
%o A165157 (Magma) [ n le 2 select n-1 else n le 4 select n else 2*Self(n-2)-Self(n-4)+1: n in [1..61] ]; // _Klaus Brockhaus_, Sep 06 2009
%o A165157 (Haskell)
%o A165157 a165157 n = a165157_list !! n
%o A165157 a165157_list = scanl (+) 0 a133622_list
%o A165157 -- _Reinhard Zumkeller_, Feb 20 2015
%Y A165157 Equals -1+A101881.
%Y A165157 a(n) = A117142(n+2)-2 = A055802(n+6)-3 = A114220(n+5)-3 = A134519(n+3)-3.
%Y A165157 Cf. A133622, A055998, A034856.
%K A165157 nonn,easy
%O A165157 0,3
%A A165157 _Jaroslav Krizek_, Sep 05 2009
%E A165157 Edited and extended by _Klaus Brockhaus_, Sep 06 2009