login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A247368
a(n) = (a(n-1) * a(n-3) - (-1)^n * a(n-2)^2) / a(n-4) with a(0) = 0, a(1) = ... = a(4) = 1.
3
0, 1, 1, 1, 1, 2, 1, 5, 9, 17, 4, 65, 121, 277, 841, 2746, 441, 28561, 93025, 312001, 583696, 5309441, 14145121, 116815697, 719795241, 4487760170, 433763929, 175081030037, 1091329140889, 6935920173025, 53828252727076, 610296440614897, 1223724862004841
OFFSET
0,6
COMMENTS
This is similar to Somos-4 (A006720) except for the alternating coefficient of a(n-2)^2.
LINKS
FORMULA
0 = a(n)*a(n+9) + a(n+1)*a(n+8) - 3*a(n+3)*a(n+6) - 3*a(n+4)*a(n+5) for all n in Z.
a(n) = a(-n), a(2*n) = A178384(n)^2 for all n in Z.
MATHEMATICA
Join[{0}, RecurrenceTable[{a[1]==1, a[2]==1, a[3]==1, a[4]==1, a[n]==(a[n-1]a[n-3] - (-1)^n a[n-2]^2)/a[n-4]}, a, {n, 4, 30}]] (* G. C. Greubel, Aug 05 2018 *)
PROG
(PARI) {a(n) = n=abs(n); if( n<5, n>0, (a(n-1) * a(n-3) - (-1)^n * a(n-2)^2) / a(n-4))};
(PARI) {a(n) = my(A); n=abs(n); if( n<5, n>0, A = vector(n, k, 1); for(k=5, n, A[k] = (A[k-1] * A[k-3] - (-1)^k * A[k-2]^2) / A[k-4]); A[n])};
(Haskell)
a247368 n = a247368_list !! n
a247368_list = 0 : xs where
xs = [1, 1, 1, 1] ++ zipWith (flip div) xs (zipWith (+)
(zipWith (*) (tail xs) (drop 3 xs))
(zipWith (*) (cycle [1, -1]) (map (^ 2) $ drop 2 xs)))
-- Reinhard Zumkeller, Sep 15 2014
(Magma) I:=[1, 1, 1, 1]; [0] cat [n le 4 select I[n] else ( Self(n-1)*Self(n-3) - (-1)^n*Self(n-2)^2 )/Self(n-4): n in [1..30]]; // G. C. Greubel, Aug 05 2018
CROSSREFS
Cf. A178384.
Sequence in context: A011132 A178627 A326179 * A019098 A333829 A035309
KEYWORD
nonn
AUTHOR
Michael Somos, Sep 14 2014
STATUS
approved