login
Solution to a Diophantine equation: each term is a triangular number and each term + 1 is a square.
(Formerly M3004)
15

%I M3004 #118 Feb 18 2023 15:46:19

%S 0,3,15,120,528,4095,17955,139128,609960,4726275,20720703,160554240,

%T 703893960,5454117903,23911673955,185279454480,812293020528,

%U 6294047334435,27594051024015,213812329916328,937385441796000,7263325169820735,31843510970040003,246739243443988680

%N Solution to a Diophantine equation: each term is a triangular number and each term + 1 is a square.

%C Alternative definition: a(n) is triangular and a(n)/2 is the harmonic average of consecutive triangular numbers. See comments and formula section of A005563, of which this sequence is a subsequence. - _Raphie Frank_, Sep 28 2012

%C As with the Sophie Germain triangular numbers (A124174), 35 = (a(n) - a(n-6))/(a(n-2) - a(n-4)). - _Raphie Frank_, Sep 28 2012

%C Sophie Germain triangular numbers of the second kind as defined in A217278. - _Raphie Frank_, Feb 02 2013

%C Triangular numbers m such that m+1 is a square. - _Bruno Berselli_, Jul 15 2014

%C From _Vladimir Pletser_, Apr 30 2017: (Start)

%C Numbers a(n) which are the triangular number T(b(n)), where b(n) is the sequence A006451(n) of numbers n such that T(n)+1 is a square.

%C a(n) also gives the x solutions of the 3rd-degree Diophantine Bachet-Mordell equation y^2 = x^3 + K, with y = T(b(n))*sqrt(T(b(n))+1) = A285955(n) and K = T(b(n))^2 = A285985(n), the square of the triangular number of b(n) = A006451(n).

%C Also: This sequence is a subsequence of A000217(n), namely A000217(A006451(n)). (End)

%D Edward J. Barbeau, Pell's Equation, New York: Springer-Verlag, 2003, p. 17, Exercise 1.2.

%D Allan J. Gottlieb, How four dogs meet in a field, and other problems, Technology Review, Jul/August 1973, pp. 73-74.

%D Vladimir Pletser, On some solutions of the Bachet-Mordell equation for large parameter values, to be submitted, April 2017.

%D Jeffrey Shallit, personal communication.

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H Vladimir Pletser, <a href="/A006454/b006454.txt">Table of n, a(n) for n = 0..1000</a> (first 60 terms from Vincenzo Librandi)

%H M.A. Bennett and A. Ghadermarzi, <a href="http://www.math.ubc.ca/~bennett/BeGa-data.htm">Data on Mordell's curve</a>.

%H Michael A. Bennett and Amir Ghadermarzi, <a href="https://arxiv.org/abs/1311.7077">Mordell's equation : a classical approach</a>, arXiv:1311.7077 [math.NT], 2013.

%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="/A006449/a006449.pdf">Letter to N. J. A. Sloane</a>, Oct. 1975.

%H K. B. Subramaniam, <a href="https://www.fq.math.ca/Scanned/37-3/subramaniam.pdf">Almost Square Triangular Numbers</a>, The Fibonacci Quarterly, Vol. 37, No. 3 (1999), pp. 194-197.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/MordellCurve.html">Mordell Curve</a>.

%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (1,34,-34,-1,1).

%F a(n) = A006451(n)*(A006451(n)+1)/2.

%F a(n) = A006452(n)^2 - 1. - _Joerg Arndt_, Mar 04 2011

%F a(n) = 35*(a(n-2) - a(n-4)) + a(n-6). - _Raphie Frank_, Sep 28 2012

%F From _Raphie Frank_, Feb 01 2013: (Start)

%F a(0) = 0, a(1) = 3, and a(n+2) = (2x + 3y + 1)^2 - 1 = 1/2*((3x + 4y + 1)^2 + (3x + 4y + 1)) where x = (sqrt(8*a(n) + 1) - 1)/2 = A006451(n) = 1/2*(A216134(n + 1) + A216134(n - 1)) and y = sqrt(a(n) + 1) = A006452(n + 1) = 1/2*(A216134(n + 1) - A216134(n - 1)).

%F Note that A216134(n + 1) = x + y, and A216134(n + 3) = (2x + 3y + 1) + (3x + 4y + 1) = (5x + 7y + 2), where A216134 gives the indices of the Sophie Germain triangular numbers. (End)

%F a(n) = (1/64)*(((4 + sqrt(2))*(1 -(-1)^(n+1)*sqrt(2))^(2* floor((n+1)/2)) + (4 - sqrt(2))*(1 + (-1)^(n+1)*sqrt(2))^(2*floor((n+1)/2))))^2 - 1. - _Raphie Frank_, Dec 20 2015

%F From _Vladimir Pletser_, Apr 30 2017: (Start)

%F Since b(n) = 8*sqrt(T(b(n-2))+1)+ b(n-4) = 8*sqrt((b(n-2)*(b(n-2)+1)/2)+1)+ b(n-4), with b(-1)=-1, b(0)=0, b(1)=2, b(2)=5 (see A006451) and a(n) = T(b(n)) (this sequence), we have:

