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.

A122997 Pentanacci numbers for following initial values: a(0) = 1, a(1) = -1, a(2) = 1, a(3) = -1, a(4) = 1.

This page as a plain text file.
%I A122997 #17 Sep 08 2022 08:45:28
%S A122997 1,-1,1,-1,1,1,1,3,5,11,21,41,81,159,313,615,1209,2377,4673,9187,
%T A122997 18061,35507,69805,137233,269793,530399,1042737,2049967,4030129,
%U A122997 7923025,15576257,30622115,60201493,118353019,232675909,457428793,899281329,1767940543,3475679593,6833006167,13433336425
%N A122997 Pentanacci numbers for following initial values: a(0) = 1, a(1) = -1, a(2) = 1, a(3) = -1, a(4) = 1.
%H A122997 G. C. Greubel, <a href="/A122997/b122997.txt">Table of n, a(n) for n = 0..1000</a>
%H A122997 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,1,1,1,1).
%F A122997 a(n) = a(n-1) + a(n-2) + a(n-3) + a(n-4) + a(n-5).
%F A122997 G.f.: (1 -2*x +x^2 -2*x^3 +x^4)/(1 -x -x^2 -x^3 -x^4 -x^5). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 12 2009
%t A122997 a[n_]:= a[n]= If[n<5, (-1)^n, Sum[a[n-j], {j, 5}]];
%t A122997 Table[a[n], {n, 0, 50}]
%o A122997 (Magma) [n le 5 select (-1)^(n-1) else Self(n-1) +Self(n-2) +Self(n-3) +Self(n-4) +Self(n-5): n in [1..51]]; // _G. C. Greubel_, Dec 23 2021
%o A122997 (Sage)
%o A122997 @CachedFunction
%o A122997 def A122997(n): return (-1)^n if (n<5) else sum( A122997(n-j) for j in (1..5) )
%o A122997 [A122997(n) for n in (0..50)] # _G. C. Greubel_, Dec 23 2021
%Y A122997 Cf. A001591.
%K A122997 sign
%O A122997 0,8
%A A122997 _Artur Jasinski_, Oct 28 2006