A121258 a(n) = a(n-1)*a(n-2)*a(n-3) - 1 with a(0)=a(1)=a(2)=2.
2, 2, 2, 7, 27, 377, 71252, 725274107, 19482315963330427, 1006792136061113006060577048627
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..14 (shortened by _N. J. A. Sloane_, Jan 13 2019)
Programs
-
Magma
I:=[2,2,2]; [n le 3 select I[n] else Self(n-1)*Self(n-2)* Self(n-3)-1: n in [1..12]]; // Vincenzo Librandi, Nov 14 2011
-
Mathematica
RecurrenceTable[{a[0]==a[1]==a[2]==2, a[n] == a[n-1]*a[n-2]*a[n-3] - 1}, a, {n, 0, 15}] (* G. C. Greubel, Jun 07 2019 *) nxt[{a_,b_,c_}]:={b,c,a*b*c-1}; NestList[nxt,{2,2,2},10][[All,1]] (* Harvey P. Dale, Jun 25 2020 *)
-
PARI
a(n) = if(n<3, 2, a(n-1)*a(n-2)*a(n-3) - 1); vector(12, n, n--; a(n)) \\ G. C. Greubel, Jun 07 2019
-
Sage
def a(n): if (n==0 or n==1 or n==2): return 2 else: return a(n-1)*a(n-2)*a(n-3) - 1 [a(n) for n in (0..12)] # G. C. Greubel, Jun 07 2019
Formula
a(n) ~ c^(A058265^n), where c = 1.3319334322065642848267... - Vaclav Kotesovec, Jun 15 2019
Extensions
Data corrected by Vincenzo Librandi, Nov 14 2011
Comments