%F a(n) = ((8*sqrt((b(n-2)*(b(n-2)+1)/2)+1)+ b(n-4))*(8*sqrt((b(n-2)*(b(n-2)+1)/2)+1)+ b(n-4)+1)/2). (End)

%F From _Colin Barker_, Apr 30 2017: (Start)

%F G.f.: 3*x*(1 + 4*x + x^2) / ((1 - x)*(1 - 6*x + x^2)*(1 + 6*x + x^2)).

%F a(n) = a(n-1) + 34*a(n-2) - 34*a(n-3) - a(n-4) + a(n-5) for n > 4.

%F (End)

%F a(n) = (A001109(n/2+1) - 2*A001109(n/2))^2 - 1 if n is even, and (A001109((n+3)/2) - 4*A001109((n+1)/2))^2 - 1 if n is odd (Subramaniam, 1999). - _Amiram Eldar_, Jan 13 2022

%e From _Raphie Frank_, Sep 28 2012: (Start)

%e 35*(528 - 15) + 0 = 17955 = a(6),

%e 35*(4095 - 120) + 3 = 139128 = a(7),

%e 35*(17955 - 528) + 15 = 609960 = a(8),

%e 35*(139128 - 4095) + 120 = 4726275 = a(9). (End)

%e From _Raphie Frank_, Feb 02 2013: (Start)

%e a(7) = 139128 and a(9) = 4726275.

%e a(9) = (2*(sqrt(8*a(7) + 1) - 1)/2 + 3*sqrt(a(7) + 1) + 1)^2 - 1 = (2*(sqrt(8*139128 + 1) - 1)/2 + 3*sqrt(139128 + 1) + 1)^2 - 1 = 4726275.

%e a(9) = 1/2*((3*(sqrt(8*a(7) + 1) - 1)/2 + 4*sqrt(a(7) + 1) + 1)^2 + (3*(sqrt(8*a(7) + 1) - 1)/2 + 4*sqrt(a(7) + 1) + 1)) = 1/2*((3*(sqrt(8*139128 + 1) - 1)/2 + 4*sqrt(139128 + 1) + 1)^2 + (3*(sqrt(8*139128 + 1) - 1)/2 + 4*sqrt(139128 + 1) + 1)) = 4726275. (End)

%e From _Vladimir Pletser_, Apr 30 2017: (Start)

%e For n=2, b(n)=5, a(n)=15

%e For n=5, b(n)=90, a(n)= 4095

%e For n = 3, A006451(n) = 15. Therefore, A000217(A006451(n)) = A000217(15) = 120. (End)

%p A006454:=-3*z*(1+4*z+z**2)/(z-1)/(z**2-6*z+1)/(z**2+6*z+1); # conjectured (correctly) by _Simon Plouffe_ in his 1992 dissertation

%p restart: bm2:=-1: bm1:=0: bp1:=2: bp2:=5: print ('0,0','1,3','2,15'); for n from 3 to 1000 do b:= 8*sqrt((bp1^2+bp1)/2+1)+bm2; a:=b*(b+1)/2; print(n,a); bm2:=bm1; bm1:=bp1; bp1:=bp2; bp2:=b; end do: # _Vladimir Pletser_, Apr 30 2017

%t Clear[a]; a[0] = a[1] = 1; a[2] = 2; a[3] = 4; a[n_] := 6a[n - 2] - a[n - 4]; Array[a, 40]^2 - 1 (* _Vladimir Joseph Stephan Orlovsky_, Mar 03 2011 *)

%t LinearRecurrence[{1,34,-34,-1,1},{0,3,15,120,528},30] (* _Harvey P. Dale_, Feb 18 2023 *)

%o (Magma) I:=[0,3,15,120,528,4095]; [n le 6 select I[n] else 35*(Self(n-2) - Self(n-4)) + Self(n-6): n in [1..30]]; // _Vincenzo Librandi_, Dec 21 2015

%o (PARI) concat(0, Vec(3*x*(1 + 4*x + x^2) / ((1 - x)*(1 - 6*x + x^2)*(1 + 6*x + x^2)) + O(x^30))) \\ _Colin Barker_, Apr 30 2017

%Y Cf. sqrt(a(n) + 1) = A006452(n + 1) = A216162(2n + 2) and (sqrt(8a(n) + 1) - 1)/2 = A006451.

%Y Cf. A217278, A124174, A216134. - _Raphie Frank_, Feb 02 2013

%Y Subsequence of A182334.

%Y Cf. A001109, A245031.

%Y Cf. A285955, A285985, A000217, A006451, A081119, A054504. - _Vladimir Pletser_, Apr 30 2017

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_, _Jeffrey Shallit_

%E Better description from _Harvey P. Dale_, Jan 28 2001

%E More terms from Larry Reeves (larryr(AT)acm.org), Feb 07 2001

%E Minor edits by _N. J. A. Sloane_, Oct 24 2009