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 A180046 #25 Feb 20 2025 12:53:22 %S A180046 1,2,3,4,4,5,8,11,12,14,21,30,35,40,56,81,100,115,152,218,281,330,419, %T A180046 588,780,941,1168,1595,2148,2662,3277,4358,5891,7472,9216,11993,16140, %U A180046 20835,25904,33202,44273,57810,72643,92308,121748,159893,203096,257259 %N A180046 a(n+1) = a(n-3) + a(n-2) - a(n-1) + a(n) starting with 1, 2, 3, 4. %H A180046 Reinhard Zumkeller, <a href="/A180046/b180046.txt">Table of n, a(n) for n = 1..1000</a> %H A180046 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,-1,1,1). %F A180046 G.f.: -x*(1+x)*(2*x^2+1)/(-1+x-x^2+x^3+x^4). - _R. J. Mathar_, Aug 14 2010 %F A180046 a(n) = (-1)^(n)*(A100329(n-1)-A100329(n)-2*A100329(n-2)+2*A100329(n-3)) with A100329(-1) = A100329(-2) = 0. - _Johannes W. Meijer_, Jul 06 2011 %e A180046 1 2 3 4 (by definition); 1 + 2 - 3 + 4 = 4, 2 + 3 - 4 + 4 = 5, 3 + 4 - 4 + 5 = 8. %t A180046 LinearRecurrence[{1,-1,1,1},{1,2,3,4},50] (* _Harvey P. Dale_, Mar 18 2015 *) %o A180046 (PARI) Vec(x*(1+x)*(2*x^2+1)/(1-x+x^2-x^3-x^4)+O(x^99)) \\ _Charles R Greathouse IV_, Jul 06 2011 %o A180046 (Haskell) %o A180046 import Data.List (zipWith4) %o A180046 a180046 n = a180046_list !! (n-1) %o A180046 a180046_list = [1..4] ++ zipWith4 (((((+) .) . (+)) .) . (-)) %o A180046 (drop 3 a180046_list) (drop 2 a180046_list) %o A180046 (tail a180046_list) a180046_list %o A180046 -- _Reinhard Zumkeller_, Oct 08 2014 %Y A180046 Cf. A100329. %K A180046 nonn,easy %O A180046 1,2 %A A180046 _Ian Stewart_, Aug 08 2010 %E A180046 More terms from _R. J. Mathar_, Aug 14 2010 %E A180046 Name edited by _Michel Marcus_, Feb 20 2025