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”).

Numbers n such that n(n - 1)/2 is a square.
17

%I #178 Jan 05 2025 19:51:36

%S 1,2,9,50,289,1682,9801,57122,332929,1940450,11309769,65918162,

%T 384199201,2239277042,13051463049,76069501250,443365544449,

%U 2584123765442,15061377048201,87784138523762,511643454094369,2982076586042450,17380816062160329,101302819786919522

%N Numbers n such that n(n - 1)/2 is a square.

%C Numbers n such that (n-th triangular number - n) is a square.

%C Gives solutions to A007913(2x)=A007913(x-1). - _Benoit Cloitre_, Apr 07 2002

%C Number of closed walks of length 2n on the grid graph P_2 X P_3. - _Mitch Harris_, Mar 06 2004

%C If x = A001109(n - 1), y = a(n) and z = x^2 + y, then x^4 + y^3 = z^2. - _Bruno Berselli_, Aug 24 2010

%C The product of any term a(n) with an even successor a(n + 2k) is always a square number. The product of any term a(n) with an odd successor a(n + 2k + 1) is always twice a square number. - _Bradley Klee_ & _Bill Gosper_, Jul 22 2015

%C It appears that dividing even terms by two and taking the square root gives sequence A079496. - _Bradley Klee_, Jul 25 2015

%C The bisections of this sequence are a(2n - 1) = A055792(n) and a(2n) = A088920(n). - _Bernard Schott_, Apr 19 2020

%D A. H. Beiler, Recreations in the Theory of Numbers, Dover, N.Y., 1964, p. 193.

%D P. Tauvel, Exercices d'Algèbre Générale et d'Arithmétique, Dunod, 2004, Exercice 35 pages 346-347.

%H Colin Barker, <a href="/A055997/b055997.txt">Table of n, a(n) for n = 1..100</a>

%H Dario Alpern, <a href="https://www.alpertron.com.ar/SUMPOWER.HTM#4_3_2">a^4+b^3=c^2</a>.

%H Phil Lafer, <a href="https://web.archive.org/web/2024*/https://www.fq.math.ca/Scanned/9-1/lafer.pdf">Discovering the square-triangular numbers</a>, Fib. Quart., 9 (1971), 93-105.

%H Giovanni Lucca, <a href="https://forumgeom.fau.edu/FG2018volume18/FG201808index.html">Integer Sequences and Circle Chains Inside a Circular Segment</a>, Forum Geometricorum, Vol. 18 (2018), 47-55.

%H Kenneth Ramsey, <a href="/A055997/a055997.txt">Generalized Proof re Square Triangular Numbers</a>, message 62 in Triangular_and_Fibonacci_Numbers Yahoo group, Oct 10, 2011.

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

%F a(n) = 6*a(n - 1) - a(n - 2) - 2; n >= 3, a(1) = 1, a(2) = 2.

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

%F a(n) - 1 + sqrt(2*a(n)*(a(n) - 1)) = A001652(n - 1). - _Charlie Marion_, Jul 21 2003; corrected by _Michel Marcus_, Apr 20 2020

%F a(n) = IF(mod(n; 2)=0; (((1 - sqrt(2))^n + (1 + sqrt(2))^n)/2)^2; 2*((((1 - sqrt(2))^(n + 1) + (1 + sqrt(2))^(n + 1)) - (((1 - sqrt(2))^n + (1 + sqrt(2))^n)))/4)^2). The odd-indexed terms are a(2n + 1) = [A001333(2n)]^2; the even-indexed terms are a(2n) = [A001333(2n - 1)]^2 + 1 = 2*[A001653(n)]^2. - _Antonio Alberto Olivares_, Jan 31 2004; corrected by _Bernard Schott_, Apr 20 2020

%F A053141(n + 1) + a(n + 1) = A001541(n + 1) + A001109(n + 1). - _Creighton Dement_, Sep 16 2004

%F a(n) = (1/2) + (1/4)*(3+2*sqrt(2))^(n-1) + (1/4)*(3-2*sqrt(2))^(n-1). - _Antonio Alberto Olivares_, Feb 21 2006; corrected by _Michel Marcus_, Apr 20 2020

%F a(n) = A001653(n)-A001652(n-1). - _Charlie Marion_, Apr 10 2006; corrected by _Michel Marcus_, Apr 20 2020

%F a(2k) = A001541(k)^2. - _Alexander Adamchuk_, Nov 24 2006

