A278314
a(n) = -c(n-1) * c(n-2) * c(n+3) where c(n) = A006769(n).
Original entry on oeis.org
0, 0, 1, -3, -5, -14, -8, 69, -435, 2065, 3612, 28888, -43355, -2616119, 28076979, -332513754, 331948240, 8280062505, 641260644409, 18784454671297, -318128427505160, 10663732503571536, -66316334575107447, -8938035295591025771, -588310630753491921045
Offset: 1
G.f. = x^3 - 3*x^4 - 5*x^5 - 14*x^6 - 8*x^7 + 69*x^8 - 435*x^9 + ...
-
{a(n) = my(m, an); if( n>0, m = n; an = vector( max(12, m), i, if( i<13, [0, 0, 1, -3, -5, -14, -8, 69, -435, 2065, 3612, 28888][i], 0)), m = 1-n; an = vector( max(12, m), i, if( i<13, [1, 1, 1, 0, -2, 3, -15, -35, -56, -92, 2001, -8555][i], 0))); for( k=13, m, an[k] = (an[k-1] * an[k-7] + 3 * an[k-2] * an[k-6] - 3 * an[k-3] * an[k-5] + 6 * an[k-4]^2) / an[k-8]); an[m]};
A178072
Sequence with Hankel transform equal to the Somos-4 sequence A006769(n+2).
Original entry on oeis.org
1, 0, -1, -1, -1, -1, 1, 8, 23, 45, 55, -14, -317, -1095, -2459, -3574, -681, 16124, 64605, 159483, 260869, 134374, -906919, -4228769, -11317061, -20327731, -15742753, 52640154, 293447719, 847451759, 1648865921, 1636313816, -2986606297, -21074495982
Offset: 0
G.f. = 1 - x^2 - x^3 - x^4 - x^5 + x^6 + 8*x^7 + 23*x^8 + 45*x^9 + 55*x^10 + ...
-
m:=40; R:=PowerSeriesRing(Rationals(), m); Coefficients(R!(2/(1+2*x+x^2+Sqrt(1-4*x+6*x^2+x^4)))); // G. C. Greubel, Sep 22 2018
-
CoefficientList[Series[2/(1+2*x+x^2+Sqrt[1-4*x+6*x^2+x^4]), {x, 0, 40}], x] (* G. C. Greubel, Sep 22 2018 *)
-
{a(n) = if( n<0, 0, polcoeff( 2 / (1 + 2*x + x^2 + sqrt(1 - 4*x + 6*x^2 + x^4 + x*O(x^n))), n))}; /* Michael Somos, Jun 13 2010 */
-
my(x='x+O('x^50)); Vec(2/(1+2*x+x^2+(1-4*x+6*x^2+x^4)^(1/2))) \\ Altug Alkan, Sep 23 2018
A006720
Somos-4 sequence: a(0)=a(1)=a(2)=a(3)=1; for n >= 4, a(n) = (a(n-1) * a(n-3) + a(n-2)^2) / a(n-4).
Original entry on oeis.org
1, 1, 1, 1, 2, 3, 7, 23, 59, 314, 1529, 8209, 83313, 620297, 7869898, 126742987, 1687054711, 47301104551, 1123424582771, 32606721084786, 1662315215971057, 61958046554226593, 4257998884448335457, 334806306946199122193, 23385756731869683322514, 3416372868727801226636179
Offset: 0
- Miklos Bona, editor, Handbook of Enumerative Combinatorics, CRC Press, 2015, page 565.
- G. Everest, A. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences, Amer. Math. Soc., 2003; pp. 9, 179.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Robert G. Wilson v, Table of a(n) for n = 0..100.
- Paul Barry, Riordan-Bernstein Polynomials, Hankel Transforms and Somos Sequences, Journal of Integer Sequences, Vol. 15 2012, #12.8.2. - From _N. J. A. Sloane_, Dec 29 2012
- Paul Barry, On the Hurwitz Transform of Sequences, Journal of Integer Sequences, Vol. 15 (2012), #12.8.7.
- Paul Barry, Riordan arrays, the A-matrix, and Somos 4 sequences, arXiv:1912.01126 [math.CO], 2019.
- Paul Barry, Integer sequences from elliptic curves, arXiv:2306.05025 [math.NT], 2023.
- H. W. Braden, V. Z. Enolskii and A. N. W. Hone, Bilinear recurrences and addition formulas for hyperelliptic sigma functions, arXiv:math/0501162 [math.NT], 2005.
- R. H. Buchholz and R. L. Rathbun, An infinite set of Heron triangles with two rational medians, Amer. Math. Monthly, 104 (1997), 107-115.
- Xiangke Chang and Xingbiao Hu, A conjecture based on Somos-4 sequence and its extension, Linear Algebra Appl. 436, No. 11, 4285-4295 (2012).
- Harini Desiraju and Brady Haran, The Troublemaker Number, Numberphile video (2022).
- S. B. Ekhad and D. Zeilberger, How To Generate As Many Somos-Like Miracles as You Wish, arXiv preprint arXiv:1303.5306[math.CO], 2013.
- Graham Everest, Gerard Mclaren and Tom Ward, Primitive divisors of elliptic divisibility sequences, arXiv:math/0409540 [math.NT], 2004-2006.
- G. Everest, S. Stevens, D. Tamsett and T. Ward, Primitive divisors of quadratic polynomial sequences, arXiv:math/0412079v1 [math.NT], 2004.
- G. Everest et al., Primes generated by recurrence sequences, arXiv:math/0412079 [math.NT], 2006.
- G. Everest et al., Primes generated by recurrence sequences, Amer. Math. Monthly, 114 (No. 5, 2007), 417-431.
- S. Fomin and A. Zelevinsky, The Laurent phenomenon, arXiv:math/0104241 [math.CO], 2001.
- Allan Fordy and Andrew Hone, Discrete integrable systems and Poisson algebras from cluster maps, arXiv preprint arXiv:1207.6072 [nlin.SI], 2012.
- A. P. Fordy, Periodic Cluster Mutations and Related Integrable Maps, arXiv preprint arXiv:1403.8061 [math-ph], 2014.
- A. P. Fordy, Mutation-periodic quivers, integrable maps and associated Poisson algebras, Phil Trans. R. Soc. Lond. Ser A (Math. Phys. Eng. Sci.) 369 (1939) (2011) 1264-1279.
- David Gale, The strange and surprising saga of the Somos sequences, in Mathematical Entertainments, Math. Intelligencer 13(1) (1991), pp. 40-42.
- R. W. Gosper and Richard C. Schroeppel, Somos Sequence Near-Addition Formulas and Modular Theta Functions, arXiv:math/0703470 [math.NT], 2007.
- A. N. W. Hone, Sigma function solution of the initial value problem for Somos 5 sequences, arXiv:math/0501554 [math.NT], 2005-2006.
- A. N. W. Hone, Algebraic curves, integer sequences and a discrete Painlevé transcendent, Proceedings of SIDE 6, Helsinki, Finland, 2004; arXiv:0807.2538 [nlin.SI], 2008.
- A. N. W. Hone, Elliptic curves and quadratic recurrence sequences, Bull. Lond. Math. Soc. 37 (2005) 161-171.
- Andrew N. W. Hone, Growth of Mahler measure and algebraic entropy of dynamics with the Laurent property, arXiv:2109.08217 [math.NT], 2021.
- A. N. W. Hone and R. Inoue, Discrete Painlevé equations from Y-systems, arXiv preprint arXiv:1405.5379 [math-ph], 2014
- R. Jones and J. Rouse, Galois Theory of Iterated Endomorphisms, arXiv:0706.2384 [math.NT], 2007-2009; Proceedings of the London Mathematical Society, 100, no. 3 (2010), 763-794.
- Xinrong Ma, Magic determinants of Somos sequences and theta functions, Discrete Mathematics 310.1 (2010): 1-5.
- J. L. Malouf, An integer sequence from a rational recursion, Discr. Math. 110 (1992), 257-261.
- Valentin Ovsienko and Serge Tabachnikov, Dual numbers, weighted quivers, and extended Somos and Gale-Robinson sequences, arXiv:1705.01623 [math.CO], 2017. See p. 3.
- Kevin I. Piterman and Leandro Vendramin, Computer algebra with GAP, 2023. See p. 39.
- J. Propp, The Somos Sequence Site
- J. Propp, The 2002 REACH tee-shirt
- R. M. Robinson, Periodicity of Somos sequences, Proc. Amer. Math. Soc., 116 (1992), 613-619.
- Helmut Ruhland, Somos-4 and a quartic Surface in RP^3, arXiv:2312.02085 [math.AG], 2023.
- Matthew Christopher Russell, Using experimental mathematics to conjecture and prove theorems in the theory of partitions and commutative and non-commutative recurrences, PhD Dissertation, Mathematics Department, Rutgers University, May 2016.
- Vladimir Shevelev and Peter J. C. Moses, On a sequence of polynomials with hypothetically integer coefficients, arXiv preprint arXiv:1112.5715 [math.NT], 2011.
- Michael Somos, Somos 6 Sequence
- Michael Somos, Brief history of the Somos sequence problem
- Michael Somos, Four polynomial sequences w,x,y,z are discrete versions of the four Jacobi theta functions or the four Weierstrass sigma functions, 2016.
- D. E. Speyer, Perfect matchings and the octahedral recurrence, arXiv:math/0402452 [math.CO], 2004.
- Alex Stone, The Astonishing Behavior of Recursive Sequences, Quanta Magazine, Nov 16 2023, 13 pages.
- Andrei K. Svinin, Somos-4 equation and related equations, arXiv:2307.05866 [math.CA], 2023.
- P. H. van der Kamp, Somos-4 and Somos-5 are arithmetic divisibility sequences, arXiv:1505.00194 [math.NT], 2015.
- A. J. van der Poorten, Recurrence relations for elliptic sequences: every Somos 4 is a Somos k, arXiv:math/0412293 [math.NT], 2004.
- A. J. van der Poorten, Hyperelliptic curves, continued fractions and Somos sequences, arXiv:math/0608247 [math.NT], 2006.
- A. J. van der Poorten, Elliptic curves and continued fractions, J. Int. Sequences, Volume 8, no. 2 (2005), article 05.2.5.
- Leandro Vendramin, Mini-couse on GAP - Exercises, Universidad de Buenos Aires (Argentina, 2020).
- Eric Weisstein's World of Mathematics, Somos Sequence
- Index entries for two-way infinite sequences
Cf.
A006721,
A006722,
A006723,
A006769,
A048736,
A028945,
A028935,
A151502,
A165896,
A188313,
A051138,
A006769.
Cf.
A227199 (primes dividing some term).
-
a006720 n = a006720_list !! n
a006720_list = [1,1,1,1] ++
zipWith div (foldr1 (zipWith (+)) (map b [1..2])) a006720_list
where b i = zipWith (*) (drop i a006720_list) (drop (4-i) a006720_list)
-- Reinhard Zumkeller, Jan 22 2012
-
I:=[1,1,1,1]; [n le 4 select I[n] else (Self(n-1)*Self(n-3)+Self(n-2)^2)/Self(n-4): n in [1..30]]; // Vincenzo Librandi, Aug 07 2017
-
Digits:=11; f(x):=4*x^3-4*x+1;sols:=evalf(solve(f(x),x)); e1:=Re(sols[1]); e3:=Re(sols[2]); w1:=evalf(Int((f(x))^(-0.5),x=e1..infinity)); w3:=I*evalf(Int((-f(x))^(-0.5),x=-infinity..e3)); k:=2*w1-evalf(Int((f(x))^(-0.5),x=1..infinity)); z0:=w3+evalf(Int((f(x))^(-0.5),x=e3..-1)); A:=1/WeierstrassSigma(z0,4.0,-1.0); B:=WeierstrassSigma(k,4.0,-1.0)/WeierstrassSigma(z0+k,4.0,-1.0)/A; for n from 0 to 10 do a[n]:=A*B^n*WeierstrassSigma(z0+n*k,4.0,-1.0)/(WeierstrassSigma(k,4.0,-1.0))^(n^2) od; # Andrew Hone, Oct 12 2005
A006720 := proc(n)
option remember;
if n <= 3 then
1;
else
(procname(n-1)*procname(n-3)+procname(n-2)^2)/procname(n-4) ;
end if;
end proc: # R. J. Mathar, Jul 12 2012
-
a[0] = a[1] = a[2] = a[3] = 1; a[n_] := a[n] = (a[n - 1] a[n - 3] + a[n - 2]^2)/a[n - 4]; Array[a, 23] (* Robert G. Wilson v, Jul 04 2007 *)
RecurrenceTable[{a[0]==a[1]==a[2]==a[3]==1,a[n]==(a[n-1]a[n-3]+a[n-2]^2)/ a[n-4]},a,{n,30}] (* Harvey P. Dale, Apr 07 2018 *)
b[ n_] := If[-2<=n<=2, {2, 1, 1, 3, 23}[[n+3]], 2*a[n+2]^3*a[n+3] + a[n+1]^2*(a[n+3]*a[n+4] - a[n+2]*a[n+5])]; a[ n_] := If[OddQ[n], b[(n-3)/2], b[-n/2]]; (* Michael Somos, Feb 28 2022 *)
-
a=vector(99);a[1]=a[2]=a[3]=a[4]=1;for(n=5,#a,a[n]=(a[n-1]*a[n-3]+a[n-2]^2)/a[n-4]); a \\ Charles R Greathouse IV, Jun 16 2011
-
from gmpy2 import divexact
A006720 = [1, 1, 1, 1]
for n in range(4, 101):
A006720.append(divexact(A006720[n-1]*A006720[n-3]+A006720[n-2]**2,A006720[n-4]))
# Chai Wah Wu, Sep 01 2014
A025262
a(n) = a(1)*a(n-1) + a(2)*a(n-2) + ... + a(n-1)*a(1) for n >= 4.
Original entry on oeis.org
1, 1, 1, 3, 8, 23, 68, 207, 644, 2040, 6558, 21343, 70186, 232864, 778550, 2620459, 8872074, 30195288, 103246502, 354508628, 1221846856, 4225644866, 14659644348, 51002664023, 177909901566, 622093882290, 2180123564130, 7656055966092
Offset: 1
G.f. = x + x^2 + x^3 + 3*x^4 + 8*x^5 + 23*x^6 + 68*x^7 + 207*x^8 + 644*x^9 + ...
- Seiichi Manyama, Table of n, a(n) for n = 1..1766
- Paul Barry, On the Hurwitz Transform of Sequences, Journal of Integer Sequences, Vol. 15 (2012), #12.8.7.
- Paul Barry, Integer sequences from elliptic curves, arXiv:2306.05025 [math.NT], 2023.
- David Callan, On Ascent, Repetition and Descent Sequences, arXiv:1911.02209 [math.CO], 2019.
- Michael Somos, Number Walls in Combinatorics.
- Fumitaka Yura, Hankel Determinant Solution for Elliptic Sequence, arXiv:1411.6972 [nlin.SI], 2014; see p. 7.
-
nmax = 30; aa = ConstantArray[0, nmax]; aa[[1]] = 1; aa[[2]] = 1; aa[[3]] = 1; Do[aa[[n]] = Sum[aa[[k]] * aa[[n - k]], {k, 1, n - 1}], {n, 4, nmax}]; aa (* Vaclav Kotesovec, Jan 25 2015 *)
Nest[Append[#, #.Reverse[#]] &, {1, 1, 1}, 25] (* Jan Mangaldan, Jul 07 2020 *)
-
{a(n) = polcoeff( (1 - sqrt(1 - 4*x + 4*x^3 + x * O(x^n))) / 2, n)}; /* Michael Somos, Aug 04 2000 */
A028940
a(n) = numerator of the X-coordinate of n*P where P is the generator [0,0] for rational points on the curve y^2 + y = x^3 - x.
Original entry on oeis.org
0, 1, -1, 2, 1, 6, -5, 21, -20, 161, 116, 1357, -3741, 18526, 8385, 480106, -239785, 12551561, -59997896, 683916417, 1849037896, 51678803961, -270896443865, 4881674119706, -16683000076735, 997454379905326
Offset: 1
4P = P[4] = [2, -3].
P[1] to P[16] are [0, 0], [1, 0], [-1, -1], [2, -3], [1/4, -5/8], [6, 14], [-5/9, 8/27], [21/25, -69/125], [-20/49, -435/343], [161/16, -2065/64], [116/529, -3612/12167], [1357/841, 28888/24389], [-3741/3481, -43355/205379], [18526/16641, -2616119/2146689], [8385/98596, -28076979/30959144], [480106/4225, 332513754/274625]. - _N. J. A. Sloane_, Jan 27 2022
- A. W. Knapp, Elliptic Curves, Princeton 1992, p. 77.
-
\\ from N. J. A. Sloane, Jan 27 2022. To get the first 40 points P[n].
\\ define curve E
E = ellinit([0,0,1,-1,0]) \\ y^2+y = x^3-x
P = vector(100)
P[1] = [0,0]
for(n=2, 40, P[n] = elladd(E, P[1], P[n-1]))
P
A051138
Divisibility sequence associated with elliptic curve y^2 + y = x^3 - x and point (1, 0).
Original entry on oeis.org
0, 1, 1, -1, -5, -4, 29, 129, -65, -3689, -16264, 113689, 2382785, 7001471, -398035821, -7911171596, 43244638645, 6480598259201, 124106986093951, -5987117709349201, -541051130050800400, -4830209396684261199
Offset: 0
G.f. = x + x^2 - x^3 - 5*x^4 - 4*x^5 + 29*x^6 + 129*x^7 - 65*x^8 + ...
- T. D. Noe, Table of n, a(n) for n = 0..100
- Clark Kimberling, Strong divisibility sequences and some conjectures, Fib. Quart., 17 (1979), 13-17.
- R. W. Gosper and Richard C. Schroeppel, Somos Sequence Near-Addition Formulas and Modular Theta Functions, arXiv:math/0703470 [math.NT], 2007.
- LMFDB, Elliptic Curve 37.a1
- Helmut Ruhland, Somos-4 and a quartic Surface in RP^3, arXiv:2312.02085 [math.AG], 2023.
- Index to divisibility sequences
-
a[n_ /; n < 0] := -a[-n]; a[0] = 0; A006769[n_] := (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]); a[n] := A006769[2n]; Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Apr 11 2012, after 2nd formula *)
-
an = vector(200); an = concat([ 1, 1, -1, -5 ], an); for( n=5, length(an), an[ n ]=(an[ n-1 ] * an[ n-3 ] + an[ n-2 ]^2) / an[ n-4 ]); a(n) = an[ n ]
-
{a(n) = my(v = [1, 1, -1, -5]); if( n<0, -a(-n), if( n==0, 0, if( n<5, v[n], v = concat( v, vector(n - 4)); for( k=5, n, v[k] = (v[k-1] * v[k-3] + v[k-2]^2) / v[k-4]); v[n])))}; /* Michael Somos, Feb 12 2012 */
-
{a(n) = subst(elldivpol(ellinit([0, 0, 1, -1, 0]), n, 'x), 'x, 1)}; /* Michael Somos, Apr 21 2025 */
A028941
Denominator of X-coordinate of n*P where P is the generator [0,0] for rational points on curve y^2+y = x^3-x.
Original entry on oeis.org
1, 1, 1, 1, 4, 1, 9, 25, 49, 16, 529, 841, 3481, 16641, 98596, 4225, 2337841, 13608721, 67387681, 264517696, 6941055969, 12925188721, 384768368209, 5677664356225, 61935294530404, 49020596163841, 16063784753682169
Offset: 1
- G. Everest, A. J. van der Poorten, I. Shparlinski and T. Ward, Recurrence Sequences: Examples and Applications, AMS Monographs, 2003
- A. W. Knapp, Elliptic Curves, Princeton 1992, p. 77.
-
nxt[{a_,b_,c_,d_,e_,f_}]:={b,c,d,e,f,((c*2e)-f*b+2d^2)/a}; NestList[nxt,{1,1,1,1,4,1},30][[;;,1]] (* Harvey P. Dale, Dec 26 2024 *)
-
- see A028940.
A056010
Number of words of length n in a simple grammar.
Original entry on oeis.org
1, 1, 3, 8, 23, 68, 207, 644, 2040, 6558, 21343, 70186, 232864, 778550, 2620459, 8872074, 30195288, 103246502, 354508628, 1221846856, 4225644866, 14659644348, 51002664023, 177909901566, 622093882290, 2180123564130, 7656055966092
Offset: 0
L(0) = 1, L(1) = e, L(2) = ee + ew + ns, L(3) = eee + ewe + nse + eew + eww + nsw + nes + ens.
G.f. = 1 + x + 3*x^2 + 8*x^3 + 23*x^4 + 68*x^5 + 207*x^6 + 644*x^7 + ...
-
CoefficientList[Series[(1 - 2 x - Sqrt[1 - 4 x + 4 x^3])/(2 x^2), {x, 0, 26}], x] (* Michael De Vlieger, Oct 30 2019 *)
a[ n_] := SeriesCoefficient[ (2 - 2*x)/(1 - 2*x + (1 - 4*x + 4*x^3)^(1/2)), {x, 0, n}]; (* Michael Somos, Oct 27 2024 *)
a[ n_] := If[ n<0, 0, SeriesCoefficient[Nest[(1 + x*#)^2 - x&, 1 + O[x], n], {x, 0, n}]]; (* Michael Somos, Oct 27 2024 *)
-
{a(n) = if( n<0, 0, polcoef( (1 - 2*x - sqrt( 1 - 4*x + 4*x^3 + x^3 * O(x^n)) ) / (2*x^2), n))};
-
{a(n) = if( n<0, 0, polcoef( (2 - 2*x)/(1 - 2*x + (1 - 4*x + 4*x^3 + x*O(x^n))^(1/2)), n))}; /* Michael Somos, Oct 27 2024 */
A050512
a(n) = (a(n-1)*a(n-3) - a(n-2)^2) / a(n-4), with a(0) = 0, a(1) = a(2) = a(3) = 1, a(4) = -1.
Original entry on oeis.org
0, 1, 1, 1, -1, -2, -3, -1, 7, 11, 20, -19, -87, -191, -197, 1018, 2681, 8191, -5841, -81289, -261080, -620551, 3033521, 14480129, 69664119, -2664458, -1612539083, -7758440129, -37029252553, 181003520899, 1721180313660, 12437589708389, 19206818781913
Offset: 0
G.f. = x + x^2 + x^3 - x^4 - 2*x^5 - 3*x^6 - x^7 + 7*x^8 + 11*x^9 + 20*x^10 + ...
- Reinhard Zumkeller, Table of n, a(n) for n = 0..250
- Paul Barry, Jacobsthal Decompositions of Pascal's Triangle, Ternary Trees, and Alternating Sign Matrices, Journal of Integer Sequences, 19, 2016, #16.3.5.
- Paul Barry, Riordan Pseudo-Involutions, Continued Fractions and Somos 4 Sequences, arXiv:1807.05794 [math.CO], 2018.
- Clark Kimberling, Strong divisibility sequences and some conjectures, Fib. Quart., 17 (1979), 13-17.
- LMFDB, Elliptic Curve 43.a1 (Cremona label 43a1)
-
a050512 n = a050512_list !! n
a050512_list = 0 : 1 : 1 : 1 : (-1) : zipWith div (zipWith (-) (zipWith (*)
(drop 4 a050512_list) (drop 2 a050512_list))
(map (^ 2) (drop 3 a050512_list))) (tail a050512_list)
-- Reinhard Zumkeller, Nov 02 2011
-
a[n_?OddQ] := a[n] = a[(n-1)/2]^3*a[(n+3)/2] - a[(n-3)/2]*a[(n+1)/2]^3; a[n_?EvenQ] := a[n] = (a[n/2-1]^2*a[n/2+2] - a[n/2-2]*a[n/2+1]^2)*a[n/2]; a[0] = 0; a[1] = a[2] = a[3] = 1; a[4] = -1; Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Nov 29 2011 *)
Join[{0},RecurrenceTable[{a[1]==a[2]==a[3]==1,a[4]==-1,a[n]==(a[n-1] a[n-3]-a[n-2]^2)/a[n-4]},a,{n,30}]] (* Harvey P. Dale, Mar 23 2012 *)
-
an=vector(200); for(n=1,4,an[ n ]=[ 1,1,1,-1 ][ n ]); for(n=5, length(an),an[ n ]=(an[ n-1 ]*an[ n-3 ]-an[ n-2 ]^2)/an[ n-4 ]); a(n) =sign(n)*an[ abs(n)+(n==0) ]
-
{a(n) = my(an); if( n<0, -a(-n), if( n==0, 0, an = vector( max(4, n), i, 1); an[4] = -1; for( k=5, n, an[k] = (an[k-1] * an[k-3] - an[k-2]^2) / an[k-4]); an[n]))}; /* Michael Somos, Jul 07 2014 */
A247369
a(n) = (a(n-1) * a(n-3) + (-1)^n * a(n-2)^2) / a(n-4), with a(0) = 0, a(1) = -1, a(2) = a(3) = a(4) = 1, a(9) = 3.
Original entry on oeis.org
0, -1, 1, 1, 1, 0, 1, 1, 1, 3, 4, -5, 1, -7, 9, 8, 25, -23, 49, 87, 16, 295, 529, -903, 841, -1256, 3481, -1495, 16641, -44341, 98596, 217651, 4225, 1058961, 2337841, -5106896, 13608721, 5415345, 67387681, -173830481, 264517696, -2288275633, 6941055969
Offset: 0
-
a247369 n = a247369_list !! n
a247369_list = [0, -1, 1, 1, 1, 0] ++ xs where
xs = [1, 1, 1, 3] ++ 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
-
I:=[3, 4, -5, 1]; [0, -1, 1, 1, 1, 0, 1, 1, 1] 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
-
Join[{0, -1, 1, 1, 1, 0, 1, 1, 1}, RecurrenceTable[{a[9]==3, a[10]==4, a[11]==-5, a[12]==1, a[n]==(a[n-1]a[n-3] + (-1)^n a[n-2]^2)/a[n-4]}, a, {n, 9, 30}]] (* G. C. Greubel, Aug 05 2018 *)
-
{a(n) = my(A = [-1, 1, 1, 1]); n=abs(n); if( n==0, 0, if( n<5, A[n], A = concat(A, vector(n-4)); for(k=5, n, A[k] = if( k==9, 3, (A[k-1] * A[k-3] + (-1)^k * A[k-2]^2) / A[k-4])); A[n]))};
Showing 1-10 of 11 results.
Comments