This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A247378 a(n) = (a(n-1) * a(n-3) - (-1)^n * a(n-2)^2) / a(n-4) with a(1) = a(3) = a(4) = 1, a(2) = -2. 2
 1, -2, 1, 1, -1, 1, 2, -3, -1, -11, 17, 46, 217, -143, 2383, 10797, 19054, 497689, 2407303, -18692747, -184111831, -1592624618, 26447728169, 396185367129, -372098609569, 104735294255689, 1574163501502418, -29166210748027547, 1549967994300724111 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Reinhard Zumkeller, Table of n, a(n) for n = 1..150 FORMULA 0 = a(n) * a(n+4) - a(n+1) * a(n+3) + (-1)^n * a(n+2)^2 for all n in Z. 0 = a(n) * a(n+9) + a(n+1) * a(n+8) + 9 * a(n+3) * a(n+6) + 9 * a(n+4) * a(n+5) for all n in Z. a(-n) = A247382(n) for all n in Z. MATHEMATICA RecurrenceTable[{a[0]==1, a[1]==-2, a[2]==1, a[3]==1, a[n]==(a[n-1]a[n-3] - (-1)^n a[n-2]^2)/a[n-4]}, a, {n, 30}] (* G. C. Greubel, Aug 05 2018 *) PROG (PARI) {a(n) = if( n<1, (a(n+1) * a(n+3) - (-1)^n * a(n+2)^2) / a(n+4), if( n<5, [1, -2, 1, 1][n], (a(n-1) * a(n-3) - (-1)^n * a(n-2)^2) / a(n-4)))}; (PARI) {a(n) = my(A); A = if( n<1, n = 6-n; [-1, 1, 1, -2], [1, -2, 1, 1]); A = concat(A, vector(max(0, n-4))); for(k=5, n, A[k] = (A[k-1] * A[k-3] - (-1)^k * A[k-2]^2) / A[k-4]); A[n]}; (MAGMA)  I:=[1, -2, 1, 1]; [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]]; // Vincenzo Librandi, Sep 16 2014 (Haskell) a247378 n = a247378_list !! (n-1) a247378_list = [1, -2, 1, 1] ++ zipWith (flip div) a247378_list    (zipWith (+)         (zipWith (*) (tail a247378_list) (drop 3 a247378_list))         (zipWith (*) (cycle [1, -1]) (map (^ 2) \$ drop 2 a247378_list))) -- Reinhard Zumkeller, Sep 17 2014 (MAGMA) I:=[1, -2, 1, 1]; [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 (GAP) a:=[1, -2, 1, 1];; for n in [5..30] do a[n]:=(a[n-1]*a[n-3]-(-1)^n*a[n-2]^2)/a[n-4]; od; a; # Muniru A Asiru, Aug 05 2018 CROSSREFS Cf. A247382. Sequence in context: A029384 A225485 A321913 * A094102 A220091 A063746 Adjacent sequences:  A247375 A247376 A247377 * A247379 A247380 A247381 KEYWORD sign AUTHOR Michael Somos, Sep 15 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 24 13:17 EDT 2019. Contains 324325 sequences. (Running on oeis4.)