%F a(n) = 2*A001653(m)*A011900(n-m-1) +A002315(m)*A001652(n-m-1) - A001108(m) with m<n; otherwise, a(n) = 2*A001653(m)*A011900(m-n) - A002315(m)*A046090(m-n) - A001108(m). See Link to Generalized Proof re Square Triangular Numbers. - _Kenneth J Ramsey_, Oct 13 2011

%F a(n) = +7*a(n-1) -7*a(n-2) +1*a(n-3). - _Joerg Arndt_, Mar 06 2013

%F a(n) * a(n+2) = (A001108(n)-A001652(n)+3*A046090(n))^2. - _Robert Israel_, Jul 23 2015

%F sqrt(a(n+1)*a(n-1)) = a(n)+1 - _Bradley Klee_ & _Bill Gosper_, Jul 25 2015

%F a(n) = 1 + sum{k=0..n-2} A002315(k). - _David Pasino_, Jul 09 2016; corrected by _Michel Marcus_, Apr 20 2020

%F E.g.f.: (2*exp(x) + exp((3-2*sqrt(2))*x) + exp((3+2*sqrt(2))*x))/4. - _Ilya Gutkovskiy_, Jul 09 2016

%F sqrt(a(n)*(a(n)-1)/2) = A001542(n)/2. - _David Pasino_, Jul 09 2016

%F Limit_{n -> infinity} a(n)/a(n-1) = A156035. - _César Aguilera_, Apr 07 2018

%F a(n) = (1/4)*(t^2 + t^(-2) + 2), where t = (1+sqrt(2))^(n-1). - _Ridouane Oudra_, Nov 29 2019

%F sqrt(a(n)) + sqrt(a(n) - 1) = (1 + sqrt(2))^(n - 1). - _Ridouane Oudra_, Nov 29 2019

%F sqrt(a(n)) - sqrt(a(n) - 1) = (-1 + sqrt(2))^(n - 1). - _Bernard Schott_, Apr 18 2020

%p A:= gfun:-rectoproc({a(n) = 6*a(n-1)-a(n-2)-2, a(1) = 1, a(2) = 2}, a(n), remember):

%p map(A,[$1..100]); # _Robert Israel_, Jul 22 2015

%t Table[ 1/4*(2 + (3 - 2*Sqrt[2])^k + (3 + 2*Sqrt[2])^k ) // Simplify, {k, 0, 20}] (* _Jean-François Alcover_, Mar 06 2013 *)

%t CoefficientList[Series[(1 - 5 x + 2 x^2) / ((1 - x) (1 - 6 x + x^2)), {x, 0, 40}], x] (* _Vincenzo Librandi_, Mar 20 2015 *)

%t (1 + ChebyshevT[#, 3])/2 & /@ Range[0, 20] (* _Bill Gosper_, Jul 20 2015 *)

%t a[1]=1;a[2]=2;a[n_]:=(a[n-1]+1)^2/a[n-2];a/@Range[25] (* _Bradley Klee_, Jul 25 2015 *)

%t LinearRecurrence[{7,-7,1},{1,2,9},30] (* _Harvey P. Dale_, Dec 06 2015 *)

%o (PARI) Vec((1-5*x+2*x^2)/((1-x)*(1-6*x+x^2))+O(x^66)) /* _Joerg Arndt_, Mar 06 2013 */

%o (PARI) t(n)=(1+sqrt(2))^(n-1);

%o for(k=1,24,print1(round((1/4)*(t(k)^2 + t(k)^(-2) + 2)),", ")) \\ _Hugo Pfoertner_, Nov 29 2019

%o (PARI) a(n) = (1 + polchebyshev(n-1, 1, 3))/2; \\ _Michel Marcus_, Apr 21 2020

%o (Magma) I:=[1,2,9]; [n le 3 select I[n] else 7*Self(n-1)-7*Self(n-2)+Self(n-3): n in [1..30]]; // _Vincenzo Librandi_, Mar 20 2015

%Y Cf. A007913, A001541.

%Y A001109(n-1) = sqrt{[(a(n))^2 - (a(n))]/2}.

%Y a(n) = A001108(n-1)+1.

%Y A001110(n-1)=a(n)*(a(n)-1)/2.

%Y Cf. A001652, A001653, A046090.

%Y Identical to A115599, but with additional leading term.

%K easy,nice,nonn

%O 1,2

%A _Barry E. Williams_, Jun 14 2000