login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = (a(n-1) * a(n-3) - (-1)^n * a(n-2)^2) / a(n-4) with a(0) = -3, a(1) = 7, a(2) = 1, a(3) = 46.
2

%I #16 Sep 08 2022 08:46:09

%S -3,7,1,46,-107,287,1753,-2287,34854,231113,-994499,-8198929,

%T -82742507,646912018,12217516729,72254901151,1239086834889,

%U 31471566933049,60457357235782,14744625259648249,371548914696565093,7621699930737956423,-424588302658797056471

%N a(n) = (a(n-1) * a(n-3) - (-1)^n * a(n-2)^2) / a(n-4) with a(0) = -3, a(1) = 7, a(2) = 1, a(3) = 46.

%H Reinhard Zumkeller, <a href="/A247382/b247382.txt">Table of n, a(n) for n = 0..150</a>

%F 0 = a(n) * a(n+4) - a(n+1) * a(n+3) + (-1)^n * a(n+2)^2 for all n in Z.

%F 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.

%F a(-n) = A247378(n) for all n in Z.

%t RecurrenceTable[{a[0]==-3,a[1]==7,a[2]==1,a[3]==46,a[n]==(a[n-1]a[n-3]- (-1)^n a[n-2]^2)/a[n-4]},a,{n,30}] (* _Harvey P. Dale_, Aug 22 2016 *)

%o (PARI) {a(n) = if( n<-4, (a(n+1) * a(n+3) - (-1)^n * a(n+2)^2) / a(n+4), if( n<0, [1, -2, 1, 1][-n], (a(n-1) * a(n-3) - (-1)^n * a(n-2)^2) / a(n-4)))};

%o (PARI) {a(n) = my(A); n=-n; 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]};

%o (Haskell)

%o a247382 n = a247382_list !! n

%o a247382_list = [-3, 7, 1, 46] ++ zipWith (flip div) a247382_list

%o (zipWith (+)

%o (zipWith (*) (tail a247382_list) (drop 3 a247382_list))

%o (zipWith (*) (cycle [-1, 1]) (map (^ 2) $ drop 2 a247382_list)))

%o -- _Reinhard Zumkeller_, Sep 17 2014

%o (Magma) I:=[-3,7,1,46]; [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

%o (GAP) a:=[-3,7,1,46];; for n in [5..25] do a[n]:=(a[n-1]*a[n-3]-(-1)^(n-1)*a[n-2]^2)/a[n-4]; od; a; # _Muniru A Asiru_, Aug 05 2018

%Y Cf. A247378.

%K sign

%O 0,1

%A _Michael Somos_, Sep 15 2014