login
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.
5
2, 2, 2, 2, 6, 22, 262, 34582, 199330642, 1806032092550706, 12449434806576800059248920402, 4481765860945171681908664776799089162954814190172722
OFFSET
0,1
COMMENTS
Any four consecutive terms are a solution to the Diophantine equation w^2 + x^2 + y^2 + z^2 = wxyz.
a(n) = 2 * A072878(n+1).
LINKS
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 *)
PROG
(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
(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
CROSSREFS
KEYWORD
easy,nonn,nice
AUTHOR
Stephen G Penrice, Jun 04 2001
EXTENSIONS
More terms from Larry Reeves (larryr(AT)acm.org) and Jason Earls, Jun 05 2001
STATUS
approved