cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Michael Somos, Sep 14 2014

Keywords

Comments

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

Crossrefs

Cf. A178384.

Programs

  • 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
  • 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 *)
  • 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])};
    

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.