%I #16 Sep 08 2022 08:45:54
%S 1,1,1,-4,-5,-21,59,184,1469,-2515,-44419,-389004,-677129,48209431,
%T 432521335,6727493744,-202699840391,-2757368732391,-137883154808071,
%U 3024277973351020,134932587262253171,10064373238238267651
%N A (1,-1) Somos-4 sequence associated to the elliptic curve E : y^2 + x*y - y = x^3 + 3*x^2 - x.
%C a(n) is (-1)^C(n,2) times the Hankel transform of the sequence with g.f. 1/(1 - x^2/(1 + x^2/(1 - 4*x^2/(1 - (5/16)*x^2/(1 + (84/25)*x^2/(1 - ... where -1, 4, 5/16, -84/25, ... are the x-coordinates of the multiples of z=(0,0) on E : y^2 + x*y - y = x^3 + 3*x^2 - x.
%H G. C. Greubel, <a href="/A178625/b178625.txt">Table of n, a(n) for n = 0..158</a>
%F a(n) = (a(n-1)*a(n-3) - a(n-2)^2)/a(n-4), n > 3.
%t RecurrenceTable[{a[n] == (a[n-1]*a[n-3] -a[n-2]^2)/a[n-4], a[0]==1, a[1] ==1, a[2]==1, a[3]==-4}, a, {n, 0, 30}] (* _G. C. Greubel_, Jan 29 2019 *)
%t nxt[{a_,b_,c_,d_}]:={b,c,d,(d*b-c^2)/a}; NestList[nxt,{1,1,1,-4},30][[All,1]] (* _Harvey P. Dale_, Feb 14 2022 *)
%o (PARI) a(n)=local(E,z);E=ellinit([1,3,-1,-1,0]);z=ellpointtoz(E,[0,0]);
%o round(ellsigma(E,n*z)/ellsigma(E,z)^(n^2))
%o (PARI) m=30; v=concat([1,1,1,-4], vector(m-4)); for(n=5, m, v[n] = ( v[n-1]*v[n-3] -v[n-2]^2)/v[n-4]); v \\ _G. C. Greubel_, Jan 29 2019
%o (Magma) I:=[1,1,1,-4]; [n le 4 select I[n] else (Self(n-1)*Self(n-3) - Self(n-2)^2)/Self(n-4): n in [1..30]]; // _G. C. Greubel_, Jan 29 2019
%o (Sage)
%o @cached_function
%o def A178625(n):
%o if (n==0): return 1
%o elif (n==1): return 1
%o elif (n==2): return 1
%o elif (n==3): return -4
%o else: return (A178625(n-1)*A178625(n-3) - A178625(n-2)^2)/A178625(n-4)
%o [A178625(n) for n in range(30)] # _G. C. Greubel_, Jan 29 2019
%K easy,sign
%O 0,4
%A _Paul Barry_, May 31 2010