%I M0157 #140 Aug 23 2024 20:53:51
%S 0,1,1,-1,1,2,-1,-3,-5,7,-4,-23,29,59,129,-314,-65,1529,-3689,-8209,
%T -16264,83313,113689,-620297,2382785,7869898,7001471,-126742987,
%U -398035821,1687054711,-7911171596,-47301104551,43244638645
%N Elliptic divisibility sequence associated with elliptic curve "37a1": y^2 + y = x^3 - x and multiples of the point (0,0).
%C This sequence has a recursion same as the Somos-4 sequence recursion.
%C a(n+1) is the Hankel transform of A178072. - _Paul Barry_, May 19 2010
%C The recurrence formulas in [Kimberling, p. 16] are missing square and cube exponents. - _Michael Somos_, Jul 07 2014
%C This is a strong elliptic divisibility sequence t_n as given in [Kimberling, p. 16] where x = 1, y = -1, z = 1.
%C From _Helmut Ruhland_, Nov 28 2023: (Start)
%C This sequence and its two subsequences with even/odd indices satisfy the Somos-4 recursion.
%C The even subsequence is A051138, here called r[ ]. The odd subsequence is the classical Somos-4 A006720, here called s[ ].
%C These two subsequences interleaved as follows, recover the original sequence which is now: r[0], s[2], r[1], -s[3], r[2], s[4], r[3], -s[5], ..., all Somos-4 s[ ] with odd index with a minus sign. (End)
%D G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; pp. 11 and 164.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Seiichi Manyama, <a href="/A006769/b006769.txt">Table of n, a(n) for n = 0..300</a> (first 101 terms from T. D. Noe)
%H Paul Barry, <a href="https://arxiv.org/abs/1807.05794">Riordan Pseudo-Involutions, Continued Fractions and Somos 4 Sequences</a>, arXiv:1807.05794 [math.CO], 2018.
%H Paul Barry, <a href="https://arxiv.org/abs/1910.00875">Generalized Catalan recurrences, Riordan arrays, elliptic curves, and orthogonal polynomials</a>, arXiv:1910.00875 [math.CO], 2019.
%H Paul Barry, <a href="https://arxiv.org/abs/1912.01126">Riordan arrays, the A-matrix, and Somos 4 sequences</a>, arXiv:1912.01126 [math.CO], 2019.
%H Paul Barry, <a href="https://arxiv.org/abs/2306.05025">Integer sequences from elliptic curves</a>, arXiv:2306.05025 [math.NT], 2023.
%H H. W. Braden, V. Z. Enolskii and A. N. W. Hone, <a href="https://arxiv.org/abs/math/0501162">Bilinear recurrences and addition formulas for hyperelliptic sigma functions</a>, arXiv:math/0501162 [math.NT], 2005.
%H Graham Everest, <a href="/A006769/a006769.pdf">Elliptic Divisibility Sequences</a>.
%H R. W. Gosper and Richard C. Schroeppel, <a href="http://arxiv.org/abs/math/0703470">Somos Sequence Near-Addition Formulas and Modular Theta Functions</a>, arXiv:math/0703470 [math.NT], 2007.
%H Clark Kimberling, <a href="http://www.fq.math.ca/Scanned/17-1/kimberling1.pdf">Strong divisibility sequences and some conjectures</a>, Fib. Quart., 17 (1979), 13-17.
%H LMFDB, <a href="https://www.lmfdb.org/EllipticCurve/Q/37/a/1">Elliptic Curve 37.a1 (Cremona label 37a1)</a>
%H Helmut Ruhland, <a href="https://arxiv.org/abs/2312.02085">Somos-4 and a quartic Surface in RP^3</a>, arXiv:2312.02085 [math.AG], 2023.
%H Michael Somos, <a href="https://grail.eecs.csuohio.edu/~somos/nwic.html">Number Walls in Combinatorics</a>
%H <a href="/index/Tu#2wis">Index entries for two-way infinite sequences</a>
%F a(n) = (a(n-1) * a(n-3) + a(n-2)^2) / a(n-4) for all n != 4.
%F a(n) = (-a(n-1) * a(n-4) - a(n-2) * a(n-3)) / a(n-5) for all n != 5.
%F a(-n) = -a(n) for all n.
%F a(2*n + 1) = a(n+2) * a(n)^3 - a(n-1) * a(n+1)^3, a(2*n) = a(n+2) * a(n) * a(n-1)^2 - a(n) * a(n-2) * a(n+1)^2 for all n.
%F A006720(n) = (-1)^n * a(2*n - 3), A028941(n) = a(n)^2 for all n.
%F a(2*n) = A051138(n). - _Michael Somos_, Feb 10 2015
%F a(2*n+1) = a(n-1)*a(n)^2*a(n+3) - a(n-2)*a(n+1)^2*a(n+2) for all n. - _Michael Somos_, Aug 20 2024
%t a[n_] := If[n < 0, -a[-n], If[n == 0, 0, ClearAll[an]; an[_] = 1; an[3] = -1; For[k = 5, k <= n, k++, an[k] = (an[k-1]*an[k-3] + an[k-2]^2)/an[k-4]]; an[n]]]; Table[a[n], {n, 0, 32}] (* _Jean-François Alcover_, Dec 14 2011, after first Pari program *)
%t Join[{0},RecurrenceTable[{a[1]==a[2]==1,a[3]==-1,a[4]==1,a[n]==(a[n-1] a[n-3]+ a[n-2]^2)/a[n-4]},a,{n,40}]] (* _Harvey P. Dale_, May 04 2018 *)
%t a[ n_] := Which[n<0, -a[-n], n<5, {0, 1, 1, -1, 1}[[1+n]], True, (a[n-1]*a[n-3] + a[n-2]^2)/a[n-4]]; (* _Michael Somos_, Aug 20 2024 *)
%o (PARI) {a(n) = my(an); if( n<0, -a(-n), if( n==0, 0, an = vector( max(3, n), i, 1); an[3] = -1; for( k=5, n, an[k] = (an[k-1] * an[k-3] + an[k-2]^2) / an[k-4]); an[n]))};
%o (PARI) {a(n) = my(an); if( n<0, -a(-n), if( n==0, 0, an = Vec((-1 - 2*x + sqrt(1 + 4*x - 4*x^3 + O(x^n))) / (2 * x^2)); matdet( matrix((n-1)\2, (n-1)\2, i, j, if(i + j - 1 - n%2<0, 0, an[i + j -n%2])))))};
%o (PARI) {a(n) = my(E, z); E = ellinit([0, 0, -1, -1, 0]); z = ellpointtoz(E, [0, 0]); round( ellsigma(E, n*z) / ellsigma(E, z)^(n^2))}; /* _Michael Somos_, Oct 22 2004 */
%o (PARI) {a(n) = sign(n) * subst( elldivpol( ellinit([0, 0, -1, -1, 0]), abs(n)), x, 0)}; /* _Michael Somos_, Dec 16 2014 */
%o (Haskell)
%o a006769 n = a050512_list !! n
%o a006769_list = 0 : 1 : 1 : (-1) : 1 : zipWith div (zipWith (+) (zipWith (*)
%o (drop 4 a006769_list) (drop 2 a006769_list))
%o (map (^ 2) (drop 3 a006769_list))) (tail a006769_list)
%o -- _Reinhard Zumkeller_, Nov 02 2011
%Y Cf. A006720, A028941, A050512, A051138, A178072, A278314.
%K sign,easy,nice
%O 0,6
%A _Michael Somos_, Jul 16 1999