OFFSET
0,5
COMMENTS
David Speyer showed (modulo some empirical relations) that all terms are integer.
LINKS
Seiichi Manyama, Table of n, a(n) for n = 0..172
MathOverflow, Does this sequence always give an integer?
FORMULA
For n>=6, a(n) = (a(n-1) * a(n-5) + a(n-2) * a(n-4) + a(n-3)^2) / a(n-6).
a(n) = a(3-n) for all n in Z. - Michael Somos, Apr 25 2017
0 = a(n)*a(n+9) +a(n+1)*a(n+8) +a(n+2)*a(n+7) -a(n+3)*a(n+6) -32*a(n+4)*a(n+5) for all n in Z. - Michael Somos, Apr 25 2017
0 = a(n)*a(n+10) -a(n+1)*a(n+9) -32*a(n+2)*a(n+8) +17*a(n+3)*a(n+7) +49*a(n+4)*a(n+6) for all n in Z. - Michael Somos, Apr 25 2017
0 = +a(n)*a(n+11) -32*a(n+1)*a(n+10) -33*a(n+2)*a(n+9) -49*a(n+3)*a(n+8) +1007*a(n+5)*a(n+6) for all n in Z. - Michael Somos, Apr 25 2017
MATHEMATICA
RecurrenceTable[{a[0]==a[1]==a[2]==a[3]==1, a[4]==a[5]==2, a[n]==(a[n-1] a[n-5]+ a[n-2]a[n-4]+a[n-3]^2)/a[n-6]}, a, {n, 30}] (* Harvey P. Dale, Nov 11 2014 *)
a[ n_] := Which[ Abs[n - 3/2] < 2, 1, Abs[n - 3/2] < 4, 2, n < 0, a[3 - n], True, (a[n - 1] a[n - 5] + a[n - 2] a[n - 4] + a[n - 3]^2) / a[n - 6]]; (* Michael Somos, Jul 24 2018 *)
PROG
(PARI) {a(n) = my(v); if( n<2, n = 3-n); n++; v = vector(n, i, 1+(i>4)); for(k=7, n, v[k] = (v[k-1]*v[k-5] + v[k-2]*v[k-4] + v[k-3]*v[k-3]) / v[k-6]); v[n]}; /* Michael Somos, Apr 25 2017 */
(Magma) I:=[1, 1, 1, 1, 2, 2]; [n le 6 select I[n] else (Self(n-1)*Self(n-5) + Self(n-2)*Self(n-4) + Self(n-3)^2)/Self(n-6): n in [1..30]]; // G. C. Greubel, Aug 08 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Max Alekseyev, Dec 04 2013
STATUS
approved