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.

A121256 a(n) = a(n-1)*a(n-3) - 1, starting with a(0)=a(1)=a(2)=2.

This page as a plain text file.
%I A121256 #16 Sep 08 2022 08:45:27
%S A121256 2,2,2,3,5,9,26,129,1160,30159,3890510,4512991599,136107313634240,
%T A121256 529526864767147062399,2389750292138943783804215786000,
%U A121256 325262492519671886357848434144628838112639999
%N A121256 a(n) = a(n-1)*a(n-3) - 1, starting with a(0)=a(1)=a(2)=2.
%C A121256 Analog of A055937 a(n) = a(n-1)*a(n-2) - 1. What is the equivalent continued fraction and asymptotic representation, by analogy to A007660 a(n) = a(n-1)*a(n-2) + 1 ?
%H A121256 Vincenzo Librandi, <a href="/A121256/b121256.txt">Table of n, a(n) for n = 0..22</a> (shortened by _N. J. A. Sloane_, Jan 13 2019)
%t A121256 RecurrenceTable[{a[0]==a[1]==a[2]==2,a[n]==a[n-1]a[n-3]-1},a,{n,20}] (* _Harvey P. Dale_, Sep 02 2016 *)
%o A121256 (Magma) I:=[2,2,2]; [n le 3 select I[n] else Self(n-1)*Self(n-3)-1: n in [1..20]]; // _Vincenzo Librandi_, Nov 14 2011
%o A121256 (PARI) a(n) = if(n<3, 2, a(n-1)*a(n-3) - 1);
%o A121256 vector(20, n, n--; a(n)) \\ _G. C. Greubel_, Jun 07 2019
%o A121256 (Sage)
%o A121256 def a(n):
%o A121256     if (n==0 or n==1 or n==2): return 2
%o A121256     else: return a(n-1)*a(n-3) -1
%o A121256 [a(n) for n in (0..20)] # _G. C. Greubel_, Jun 07 2019
%Y A121256 Cf. A007660, A055937.
%K A121256 easy,nonn
%O A121256 0,1
%A A121256 _Jonathan Vos Post_, Aug 22 2006
%E A121256 Corrected and extended by _Vincenzo Librandi_, Nov 14 2011