A001652 a(n) = 6*a(n-1) - a(n-2) + 2 with a(0) = 0, a(1) = 3.
0, 3, 20, 119, 696, 4059, 23660, 137903, 803760, 4684659, 27304196, 159140519, 927538920, 5406093003, 31509019100, 183648021599, 1070379110496, 6238626641379, 36361380737780, 211929657785303, 1235216565974040, 7199369738058939, 41961001862379596, 244566641436218639
Offset: 0
Examples
The first few triples are (0,1,1), (3,4,5), (20,21,29), (119,120,169), ...
References
- A. H. Beiler, Recreations in the Theory of Numbers. New York: Dover, pp. 122-125, 1964.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Links
- T. D. Noe, Table of n, a(n) for n = 0..200
- I. Adler, Three Diophantine equations - Part II, Fib. Quart., 7 (1969), 181-193.
- Christian Aebi and Grant Cairns, Lattice equable quadrilaterals III: tangential and extangential cases, Integers (2023) Vol. 23, #A48.
- Martin V. Bonsangue, Gerald E. Gannon and Laura J. Pheifer, Misinterpretations can sometimes be a good thing, Math. Teacher, vol. 95, No. 6 (2002) pp. 446-449.
- Henk Bruin and Robbert Fokkink, On the records and zeros of a deterministic random walk, arXiv:2503.11734 [math.DS], 2025. See p. 5.
- T. W. Forget and T. A. Larkin, Pythagorean triads of the form X, X+1, Z described by recurrence sequences, Fib. Quart., 6 (No. 3, 1968), 94-104.
- Thibault Gauthier, Deep Reinforcement Learning for Synthesizing Functions in Higher-Order Logic, arXiv:1910.11797 [cs.AI], 2019. See also EPiC Series in Computing, (2020) Vol. 73, 230-248.
- L. J. Gerstein, Pythagorean triples and inner products, Math. Mag., 78 (2005), 205-213.
- Ron Knott, Pythagorean Triples and Online Calculators
- A. Martin, Table of prime rational right-angled triangles, The Mathematical Magazine, 2 (1910), 297-324.
- A. Martin, Table of prime rational right-angled triangles (annotated scans of a few pages)
- A. Martin, On rational right-angled triangles, Proceedings of the Fifth International Congress of Mathematicians (Cambridge, 22-28 August 1912).
- S. P. Mohanty, Which triangular numbers are products of three consecutive integers, Acta Math. Hungar., 58 (1991), 31-36.
- Vladimir Pletser, Recurrent Relations for Multiple of Triangular Numbers being Triangular Numbers, arXiv:2101.00998 [math.NT], 2021.
- Vladimir Pletser, Closed Form Equations for Triangular Numbers Multiple of Other Triangular Numbers, arXiv:2102.12392 [math.GM], 2021.
- Vladimir Pletser, Triangular Numbers Multiple of Triangular Numbers and Solutions of Pell Equations, arXiv:2102.13494 [math.NT], 2021.
- Vladimir Pletser, Congruence Properties of Indices of Triangular Numbers Multiple of Other Triangular Numbers, arXiv:2103.03019 [math.GM], 2021.
- Vladimir Pletser, Searching for multiple of triangular numbers being triangular numbers, 2021.
- Vladimir Pletser, Using Pell equation solutions to find all triangular numbers multiple of other triangular numbers, 2021.
- Simon Plouffe, Approximations de séries génératrices et quelques conjectures, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
- Simon Plouffe, 1031 Generating Functions, Appendix to Thesis, Montreal, 1992.
- Burkard Polster, Nice merging together, Mathologer video (2015).
- B. Polster and M. Ross, Marching in squares, arXiv:1503.04658 [math.HO], 2015.
- Zhang Zaiming, Problem #502, Pell's Equation - Once Again, The College Mathematics Journal, 25 (1994), 241-243.
- Index entries for two-way infinite sequences
- Index entries for linear recurrences with constant coefficients, signature (7,-7,1).
Crossrefs
Programs
-
GAP
a:=[0,3];; for n in [3..25] do a[n]:=6*a[n-1]-a[n-2]+2; od; a; # Muniru A Asiru, Dec 08 2018
-
Haskell
a001652 n = a001652_list !! n a001652_list = 0 : 3 : map (+ 2) (zipWith (-) (map (* 6) (tail a001652_list)) a001652_list) -- Reinhard Zumkeller, Jan 10 2012
-
Magma
Z
:=PolynomialRing(Integers()); N :=NumberField(x^2-2); S:=[ (-2+(r2+1)*(3+2*r2)^n-(r2-1)*(3-2*r2)^n)/4: n in [1..20] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Feb 17 2009 -
Magma
m:=30; R
:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(x*(3-x)/((1-6*x+x^2)*(1-x)))); // G. C. Greubel, Jul 15 2018 -
Maple
A001652 := proc(n) option remember; if n <= 1 then op(n+1,[0,3]) ; else 6*procname(n-1)-procname(n-2)+2 ; end if; end proc: # R. J. Mathar, Feb 05 2016
-
Mathematica
LinearRecurrence[{7,-7,1}, {0,3,20}, 30] (* Harvey P. Dale, Aug 19 2011 *) With[{c=3+2*Sqrt[2]},NestList[Floor[c*#]+3&,3,30]] (* Harvey P. Dale, Oct 22 2012 *) CoefficientList[Series[x (3 - x)/((1 - 6 x + x^2) (1 - x)), {x, 0, 30}], x] (* Vincenzo Librandi, Oct 21 2014 *) Table[(LucasL[2*n + 1, 2] - 2)/4, {n, 0, 30}] (* G. C. Greubel, Jul 15 2018 *)
-
PARI
{a(n) = subst( poltchebi(n+1) - poltchebi(n) - 2, x, 3) / 4}; /* Michael Somos, Aug 11 2006 */
-
PARI
concat(0, Vec(x*(3-x)/((1-6*x+x^2)*(1-x)) + O(x^50))) \\ Altug Alkan, Nov 08 2015
-
PARI
{a=1+sqrt(2); b=1-sqrt(2); Q(n) = a^n + b^n}; for(n=0, 30, print1(round((Q(2*n+1) - 2)/4), ", ")) \\ G. C. Greubel, Jul 15 2018
-
Sage
(x*(3-x)/((1-6*x+x^2)*(1-x))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Mar 08 2019
Formula
G.f.: x *(3 - x) / ((1 - 6*x + x^2) * (1 - x)). - Simon Plouffe in his 1992 dissertation
a(n) = 7*a(n-1) - 7*a(n-2) + a(n-3). a_{n} = -1/2 + ((1-2^{1/2})/4)*(3 - 2^{3/2})^n + ((1+2^{1/2})/4)*(3 + 2^{3/2})^n. - Antonio Alberto Olivares, Oct 13 2003
a(n) = a(n-2) + 4*sqrt(2*(a(n-1)^2)+2*a(n-1)+1). - Pierre CAMI, Mar 30 2005
a(n) = (sinh((2*n+1)*log(1+sqrt(2)))-1)/2 = (sqrt(1+8*A029549)-1)/2. - Bill Gosper, Feb 07 2010
Binomial(a(n)+1,2) = 2*binomial(A053141(n)+1,2) = A029549(n). See A053141. - Bill Gosper, Feb 07 2010
Let b(n) = A046090(n) and c(n) = A001653(n). Then for k>j, c(i)*(c(k) - c(j)) = a(k+i) + ... + a(i+j+1) + a(k-i-1) + ... + a(j-i) + k - j. For n<0, a(n) = -b(-n-1). Also a(n)*a(n+2*k+1) + b(n)*b(n+2*k+1) + c(n)*c(n+2*k+1) = (a(n+k+1) - a(n+k))^2; a(n)*a(n+2*k) + b(n)*b(n+2*k) + c(n)*c(n+2*k) = 2*c(n+k)^2. - Charlie Marion, Jul 01 2003
a(n)*a(n+1) + A046090(n)*A046090(n+1) = A001542(n+1)^2 = A084703(n+1). - Charlie Marion, Jul 01 2003
For n and j >= 1, Sum_{k=0..j} A001653(k)*a(n) - Sum_{k=0...j-1} A001653(k)*a(n-1) + A053141(j) = A001109(j+1)*a(n) - A001109(j)*a(n-1) + A053141(j) = a(n+j). - Charlie Marion, Jul 07 2003
a(n) = {A002315(n) - 1}/2. - Lekraj Beedassy, Nov 25 2003
a(2*n+k) + a(k) + 1 = A001541(n)*A002315(n+k). For k>0, a(2*n+k) - a(k-1) = A001541(n+k)*A002315(n); e.g., 803760-119 = 19601*41. - Charlie Marion, Mar 17 2003
a(n) = {2*A084159(n) - 1 + (-1)^(n+1)}/2. - Lekraj Beedassy, Jul 21 2004
a(n+1) = 3*a(n) + sqrt(8*a(n)^2 + 8*a(n) +4) + 1, a(1)=0. - Richard Choulet, Sep 18 2007
As noted (Sep 20 2006), a(n) = 5*(a(n-1) + a(n-2)) - a(n-3) + 4. In general, for n > 2*k, a(n) = A001653(k)*(a(n-k) + a(n-k-1) + 1) - a(n-2*k-1) - 1. Also a(n) = 7*(a(n-1) - a(n-2)) + a(n-3). In general, for n > 2*k, A002378(k)*(a(n-k)-a(n-k-1)) + a(n-2*k-1). - Charlie Marion, Dec 26 2007
In general, for n >= k >0, a(n) = (A001653(n+k) - A001541(k) * A001653(n) - 2*A001109(k-1))/(4*A001109(k-1)); e.g., 4059 = (33461-3*5741-2*1)/(4*1); 4059 = (195025-17*5741-2*6)/(4*6). - Charlie Marion, Jan 21 2008
From Charlie Marion, Jan 04 2010: (Start)
a(n) = ( (1 + sqrt(2))^(2*n+1) + (1-sqrt(2))^(2*n+1) - 2)/4 = (A001333(2n+1) - 1)/2.
a(2*n+k-1) = Pell(2*n-1)*Pell(2*n+2*k) + Pell(2*n-2)*Pell(2*n+2*k+1) + A001108(k+1);
a(2*n+k) = Pell(2*n)*Pell(2*n+2*k+1) + Pell(2*n-1)*Pell(2*n+2*k+2) - A055997(k+2). (End)
a(n) = A048739(2*n-1) for n > 0. - Richard R. Forberg, Aug 31 2013
a(n+1) = 3*a(n) + 2*A001653(n) + 1 [Mohamed Bouhamida's 2009 (p,q)(r,s) comment above rewritten]. - Hermann Stamm-Wilbrandt, Jul 27 2014
a(n)^2 + (a(n)+1)^2 = A001653(n+1)^2. - Pierre CAMI, Mar 30 2005; clarified by Hermann Stamm-Wilbrandt, Aug 31 2014
For n>0, a(n) = Sum_{k=1..2*n} A000129(k). - Charlie Marion, Nov 07 2015
E.g.f.: (1/4)*(-2*exp(x) - (sqrt(2) - 1)*exp((3-2*sqrt(2))*x) + (1 + sqrt(2))*exp((3+2*sqrt(2))*x)). - Ilya Gutkovskiy, Apr 11 2016
a(A000217(n-1)) = ((A001653(n)+1)/2) * ((A001653(n)-1)/2), n > 1. - Ezhilarasu Velayutham, Mar 10 2019
a(n) = ((a(n-1)+1)*(a(n-1)-3))/a(n-2) for n > 2. - Vladimir Pletser, Apr 08 2020
In general, for each k >= 0, a(n) = ((a(n-k)+a(k-1)+1)*(a(n-k)-a(k)))/a(n-2*k) for n > 2*k. - Charlie Marion, Dec 27 2020
Extensions
Additional comments from Wolfdieter Lang, Feb 10 2000
Comments