A061292 a(n) = a(n-1)*a(n-2)*a(n-3) - a(n-4) for n>3 with a(0) = a(1) = a(2) = a(3) = 2.
2, 2, 2, 2, 6, 22, 262, 34582, 199330642, 1806032092550706, 12449434806576800059248920402, 4481765860945171681908664776799089162954814190172722
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..18
- Michael Magee and Brady Haran, A simple equation that behaves weirdly, Numberphile, Youtube video, 2025.
Programs
-
Haskell
a061292 n = a061292_list !! n a061292_list = 2 : 2 : 2 : 2 : zipWith (-) (zipWith3 (((*) .) . (*)) (drop 2 xs) (tail xs) xs) a061292_list where xs = tail a061292_list -- Reinhard Zumkeller, Mar 25 2015
-
Magma
I:=[2,2,2,2]; [n le 4 select I[n] else Self(n-1)*Self(n-2)*Self(n-3)-Self(n-4): n in [1..12]]; // Vincenzo Librandi, Sep 17 2011
-
Mathematica
a[1] := 2; a[2] := 2; a[3] := 2; a[4] := 2; a[n_] := a[n - 1]*a[n - 2]*a[n - 3] - a[n - 4]; Table[a[n], {n, 1, 15}] (* Stefan Steinerberger, Mar 31 2006 *) RecurrenceTable[{a[0]==a[1]==a[2]==a[3]==2,a[n]==a[n-1]a[n-2]a[n-3]- a[n-4]},a[n],{n,12}] (* Harvey P. Dale, Sep 15 2011 *)
Extensions
More terms from Larry Reeves (larryr(AT)acm.org) and Jason Earls, Jun 05 2001
Comments