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.

A055937 a(n) = a(n-1) * a(n-2) - 1.

This page as a plain text file.
%I A055937 #46 Sep 08 2022 08:45:01
%S A055937 2,2,3,5,14,69,965,66584,64253559,4278258972455,274893365303916717344,
%T A055937 1176065006579831683931038116759519,
%U A055937 323292467474902888912311701915651931811127805144397535
%N A055937 a(n) = a(n-1) * a(n-2) - 1.
%H A055937 Vincenzo Librandi, <a href="/A055937/b055937.txt">Table of n, a(n) for n = 1..19</a>
%F A055937 a(n) ~ c^(phi^n), where c = 1.26679081808631741720378389711... and phi = A001622 = (1+sqrt(5))/2 is the golden ratio. - _Vaclav Kotesovec_, Jun 15 2019
%t A055937 RecurrenceTable[{a[1]==a[2]==2, a[n]==a[n-1]*a[n-2] -1}, a, {n, 15}] (* _Vincenzo Librandi_, Sep 30 2015 *)
%t A055937 nxt[{a_,b_}]:={b,a*b-1}; NestList[nxt,{2,2},15][[All,1]] (* _Harvey P. Dale_, Dec 05 2020 *)
%o A055937 (Magma) I:=[2,2]; [n le 2 select I[n] else Self(n-1)*Self(n-2)-1: n in [1..15]]; // _Vincenzo Librandi_, Sep 30 2015
%o A055937 (PARI) a(n) = if(n<3, 2, a(n-1)*a(n-2)-1);
%o A055937 vector(15, n, a(n)) \\ _Altug Alkan_, Sep 30 2015
%o A055937 (Sage)
%o A055937 @cached_function
%o A055937 def a(n):
%o A055937     if n == 1 or n == 2:
%o A055937         return 2
%o A055937     else:
%o A055937         return a(n - 1) * a(n - 2) - 1
%o A055937 [a(n) for n in range(1, 16)]  # _G. C. Greubel_, Jun 07 2019
%Y A055937 A152446 uses largest prime < a(n-1)*a(n-2) instead of subtracting 1. - _Joshua D. Olson_, Sep 29 2015
%Y A055937 Cf. A007660, A121258.
%K A055937 easy,nonn
%O A055937 1,1
%A A055937 _Robert G. Wilson v_, Jul 05 2000