OFFSET
0,8
COMMENTS
From Vladimir Shevelev, Apr 16 2016: (Start)
For k >= 0, an infinite sequence {b(k,n)} of Somos's sequences (n >= 0) is:
b(k,0) = b(k,1) = ... = b(k,2*k+2) = 1;
and then for n >= 2*k+3,
b(k,n) = (b(k,n-1)*b(k,n-2*k-2) + b(k,n-k-1)*b(k,n-k-2))/b(k,n-2*k-3).
One can prove that the sequence {b(k,n)} has the first 4*(k+1) simple differences: 2k+2 zeros, after that k+1 1's and after that k+1 consecutive doubled triangular numbers (A000217), beginning with 2.
Further we have nontrivial differences. The first of them for k=0,1,2,... are 12, 26, 48, 80, 124, 182, 256, 348, 460, 594, ..., that is, {k^3/3 + 3*k^2 + 32*k/3 + 12}.
(End)
REFERENCES
G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; see esp. p. 255.
FORMULA
a(n) = 144 * a(n-6) * a(n-10) / a(n-16), a(n) = a(6-n) for all n in Z.
MATHEMATICA
RecurrenceTable[{a[0]==a[1]==a[2]==a[3]==a[4]==a[5]==a[6]==1, a[n] == (a[n-1]*a[n-6]+a[n-3]*a[n-4])/a[n-7]}, a, {n, 40}] (* Harvey P. Dale, Apr 20 2012 *)
PROG
(PARI) {a(n) = if( n<0, a(6-n), if( n<7, 1, (a(n-1) * a(n-6) + a(n-3) * a(n-4)) / a(n-7)))};
(PARI) {a(n) = 2^(b(n-9) + b(n-7)) * 3^b(n-8)}; {b(n) = (n^2 + 10*n + 1 - n%2*13) \ 60 + 1}; /* b(n) = A025795(n) */
(Haskell)
a078495 n = a078495_list !! n
a078495_list = [1, 1, 1, 1, 1, 1, 1] ++
zipWith div (foldr1 (zipWith (+)) (map b [1, 3])) a078495_list
where b i = zipWith (*) (drop i a078495_list) (drop (7-i) a078495_list)
-- Reinhard Zumkeller, May 05 2013
(Magma) I:=[1, 1, 1, 1, 1, 1, 1]; [n le 7 select I[n] else (Self(n-1)*Self(n-6) + Self(n-3)*Self(n-4))/Self(n-7): n in [1..30]]; // G. C. Greubel, Feb 21 2018
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
Michael Somos, Nov 26 2002
STATUS
approved