login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,6

COMMENTS

This is similar to Somos-4 (A006720) except for the alternating coefficient of a(n-2)^2.

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 0..250

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

Adjacent sequences:  A247365 A247366 A247367 * A247369 A247370 A247371

KEYWORD

nonn

AUTHOR

Michael Somos, Sep 14 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 25 15:54 EDT 2022. Contains 356986 sequences. (Running on oeis4.)