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 A135851 #38 Aug 01 2022 20:44:08 %S A135851 -1,0,1,0,0,1,1,1,2,3,4,6,9,13,19,28,41,60,88,129,189,277,406,595,872, %T A135851 1278,1873,2745,4023,5896,8641,12664,18560,27201,39865,58425,85626, %U A135851 125491,183916,269542,395033,578949,848491,1243524,1822473,2670964,3914488,5736961,8407925 %N A135851 a(n) = n-1, if n <= 2, otherwise A107458(n-1) + A107458(n-2). %H A135851 Reinhard Zumkeller, <a href="/A135851/b135851.txt">Table of n, a(n) for n = 0..1000</a> %H A135851 C. K. Fan, <a href="http://dx.doi.org/10.1090/S0894-0347-97-00222-1">Structure of a Hecke algebra quotient</a>, J. Amer. Math. Soc. 10 (1997), no. 1, 139-167. [Page 156, f_n.] %H A135851 <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1). %F A135851 From _R. J. Mathar_, Jul 26 2010: (Start) %F A135851 a(n) = +a(n-1) +a(n-3). %F A135851 a(n) = A078012(n-2), for n>=2. %F A135851 G.f.: (-1 + x + x^2) / (1 - x - x^3). (End) %F A135851 From _Michael Somos_, Jan 08 2014: (Start) %F A135851 a(n) = A077961(2-n) for all n in Z. %F A135851 a(n)^2 - a(n-1)*a(n+1) = A077961(n-5). (End) %F A135851 a(n) = A000930(n+2) - 2*A000930(n). - _G. C. Greubel_, Aug 01 2022 %e A135851 G.f. = -1 + x^2 + x^5 + x^6 + x^7 + 2*x^8 + 3*x^9 + 4*x^10 + 6*x^11 + ... %t A135851 LinearRecurrence[{1,0,1},{-1,0,1},50] (* _Vladimir Joseph Stephan Orlovsky_, Jan 31 2012 *) %t A135851 a[ n_] := If[ n < 3, SeriesCoefficient[ 1 / (1 + x^2 - x^3), {x, 0, 2 - n}], SeriesCoefficient[ x^5 / (1 - x - x^3), {x, 0, n}]]; (* _Michael Somos_, Jan 08 2014 *) %o A135851 (Haskell) %o A135851 a135851 n = a135851_list !! n %o A135851 a135851_list = -1 : 0 : 1 : zipWith (+) a135851_list (drop 2 a135851_list) %o A135851 -- _Reinhard Zumkeller_, Mar 23 2012 %o A135851 (PARI) {a(n) = if( n<3, polcoeff( 1 / (1 + x^2 - x^3) + x * O(x^(2-n)), 2-n), polcoeff( x^5 / (1 - x - x^3) + x * O(x^n), n))}; /* _Michael Somos_, Jan 08 2014 */ %o A135851 (Magma) [n le 3 select n-2 else Self(n-1) + Self(n-3): n in [1..61]]; // _G. C. Greubel_, Aug 01 2022 %o A135851 (SageMath) %o A135851 def A000930(n): return sum(binomial(n-2*j,j) for j in (0..(n//3))) %o A135851 def A135851(n): return A000930(n+2) -2*A000930(n) %o A135851 [A135851(n) for n in (0..60)] # _G. C. Greubel_, Aug 01 2022 %Y A135851 Cf. A000930, A013979, A077961, A078012, A107458. %K A135851 sign,easy %O A135851 0,9 %A A135851 _N. J. A. Sloane_, Mar 08 2008