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”).
%I M1278 #247 Aug 29 2024 06:05:19
%S 2,4,14,52,194,724,2702,10084,37634,140452,524174,1956244,7300802,
%T 27246964,101687054,379501252,1416317954,5285770564,19726764302,
%U 73621286644,274758382274,1025412242452,3826890587534,14282150107684,53301709843202,198924689265124
%N a(n) = 4*a(n-1) - a(n-2) with a(0) = 2, a(1) = 4.
%C a(n) gives values of x satisfying x^2 - 3*y^2 = 4; corresponding y values are given by 2*A001353(n).
%C If M is any given term of the sequence, then the next one is 2*M + sqrt(3*M^2 - 12). - _Lekraj Beedassy_, Feb 18 2002
%C For n > 0, the three numbers a(n) - 1, a(n), and a(n) + 1 form a Fleenor-Heronian triangle, i.e., a Heronian triangle with consecutive sides, whose area A(n) may be obtained from the relation [4*A(n)]^2 = 3([a(2n)]^2 - 4); or A(n) = 3*A001353(2*n)/2 and whose semiperimeter is 3*a[n]/2. The sequence is symmetrical about a[0], i.e., a[-n] = a[n].
%C For n > 0, a(n) + 2 is the number of dimer tilings of a 2*n X 2 Klein bottle (cf. A103999).
%C Tsumura shows that, for prime p, a(p) is composite (contrary to a conjecture of Juricevic). - _Charles R Greathouse IV_, Apr 13 2010
%C Except for the first term, positive values of x (or y) satisfying x^2 - 4*x*y + y^2 + 12 = 0. - _Colin Barker_, Feb 04 2014
%C Except for the first term, positive values of x (or y) satisfying x^2 - 14*x*y + y^2 + 192 = 0. - _Colin Barker_, Feb 16 2014
%C A268281(n) - 1 is a member of this sequence iff A268281(n) is prime. - _Frank M Jackson_, Feb 27 2016
%C a(n) gives values of x satisfying 3*x^2 - 4*y^2 = 12; corresponding y values are given by A005320. - _Sture Sjöstedt_, Dec 19 2017
%C Middle side lengths of almost-equilateral Heronian triangles. - _Wesley Ivan Hurt_, May 20 2020
%C For all elements k of the sequence, 3*(k-2)*(k+2) is a square. - _Davide Rotondo_, Oct 25 2020
%D B. C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, see p. 82.
%D J. M. Borwein and P. B. Borwein, Pi and the AGM, Wiley, 1987, p.91.
%D Michael P. Cohen, Generating Heronian Triangles With Consecutive Integer Sides. Journal of Recreational Mathematics, vol. 30 no. 2 1999-2000 p. 123.
%D L. E. Dickson, History of The Theory of Numbers, Vol. 2 pp. 197;198;200;201. Chelsea NY.
%D Charles R. Fleenor, Heronian Triangles with Consecutive Integer Sides, Journal of Recreational Mathematics, Volume 28, no. 2 (1996-7) 113-115.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%D R. P. Stanley. Enumerative combinatorics. Vol. 2, volume 62 of Cambridge Studies in Advanced Mathematics. Cambridge University Press, Cambridge, 1999.
%D V. D. To, "Finding All Fleenor-Heronian Triangles", Journal of Recreational Mathematics vol. 32 no.4 2003-4 pp. 298-301 Baywood NY.
%H T. D. Noe, <a href="/A003500/b003500.txt">Table of n, a(n) for n=0..200</a>
%H P. Bala, <a href="/A174500/a174500_2.pdf">Some simple continued fraction expansions for an infinite product, Part 1</a>
%H R. A. Beauregard and E. R. Suryanarayan, <a href="http://www.maa.org/sites/default/files/pdf/mathdl/CMJ/methodoflastresort.pdf">The Brahmagupta Triangles</a>, The College Mathematics Journal 29(1) 13-7 1998 MAA.
%H Hacène Belbachir, Soumeya Merwa Tebtoub and László Németh, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL23/Nemeth/nemeth7.html">Ellipse Chains and Associated Sequences</a>, J. Int. Seq., Vol. 23 (2020), Article 20.8.5.
%H Daniel Birmajer, Juan B. Gil and Michael D. Weiner, <a href="http://arxiv.org/abs/1505.06339">Linear recurrence sequences with indices in arithmetic progression and their sums</a>, arXiv preprint arXiv:1505.06339 [math.NT], 2015.
%H K. S. Brown's Mathpages, <a href="http://www.mathpages.com/home/kmath480/kmath480.htm">Some Properties of the Lucas Sequence(2, 4, 14, 52, 194, ...)</a>
%H H. W. Gould, <a href="http://www.fq.math.ca/Scanned/11-1/gould.pdf">A triangle with integral sides and area</a>, Fib. Quart., 11 (1973), 27-39.
%H Tanya Khovanova, <a href="http://www.tanyakhovanova.com/RecursiveSequences/RecursiveSequences.html">Recursive Sequences</a>
%H E. Keith Lloyd, <a href="http://www.jstor.org/stable/3619201">The Standard Deviation of 1, 2, ..., n: Pell's Equation and Rational Triangles</a>, Math. Gaz. vol 81 (1997), 231-243.
%H S. Northshield, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Northshield/north4.html">An Analogue of Stern's Sequence for Z[sqrt(2)]</a>, Journal of Integer Sequences, 18 (2015), #15.11.6.
%H Hideyuki Ohtskua, proposer, <a href="https://www.fq.math.ca/Problems/FQElemProbAug2024.pdf">Problem B-1351</a>, Elementary Problems and Solutions, The Fibonacci Quarterly, Vol. 62, No. 3 (2024), p. 258.
%H Simon Plouffe, <a href="https://arxiv.org/abs/0911.4975">Approximations de séries génératrices et quelques conjectures</a>, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
%H Simon Plouffe, <a href="/A000051/a000051_2.pdf">1031 Generating Functions</a>, Appendix to Thesis, Montreal, 1992
%H Jeffrey Shallit, <a href="http://www.jstor.org/stable/2690344">An interesting continued fraction</a>, Math. Mag., 48 (1975), 207-211.
%H Jeffrey Shallit, <a href="/A005248/a005248_1.pdf">An interesting continued fraction</a>, Math. Mag., 48 (1975), 207-211. [Annotated scanned copy]
%H Yu Tsumura, <a href="http://arxiv.org/abs/1004.1244">On compositeness of special types of integers</a>, arXiv:1004.1244 [math.NT], 2010.
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/HeronianTriangle.html">Heronian Triangle</a>
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Heronian_triangle">Heronian triangle</a>
%H A. V. Zarelua, <a href="https://doi.org/10.1007/s11006-006-0090-y">On Matrix Analogs of Fermat's Little Theorem</a>, Mathematical Notes, vol. 79, no. 6, 2006, pp. 783-796. Translated from Matematicheskie Zametki, vol. 79, no. 6, 2006, pp. 840-855.
%H <a href="/index/Rea#recur1">Index entries for recurrences a(n) = k*a(n - 1) +/- a(n - 2)</a>
%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (4,-1).
%F a(n) = ( 2 + sqrt(3) )^n + ( 2 - sqrt(3) )^n.
%F a(n) = 2*A001075(n).
%F G.f.: 2*(1 - 2*x)/(1 - 4*x + x^2). _Simon Plouffe_ in his 1992 dissertation.
%F a(n) = A001835(n) + A001835(n+1).
%F a(n) = trace of n-th power of the 2 X 2 matrix [1 2 / 1 3]. - _Gary W. Adamson_, Jun 30 2003 [corrected by _Joerg Arndt_, Jun 18 2020]
%F From the addition formula, a(n+m) = a(n)*a(m) - a(m-n), it is easy to derive multiplication formulas, such as: a(2*n) = (a(n))^2 - 2, a(3*n) = (a(n))^3 - 3*(a(n)), a(4*n) = (a(n))^4 - 4*(a(n))^2 + 2, a(5*n) = (a(n))^5 - 5*(a(n))^3 + 5*(a(n)), a(6*n) = (a(n))^6 - 6*(a(n))^4 + 9*(a(n))^2 - 2, etc. The absolute values of the coefficients in the expansions are given by the triangle A034807. - _John Blythe Dobson_, Nov 04 2007
%F a(n) = 2*A001353(n+1) - 4*A001353(n). - _R. J. Mathar_, Nov 16 2007
%F From _Peter Bala_, Jan 06 2013: (Start)
%F Let F(x) = Product_{n=0..infinity} (1 + x^(4*n + 1))/(1 + x^(4*n + 3)). Let alpha = 2 - sqrt(3). This sequence gives the simple continued fraction expansion of 1 + F(alpha) = 2.24561 99455 06551 88869 ... = 2 + 1/(4 + 1/(14 + 1/(52 + ...))). Cf. A174500.
%F Also F(-alpha) = 0.74544 81786 39692 68884 ... has the continued fraction representation 1 - 1/(4 - 1/(14 - 1/(52 - ...))) and the simple continued fraction expansion 1/(1 + 1/((4 - 2) + 1/(1 + 1/((14 - 2) + 1/(1 + 1/((52 - 2) + 1/(1 + ...))))))).
%F F(alpha)*F(-alpha) has the simple continued fraction expansion 1/(1 + 1/((4^2 - 4) + 1/(1 + 1/((14^2 - 4) + 1/(1 + 1/((52^2 - 4) + 1/(1 + ...))))))).
%F (End)
%F a(2^n) = A003010(n). - _John Blythe Dobson_, Mar 10 2014
%F a(n) = [x^n] ( (1 + 4*x + sqrt(1 + 8*x + 12*x^2))/2 )^n for n >= 1. - _Peter Bala_, Jun 23 2015
%F E.g.f.: 2*exp(2*x)*cosh(sqrt(3)*x). - _Ilya Gutkovskiy_, Apr 27 2016
%F a(n) = Sum_{k=0..floor(n/2)} (-1)^k*n*(n - k - 1)!/(k!*(n - 2*k)!)*4^(n - 2*k) for n >= 1. - _Peter Luschny_, May 10 2016
%F From _Peter Bala_, Oct 15 2019: (Start)
%F a(n) = trace(M^n), where M is the 2 X 2 matrix [0, 1; -1, 4].
%F Consequently the Gauss congruences hold: a(n*p^k) = a(n*p^(k-1)) ( mod p^k ) for all prime p and positive integers n and k. See Zarelua and also Stanley (Ch. 5, Ex. 5.2(a) and its solution).
%F 2*Sum_{n >= 1} 1/( a(n) - 6/a(n) ) = 1.
%F 6*Sum_{n >= 1} (-1)^(n+1)/( a(n) + 2/a(n) ) = 1.
%F 8*Sum_{n >= 1} 1/( a(n) + 24/(a(n) - 12/(a(n))) ) = 1.
%F 8*Sum_{n >= 1} (-1)^(n+1)/( a(n) + 8/(a(n) + 4/(a(n))) ) = 1.
%F Series acceleration formulas for sums of reciprocals:
%F Sum_{n >= 1} 1/a(n) = 1/2 - 6*Sum_{n >= 1} 1/(a(n)*(a(n)^2 - 6)),
%F Sum_{n >= 1} 1/a(n) = 1/8 + 24*Sum_{n >= 1} 1/(a(n)*(a(n)^2 + 12)),
%F Sum_{n >= 1} (-1)^(n+1)/a(n) = 1/6 + 2*Sum_{n >= 1} (-1)^(n+1)/(a(n)*(a(n)^2 + 2)) and
%F Sum_{n >= 1} (-1)^(n+1)/a(n) = 1/8 + 8*Sum_{n >= 1} (-1)^(n+1)/(a(n)*(a(n)^2 + 12)).
%F Sum_{n >= 1} 1/a(n) = ( theta_3(2-sqrt(3))^2 - 1 )/4 = 0.34770 07561 66992 06261 .... See Borwein and Borwein, Proposition 3.5 (i), p.91.
%F Sum_{n >= 1} (-1)^(n+1)/a(n) = ( 1 - theta_3(sqrt(3)-2)^2 )/4. Cf. A003499 and A153415. (End)
%F a(n) = tan(Pi/12)^n + tan(5*Pi/12)^n. - _Greg Dresden_, Oct 01 2020
%F From _Wolfdieter Lang_, Sep 06 2021: (Start)
%F a(n) = S(n, 4) - S(n-2, 4) = 2*T(n, 2), for n >= 0, with S and T Chebyshev polynomials, with S(-1, x) = 0 and S(-2, x) = -1. S(n, 4) = A001353(n+1), for n >= -1, and T(n, 2) = A001075(n).
%F a(2*k) = A067902(k), a(2*k+1) = 4*A001570(k+1), for k >= 0. (End)
%F a(n) = sqrt(2 + 2*A011943(n+1)) = sqrt(2 + 2*A102344(n+1)), n>0. - _Ralf Steiner_, Sep 23 2021
%F Sum_{n>=1} arctan(3/a(n)^2) = Pi/6 - arctan(1/3) = A019673 - A105531 (Ohtskua, 2024). - _Amiram Eldar_, Aug 29 2024
%p A003500 := proc(n) option remember; if n <= 1 then 2*n+2 else 4*procname(n-1)-procname(n-2); fi;
%p end proc;
%t a[0]=2; a[1]=4; a[n_]:= a[n]= 4a[n-1] -a[n-2]; Table[a[n], {n, 0, 23}]
%t LinearRecurrence[{4,-1},{2,4},30] (* _Harvey P. Dale_, Aug 20 2011 *)
%t Table[Round@LucasL[2n, Sqrt[2]], {n, 0, 20}] (* _Vladimir Reshetnikov_, Sep 15 2016 *)
%o (Sage) [lucas_number2(n,4,1) for n in range(0, 24)] # _Zerinvary Lajos_, May 14 2009
%o (Haskell)
%o a003500 n = a003500_list !! n
%o a003500_list = 2 : 4 : zipWith (-)
%o (map (* 4) $ tail a003500_list) a003500_list
%o -- _Reinhard Zumkeller_, Dec 17 2011
%o (PARI) x='x+O('x^99); Vec(-2*(-1+2*x)/(1-4*x+x^2)) \\ _Altug Alkan_, Apr 04 2016
%o (Magma) I:=[2,4]; [n le 2 select I[n] else 4*Self(n-1)-Self(n-2): n in [1..30]]; // _Vincenzo Librandi_, Nov 14 2018
%Y Cf. A001075, A001353, A001835.
%Y Cf. A011945 (areas), A334277 (perimeters).
%Y Cf. this sequence (middle side lengths), A016064 (smallest side lengths), A335025 (largest side lengths).
%Y Cf. A001570, A002530, A005320, A006051, A048788, A174500, A268281.
%Y Cf. A011943, A102344, A019673, A105531.
%K nonn,easy,nice
%O 0,1
%A _N. J. A. Sloane_
%E More terms from _James A. Sellers_, May 03 2000
%E Additional comments from _Lekraj Beedassy_, Feb 14 2002