cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 16 results. Next

A169686 a(n) = sqrt(T(k-1)*T(k)*T(k+1)) as k runs through the terms of A072221 and T(i)=i*(i+1)/2.

Original entry on oeis.org

0, 30, 5850, 1157730, 229221540, 45384688830, 8985939059790, 1779170548525890, 352266782665431240, 69747043797185672190, 13809562405059974172930, 2734223609158076980818690, 541362465050894178032921580, 107187033856467889149087366750, 21222491341115591157198758976630
Offset: 1

Views

Author

N. J. A. Sloane, Apr 13 2010, based on an email from Neven Juric, Mar 19 2010

Keywords

Comments

It is known (see Beiler, p. 198) that the product of three consecutive triangular numbers, T(k-1)T(k)T(k+1), is a square if (and only if?) 2k+1 = 3a for a in A001541. The corresponding values of k are in A072221.

Examples

			sqrt (T(3)T(4)T(5)) = 30
sqrt (T(24)T(25)T(26)) = 5850
sqrt (T(147)T(148)T(149)) = 1157730
sqrt (T(864)T(865)T(866)) = 229221540
		

References

  • A. H. Beiler, Recreations in the Theory of Numbers. New York: Dover, 1966.

Formula

Empirical g.f.: 30*x^2*(x^2-9*x+1) / ((x^2-198*x+1)*(x^2-6*x+1)). - Colin Barker, Jul 26 2013

A001108 a(n)-th triangular number is a square: a(n+1) = 6*a(n) - a(n-1) + 2, with a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 8, 49, 288, 1681, 9800, 57121, 332928, 1940449, 11309768, 65918161, 384199200, 2239277041, 13051463048, 76069501249, 443365544448, 2584123765441, 15061377048200, 87784138523761, 511643454094368, 2982076586042449, 17380816062160328, 101302819786919521
Offset: 0

Views

Author

Keywords

Comments

b(0)=0, c(0)=1, b(i+1)=b(i)+c(i), c(i+1)=b(i+1)+b(i); then a(i) (the number in the sequence) is 2b(i)^2 if i is even, c(i)^2 if i is odd and b(n)=A000129(n) and c(n)=A001333(n). - Darin Stephenson (stephenson(AT)cs.hope.edu) and Alan Koch
For n > 1 gives solutions to A007913(2x) = A007913(x+1). - Benoit Cloitre, Apr 07 2002
If (X,X+1,Z) is a Pythagorean triple, then Z-X-1 and Z+X are in the sequence.
For n >= 2, a(n) gives exactly the positive integers m such that 1,2,...,m has a perfect median. The sequence of associated perfect medians is A001109. Let a_1,...,a_m be an (ordered) sequence of real numbers, then a term a_k is a perfect median if Sum_{j=1..k-1} a_j = Sum_{j=k+1..m} a_j. See Puzzle 1 in MSRI Emissary, Fall 2005. - Asher Auel, Jan 12 2006
This is the r=8 member of the r-family of sequences S_r(n) defined in A092184 where more information can be found.
Also, 1^3 + 2^3 + 3^3 + ... + a(n)^3 = k(n)^4 where k(n) is A001109. - Anton Vrba (antonvrba(AT)yahoo.com), Nov 18 2006
If T_x = y^2 is a triangular number which is also a square, the least number which is both triangular and square and greater than T_x is T_(3*x + 4*y + 1) = (2*x + 3*y + 1)^2 (W. Sierpiński 1961). - Richard Choulet, Apr 28 2009
If (a,b) is a solution of the Diophantine equation 0 + 1 + 2 + ... + x = y^2, then a or (a+1) is a perfect square. If (a,b) is a solution of the Diophantine equation 0 + 1 + 2 + ... + x = y^2, then a or a/8 is a perfect square. If (a,b) and (c,d) are two consecutive solutions of the Diophantine equation 0 + 1 + 2 + ... + x = y^2 with a < c, then a+b = c-d and ((d+b)^2, d^2-b^2) is a solution, too. If (a,b), (c,d) and (e,f) are three consecutive solutions of the Diophantine equation 0 + 1 + 2 + ... + x = y^2 with a < c < e, then (8*d^2, d*(f-b)) is a solution, too. - Mohamed Bouhamida, Aug 29 2009
If (p,q) and (r,s) are two consecutive solutions of the Diophantine equation 0 + 1 + 2 + ... + x = y^2 with p < r, then r = 3p + 4q + 1 and s = 2p + 3q + 1. - Mohamed Bouhamida, Sep 02 2009
Also numbers k such that (ceiling(sqrt(k*(k+1)/2)))^2 - k*(k+1)/2 = 0. - Ctibor O. Zizka, Nov 10 2009
From Lekraj Beedassy, Mar 04 2011: (Start)
Let x=a(n) be the index of the associated triangular number T_x=1+2+3+...+x and y=A001109(n) be the base of the associated perfect square S_y=y^2. Now using the identity S_y = T_y + T_{y-1}, the defining T_x = S_y may be rewritten as T_y = T_x - T_{y-1}, or 1+2+3+...+y = y+(y+1)+...+x. This solves the Strand Magazine House Number problem mentioned in A001109 in references from Poo-Sung Park and John C. Butcher. In a variant of the problem, solving the equation 1+3+5+...+(2*x+1) = (2*x+1)+(2*x+3)+...+(2*y-1) implies S_(x+1) = S_y - S_x, i.e., with (x,x+1,y) forming a Pythagorean triple, the solutions are given by pairs of x=A001652(n), y=A001653(n). (End)
If P = 8*n +- 1 is a prime, then P divides a((P-1)/2); e.g., 7 divides a(3) and 41 divides a(20). Also, if P = 8*n +- 3 is prime, then 4*P divides (a((P-1)/2) + a((P+1)/2) + 3). - Kenneth J Ramsey, Mar 05 2012
Starting at a(2), a(n) gives all the dimensions of Euclidean k-space in which the ratio of outer to inner Soddy hyperspheres' radii for k+1 identical kissing hyperspheres is rational. The formula for this ratio is (1+3k+2*sqrt(2k*(k+1)))/(k-1) where k is the dimension. So for a(3) = 49, the ratio is 6 in the 49th dimension. See comment for A010502. - Frank M Jackson, Feb 09 2013
Conjecture: For n>1 a(n) is the index of the first occurrence of -n in sequence A123737. - Vaclav Kotesovec, Jun 02 2015
For n=2*k, k>0, a(n) is divisible by 8 (deficient), so since all proper divisors of deficient numbers are deficient, then a(n) is deficient. For n=2*k+1, k>0, a(n) is odd. If a(n) is a prime number, it is deficient; otherwise a(n) has one or two distinct prime factors and is therefore deficient again. sigma(a(5)) = 1723 < 3362 = 2*a(5). In either case, a(n) is deficient. - Muniru A Asiru, Apr 14 2016
The squares of NSW numbers (A008843) interleaved with twice squares from A084703, where A008843(n) = A002315(n)^2 and A084703(n) = A001542(n)^2. Conjecture: Also numbers n such that sigma(n) = A000203(n) and sigma(n-th triangular number) = A074285(n) are both odd numbers. - Jaroslav Krizek, Aug 05 2016
For n > 0, numbers for which the number of odd divisors of both n and of n + 1 is odd. - Gionata Neri, Apr 30 2018
a(n) will be solutions to some (A000217(k) + A000217(k+1))/2. - Art Baker, Jul 16 2019
For n >= 2, a(n) is the base for which A058331(A001109(n)) is a length-3 repunit. Example: for n=2, A001109(2)=6 and A058331(6)=73 and 73 in base a(2)=8 is 111. See Grantham and Graves. - Michel Marcus, Sep 11 2020

Examples

			a(1) = ((3 + 2*sqrt(2)) + (3 - 2*sqrt(2)) - 2) / 4 = (3 + 3 - 2) / 4 = 4 / 4 = 1;
a(2) = ((3 + 2*sqrt(2))^2 + (3 - 2*sqrt(2))^2 - 2) / 4 = (9 + 4*sqrt(2) + 8 + 9 - 4*sqrt(2) + 8 - 2) / 4 = (18 + 16 - 2) / 4 = (34 - 2) / 4 = 32 / 4 = 8, etc.
		

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 193.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 204.
  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 2, p. 10.
  • M. S. Klamkin, "International Mathematical Olympiads 1978-1985," (Supplementary problem N.T.6)
  • W. Sierpiński, Pythagorean triangles, Dover Publications, Inc., Mineola, NY, 2003, pp. 21-22 MR2002669
  • 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).
  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, pages 257-258.

Crossrefs

Partial sums of A002315. A000129, A005319.
a(n) = A115598(n), n > 0. - Hermann Stamm-Wilbrandt, Jul 27 2014

Programs

  • Haskell
    a001108 n = a001108_list !! n
    a001108_list = 0 : 1 : map (+ 2)
       (zipWith (-) (map (* 6) (tail a001108_list)) a001108_list)
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); [0] cat Coefficients(R!(x*(1+x)/((1-x)*(1-6*x+x^2)))); // G. C. Greubel, Jul 15 2018
  • Maple
    A001108:=-(1+z)/(z-1)/(z**2-6*z+1); # Simon Plouffe in his 1992 dissertation, without the leading 0
  • Mathematica
    Table[(1/2)(-1 + Sqrt[1 + Expand[8(((3 + 2Sqrt[2])^n - (3 - 2Sqrt[2])^n)/(4Sqrt[2]))^2]]), {n, 0, 100}] (* Artur Jasinski, Dec 10 2006 *)
    Transpose[NestList[{#[[2]],#[[3]],6#[[3]]-#[[2]]+2}&,{0,1,8},20]][[1]] (* Harvey P. Dale, Sep 04 2011 *)
    LinearRecurrence[{7, -7, 1}, {0, 1, 8}, 50] (* Vladimir Joseph Stephan Orlovsky, Feb 12 2012 *)
  • PARI
    a(n)=(real((3+quadgen(32))^n)-1)/2
    
  • PARI
    a(n)=(subst(poltchebi(abs(n)),x,3)-1)/2
    
  • PARI
    a(n)=if(n<0,a(-n),(polsym(1-6*x+x^2,n)[n+1]-2)/4)
    
  • PARI
    x='x+O('x^99); concat(0, Vec(x*(1+x)/((1-x)*(1-6*x+x^2)))) \\ Altug Alkan, May 01 2018
    

Formula

a(0) = 0, a(n+1) = 3*a(n) + 1 + 2*sqrt(2*a(n)*(a(n)+1)). - Jim Nastos, Jun 18 2002
a(n) = floor( (1/4) * (3+2*sqrt(2))^n ). - Benoit Cloitre, Sep 04 2002
a(n) = A001653(k)*A001653(k+n) - A001652(k)*A001652(k+n) - A046090(k)*A046090(k+n). - Charlie Marion, Jul 01 2003
a(n) = A001652(n-1) + A001653(n-1) = A001653(n) - A046090(n) = (A001541(n)-1)/2 = a(-n). - Michael Somos, Mar 03 2004
a(n) = 7*a(n-1) - 7*a(n-2) + a(n-3). - Antonio Alberto Olivares, Oct 23 2003
a(n) = Sum_{r=1..n} 2^(r-1)*binomial(2n, 2r). - Lekraj Beedassy, Aug 21 2004
If n > 1, then both A000203(n) and A000203(n+1) are odd numbers: n is either a square or twice a square. - Labos Elemer, Aug 23 2004
a(n) = (T(n, 3)-1)/2 with Chebyshev's polynomials of the first kind evaluated at x=3: T(n, 3) = A001541(n). - Wolfdieter Lang, Oct 18 2004
G.f.: x*(1+x)/((1-x)*(1-6*x+x^2)). Binet form: a(n) = ((3+2*sqrt(2))^n + (3-2*sqrt(2))^n - 2)/4. - Bruce Corrigan (scentman(AT)myfamily.com), Oct 26 2002
a(n) = floor(sqrt(2*A001110(n))) = floor(A001109(n)*sqrt(2)) = 2*(A000129(n)^2) - (n mod 2) = A001333(n)^2 - 1 + (n mod 2). - Henry Bottomley, Apr 19 2000, corrected by Eric Rowland, Jun 23 2017
A072221(n) = 3*a(n) + 1. - David Scheers, Dec 25 2006
A028982(a(n)) + 1 = A028982(a(n) + 1). - Juri-Stepan Gerasimov, Mar 28 2011
a(n+1)^2 + a(n)^2 + 1 = 6*a(n+1)*a(n) + 2*a(n+1) + 2*a(n). - Charlie Marion, Sep 28 2011
a(n) = 2*A001653(m)*A053141(n-m-1) + A002315(m)*A046090(n-m-1) + a(m) with m < n; otherwise, a(n) = 2*A001653(m)*A053141(m-n) - A002315(m)*A001652(m-n) + a(m). See Link to Generalized Proof re Square Triangular Numbers. - Kenneth J Ramsey, Oct 13 2011
a(n) = A048739(2n-2), n > 0. - Richard R. Forberg, Aug 31 2013
From Peter Bala, Jan 28 2014: (Start)
A divisibility sequence: that is, a(n) divides a(n*m) for all n and m. Case P1 = 8, P2 = 12, Q = 1 of the 3-parameter family of linear divisibility sequences found by Williams and Guy.
a(2*n+1) = A002315(n)^2 = Sum_{k = 0..4*n + 1} Pell(n), where Pell(n) = A000129(n).
a(2*n) = (1/2)*A005319(n)^2 = 8*A001109(n)^2.
(2,1) entry of the 2 X 2 matrix T(n,M), where M = [0, -3; 1, 4] and T(n,x) is the Chebyshev polynomial of the first kind. (End)
E.g.f.: exp(x)*(exp(2*x)*cosh(2*sqrt(2)*x) - 1)/2. - Stefano Spezia, Oct 25 2024

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Apr 19 2000
More terms from Lekraj Beedassy, Aug 21 2004

A016064 Smallest side lengths of almost-equilateral Heronian triangles (sides are consecutive positive integers, area is a nonnegative integer).

Original entry on oeis.org

1, 3, 13, 51, 193, 723, 2701, 10083, 37633, 140451, 524173, 1956243, 7300801, 27246963, 101687053, 379501251, 1416317953, 5285770563, 19726764301, 73621286643, 274758382273, 1025412242451, 3826890587533, 14282150107683, 53301709843201, 198924689265123, 742397047217293
Offset: 0

Views

Author

Keywords

Comments

Least side in a triangle with integer sides (m, m+1, m+2) (m >= 1) and integer area. The degenerate triangle with sides (1,2,3) is included.
Also describes triangles whose sides are consecutive integers and in which the inscribed circle has an integer radius. - Harvey P. Dale, Dec 28 2000 [Then, the length of this inradius is A001353(n). - Bernard Schott, Mar 21 2023]
Equivalently, positive integers m such that (3/16)*m^4 + (3/4)*m^3 + (3/8)*m^2 - (3/4)*m - 9/16 is a square (A000290), a direct result of Heron's formula. - Rick L. Shepherd, Sep 04 2005
"The problem is to find the sides of a triangle that shall have the values n, n + 1, and n + 2 and such that the perpendicular upon the longest side from the opposite vertex shall be rational. Nakane solves it as follows..." (Smith and Mikami, 2004). - Jonathan Sondow, May 09 2013
For n >= 1 all terms are congruent to {1,3} mod 10. Among first 100 terms there are 6 prime numbers: 3, 13, 193, 37633, 7300801, 1416317953. - Zak Seidov, Jun 14 2018
n > 1 is in this sequence if and only if the triangle with sides 4, n, n+2 has integer area (compare with A072221 for sides 3, n, n+1). - Michael Somos, May 11 2019
a(0) = 1 corresponds to the degenerate triangle [1,2,3], with area = 0. - Wesley Ivan Hurt, May 20 2020
Since this is a list it should really have offset 1, but that would require a large number of changes. - N. J. A. Sloane, Feb 04 2021
Least distance from centroid of a triangle to vertices, distances being m, m+1, m+2 and triangle area being a nonnegative integer. - Alexandru Petrescu, Feb 28 2023
Then, in this case, with a(n) = m, the corresponding area of this triangle is 3 * A011945(n+1). - Bernard Schott, Mar 21 2023

Examples

			G.f. = 1 + 3*x + 13*x^2 + 51*x^3 + 193*x^4 + 723*x^5 + 2701*x^6 + ... - _Michael Somos_, May 11 2019
		

References

  • Nakane Genkei (Nakane the Elder), Shichijo Beki Yenshiki, 1691.

Crossrefs

Cf. A011945 (areas), A334277 (perimeters) A001353 (inradius).
Cf. A003500 (middle side lengths), this sequence (smallest side lengths), A335025 (largest side lengths).
Cf. A001353, A019973 (2 + sqrt(3)), A102341, A103974, A103975.
Cf. A072221.

Programs

  • Magma
    I:=[1,3,13]; [n le 3 select I[n] else 4*Self(n-1)-Self(n-2)+2: n in [1..30]]; // Vincenzo Librandi, Nov 13 2018
  • Mathematica
    LinearRecurrence[{5,-5,1},{1,3,13},26] (* Ray Chandler, Jan 27 2014 *)
    CoefficientList[Series[(1 - 2 x + 3 x^2) / (1 - 5 x + 5 x^2 - x^3), {x, 0, 33}], x] (* Vincenzo Librandi, Nov 13 2018 *)
    a[ n_] := 2 ChebyshevT[n, 2] - 1; (* Michael Somos, May 11 2019 *)
  • PARI
    for(a=1,10^9, b=a+1; c=a+2; s=(a+b+c)/2; if(issquare(s*(s-a)*(s-b)*(s-c)), print1(a,","))) \\ Rick L. Shepherd, Feb 18 2007
    
  • PARI
    a(n)=if(n<1,1,-1+ceil((2+sqrt(3))^(n))) \\ Ralf Stephan
    
  • PARI
    is(n)=issquare(3*n^2+6*n-9) \\ Charles R Greathouse IV, May 16 2014
    
  • PARI
    {a(n) = 2 * polchebyshev(n, 1, 2) - 1}; /* Michael Somos, May 11 2019 */
    

Formula

a(n) = 3 + floor((2 + sqrt(3))*a(n-1)), n >= 3. - Rick L. Shepherd, Sep 04 2005
From Paul Barry, Feb 17 2004: (Start)
a(n) = 4*a(n-1) - a(n-2) + 2.
a(n) = (2 + sqrt(3))^n + (2 - sqrt(3))^n - 1.
a(n) = 2*A001075(n) - 1.
G.f.: (1 - 2*x + 3*x^3)/((1 - x)*(1 - 4*x + x^2)) = (1 - 2*x + 3*x^2)/(1 - 5*x + 5*x^2 - x^3). (End)
For n >= 1, a(n) = ceiling((2 + sqrt(3))^n) - 1.
a(n) = A003500(n) - 1. - T. D. Noe, Jun 17 2004
a(n) = [x^n] ( 1 + 2*x + sqrt(1 + 2*x + 3*x^2) )^n. - Peter Bala, Jun 23 2015
E.g.f.: exp((2 + sqrt(3))*x) + exp((2 - sqrt(3))*x) - exp(x). - Franck Maminirina Ramaharo, Nov 12 2018
a(n) = a(-n) for all integer n. - Michael Somos, May 11 2019

Extensions

More terms from Rick L. Shepherd, Feb 18 2007
Definition revised by N. J. A. Sloane, Feb 04 2021

A106328 Numbers j such that 8*(j^2) + 9 = k^2 for some positive number k.

Original entry on oeis.org

0, 3, 18, 105, 612, 3567, 20790, 121173, 706248, 4116315, 23991642, 139833537, 815009580, 4750223943, 27686334078, 161367780525, 940520349072, 5481754313907, 31950005534370, 186218278892313, 1085359667819508, 6325939728024735, 36870278700328902, 214895732473948677
Offset: 1

Views

Author

Pierre CAMI, Apr 29 2005

Keywords

Comments

The ratio k(n) /(2*j(n)) tends to sqrt(2) as n increases.
The squares of the numbers in this sequence are one less than a triangular number: a(n)^2 = A164080(n). For example, 18^2 is 324, and 325 is a triangular number. a(n)^2 + 1 = A164055(n). a(n)^2 = A072221(n)(A072221(n)+1)/2 - 1. - Tanya Khovanova & Alexey Radul, Aug 09 2009
For n > 0, a(n+1) is the n-th almost balancing number of first type (see Tekcan and Erdem). - Stefano Spezia, Nov 25 2022

Crossrefs

Programs

  • Haskell
    a106328 n = a106328_list !! (n-1)
    a106328_list = 0 : 3 : zipWith (-) (map (* 6) (tail a106328_list)) a106328_list
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Mathematica
    s=0;lst={};Do[s+=n;If[Sqrt[s-1]==Floor[Sqrt[s-1]],AppendTo[lst,Sqrt[s-1]]],{n,8!}];lst (* Vladimir Joseph Stephan Orlovsky, Apr 02 2009 *)
    Rest@ CoefficientList[Series[3 x^2/(1 - 6 x + x^2), {x, 0, 24}], x] (* Michael De Vlieger, Nov 02 2020 *)
  • PARI
    concat(0, Vec(3*x^2/(1-6*x+x^2) + O(x^40))) \\ Michel Marcus, Sep 07 2016
    
  • PARI
    a(n)=([0,1;-1,6]^n*[-3;0])[1,1] \\ Charles R Greathouse IV, Sep 07 2016

Formula

a(1)=0, a(2)=3 then a(n) = 6*a(n-1) - a(n-2).
a(n) = ((3+2*sqrt(2))^(n-1) - (3-2*sqrt(2))^(n-1))*3/4/sqrt(2). - Max Alekseyev, Jan 11 2007
a(n) = 3*A001109(n). - M. F. Hasler, R. J. Mathar, Jun 03 2009
a(n) = (3/4)*A005319(n-1).
G.f.: 3*x^2/(1 - 6*x + x^2). - Philippe Deléham, Nov 17 2008
E.g.f.: 3 - 3*exp(3*x)*(4*cosh(2*sqrt(2)*x) - 3*sqrt(2)*sinh(2*sqrt(2)*x))/4. - Stefano Spezia, Nov 25 2022

Extensions

More terms from Max Alekseyev, Jan 11 2007

A164055 Triangular numbers that are one plus a perfect square.

Original entry on oeis.org

1, 10, 325, 11026, 374545, 12723490, 432224101, 14682895930, 498786237505, 16944049179226, 575598885856165, 19553418069930370, 664240615491776401, 22564627508650467250, 766533094678624110085, 26039560591564569275626
Offset: 1

Views

Author

Tanya Khovanova & Alexey Radul, Aug 08 2009

Keywords

Comments

a(n+1) is the second element of the n-th set of three consecutive triangular numbers whose product is a perfect square. - Arkadiusz Wesolowski, Apr 27 2012
The triangular numbers of this sequence satisfy the Diophantine equation T(k) = k*(k+1)/2 = m^2 + 1, which is equivalent to (2k+1)^2 - 2*(2m)^2 = 9. Now, with x=2k+1 and y=2m, the Pell-Fermat equation x^2 - 2*y^2 = 9 appears. The solutions x and y of this equation are respectively in A106329 and A075848. The indices k=(x-1)/2 of the triangular numbers of this sequence are in A072221, while the indices m=y/2 of the corresponding square numbers are in A106328. - Bernard Schott, Mar 09 2019

Examples

			10 is in this sequence because it is a triangular number A000217(4) and is equal to a square plus 1: 10 = 3^2 + 1.
		

Crossrefs

Cf. A001110, A106329, A075848 (solutions of x^2 - 2 * y^2 = 9).
Cf. A072221 (indices of the triangular terms of this sequence), A106328 (indices of the corresponding square numbers).

Programs

  • Haskell
    a164055 n = a164055_list !! (n-1)
    a164055_list = 1 : 10 : 325 : zipWith (+) a164055_list
       (map (* 35) $ tail $ zipWith (-) (tail a164055_list) a164055_list)
    -- Reinhard Zumkeller, Apr 29 2012
    
  • Mathematica
    LinearRecurrence[{35,-35,1}, {1,10,325}, 50] (* G. C. Greubel, Sep 09 2017 *)
  • PARI
    my(x='x+O('x^50)); Vec(x*(1-25*x+10*x^2)/((1-x)*(x^2-34*x+1))) \\ G. C. Greubel, Sep 09 2017

Formula

A000217 INTERSECT A002522.
a(n) = A000217(A072221(n-1)).
From R. J. Mathar, Sep 22 2009: (Start)
a(n) = 35*a(n-1) - 35*a(n-2) + a(n-3).
G.f.: x*(1-25*x+10*x^2)/((1-x)*(x^2-34*x+1)). (End)
A010054(a(n)) * A010052(a(n) - 1) = 1. - Reinhard Zumkeller, Apr 29 2012
a(n) = (A106329(n) - 1)*(A106329(n) + 1)/8 = (A106328(n))^2 + 1. - Bernard Schott, Mar 10 2019
a(n) = (14 + 9*(17+12*sqrt(2))^(1-n) - 9*(-17+12*sqrt(2))*(17+12*sqrt(2))^n) / 32. - Colin Barker, Mar 23 2019
a(n) = 9 * A001110(n) + 1 (Subramaniam, 1999). - Amiram Eldar, Jan 13 2022

Extensions

Comment molded into formula by R. J. Mathar, Sep 22 2009

A229131 Numbers k such that the distance between the k-th triangular number and the nearest square is exactly 1.

Original entry on oeis.org

1, 2, 4, 5, 15, 25, 32, 90, 148, 189, 527, 865, 1104, 3074, 5044, 6437, 17919, 29401, 37520, 104442, 171364, 218685, 608735, 998785, 1274592, 3547970, 5821348, 7428869, 20679087, 33929305, 43298624
Offset: 1

Views

Author

Ralf Stephan, Sep 15 2013

Keywords

Comments

The k-th triangular number (A000217(k)) is a square plus or minus one.
Union of A006451 (k-th triangular number is a square minus one) and A072221 (k-th triangular number is a square plus one).

Examples

			A000217(4)=10 and 10 - 3^2 = 1 so 4 is in the sequence.
A000217(5)=15 and 4^2 - 15 = 1 so 5 is in the sequence.
		

Crossrefs

Programs

  • PARI
    for(n=1,10^8,for(i=-1,1,f=0;if(i&&issquare(n*(n+1)/2+i),f=1;break));if(f,print1(n,",")))

Formula

G.f.: (-x^7 + 2*x^6 - 2*x^5 + 4*x^4 - 5*x^3 + 2*x^2 + x + 1)/((1-6*x^3+x^6)*(1-x)) (conjectured).

A182334 Triangular numbers that differ from a square by 1.

Original entry on oeis.org

0, 1, 3, 10, 15, 120, 325, 528, 4095, 11026, 17955, 139128, 374545, 609960, 4726275, 12723490, 20720703, 160554240, 432224101, 703893960, 5454117903, 14682895930, 23911673955, 185279454480, 498786237505, 812293020528, 6294047334435, 16944049179226
Offset: 1

Views

Author

Arkadiusz Wesolowski, Apr 25 2012

Keywords

Comments

From Robert G. Wilson v, Jun 20 2015: (Start)
Actually this sequence is the union of two subsequences; the triangular numbers that are less than a square by 1 and those that are greater than a square by 1.
The first sequence by index of the triangular numbers is A072221: b(n) = 6b(n-1) - b(n-2) + 2, with b(0)=1, b(1)=4.
And obviously the second sequence by index of the triangular numbers is A006451: c(n) = 6c(n-2) - c(n-4) + 2 with c(0)=0, c(1)=2, c(2)=5, c(3)=15.
(End)

Examples

			T(2) = 3 = 2^2 - 1, T(4) = 10 = 3^2 + 1,  T(5) = 15 = 4^2 - 1, and T(15) = 120 = 11^2 - 1.
		

References

  • Edward J. Barbeau, Pell's Equation (Springer 2003) at 17.

Crossrefs

Subsequence of A000217 and of A087279.

Programs

  • Magma
    I:=[0,1,3,10,15,120,325,528,4095,11026,17955]; [n le 11 select I[n] else 35*Self(n-3)-35*Self(n-6)+Self(n-9): n in [1..30]]; // Vincenzo Librandi, Jun 21 2015
    
  • Mathematica
    lst = {}; Do[t = n*(n + 1)/2; If[IntegerQ[(t - 1)^(1/2)] || IntegerQ[(t + 1)^(1/2)], AppendTo[lst, t]], {n, 0, 10^4}]; lst (* Arkadiusz Wesolowski, Aug 06 2012 *)
    b[n_] := b[n] = 6 b[n - 1] - b[n - 2] + 2; b[0] = 1; b[1] = 4; c[n_] := c[n] = 6 c[n - 2] - c[n - 4] + 2; c[0] = 0; c[1] = 2; c[2] = 5; c[3] = 15; #(# + 1)/2 & /@ Union@ Join[ Array[b, 9, 0], Array[c, 18, 0]] (* or *)
    #(# + 1)/2 & /@ Join[{0, 1}, LinearRecurrence[{1, 0, 6, -6, 0, -1, 1}, {2, 4, 5, 15, 25, 32, 90}, 35]] (* or *)
    #(# + 1)/2 & /@ CoefficientList[ Series[x + x^2 (1 + x) (2 + x^2 - 3 x^3 + x^4)/((1 - x) (1 - 6 x^3 + x^6)), {x, 0, 36}], x] (* Robert G. Wilson v, Jun 20 2015 *)
    a[n_] := a[n] = 35 a[n - 3] - 35 a[n - 6] + a[n - 9]; a[1] = 0; a[2] = 1; a[3] = 3; a[4] = 10; a[5] = 15; a[6] = 120; a[7] = 325; a[8] = 528; a[9] = 4095; a[10] = 11026; a[11] = 17955; Array[a, 36] (* Robert G. Wilson v after Charles R Greathouse IV, Apr 25 2012 *)
    Select[Accumulate[Range[0,6*10^6]],AnyTrue[Sqrt[#+{1,-1}],IntegerQ]&] (* or *) LinearRecurrence[{0,0,35,0,0,-35,0,0,1},{0,1,3,10,15,120,325,528,4095,11026,17955},40] (* The first program uses the AnyTrue function from Mathematica version 10 *) (* Harvey P. Dale, Dec 24 2015 *)
  • PARI
    concat(0, Vec(x^2*(1+3*x+10*x^2-20*x^3+15*x^4-25*x^5+38*x^6+x^8-x^9)/((1-x)*(1+x+x^2)*(1-34*x^3+x^6)) + O(x^30))) \\ Colin Barker, Sep 17 2016

Formula

a(n) = 35*a(n-3) - 35*a(n-6) + a(n-9). - Charles R Greathouse IV, Apr 25 2012
G.f.: x^2*(1+3*x+10*x^2-20*x^3+15*x^4-25*x^5+38*x^6+x^8-x^9) / ((1-x)*(1+x+x^2)*(1-34*x^3+x^6)). - Colin Barker, Sep 17 2016

A230666 Primes p such that a Heronian triangle with a fixed side length of 3 contains p as another side length.

Original entry on oeis.org

5, 149, 29401, 5821349, 8946229758127349, 1771308307978070401, 13748537282247342677718149, 106713369180271088592919391520601, 828287615476676026361062299923143963349, 32470531080787945457870876690417952137154149
Offset: 1

Views

Author

Frank M Jackson, Oct 27 2013

Keywords

Comments

The triangle inequality requires that any integer triangle with a fixed side length of 3 can have remaining side lengths of (x, x+1) or (x, x+2). The constraint that primitive Heronian triangles have only one even side will just permit (x, x+1). So a(n) = x or x+1 whenever the Heronian triangle has x or x+1 as a prime and n is the ordered occurrence of this prime. The ordered sequence of x is given by A072221 where x(n) = 6x(n-1)-x(n-2)+2, x(0)=1, x(1)=4 starting at x(1).

Examples

			a(2)=149 because the triangle with sides (3, 148, 149) is Heronian, 149 is prime and is the 2nd occurrence of such a prime with triangle sides (3, 4, 5) giving 5 as the 1st occurrence.
		

Crossrefs

Cf. A072221.

Programs

  • Mathematica
    seq[n_] := seq[n] = Which[n==0, 1, n==1, 4, True, 6seq[n-1]-seq[n-2]+2]; lst={}; Do[Which[PrimeQ[seq[m]], AppendTo[lst, seq[m]], PrimeQ[seq[m]+1], AppendTo[lst, seq[m]+1], True, Null], {m, 1, 500}]; lst
    t = LinearRecurrence[{7, -7, 1}, {1, 4, 25}, 100]; Select[Union[t, t + 1], PrimeQ[#] &] (* T. D. Noe, Dec 09 2013 *)

Formula

Primes of the form x(m) or x(m)+1 where x(m) is given by x(m) = 6x(m-1)-x(m-2)+2, x(0)=1, x(1)=4 starting at x(1).

A164080 Perfect squares one less than a triangular number.

Original entry on oeis.org

0, 9, 324, 11025, 374544, 12723489, 432224100, 14682895929, 498786237504, 16944049179225, 575598885856164, 19553418069930369, 664240615491776400, 22564627508650467249, 766533094678624110084, 26039560591564569275625
Offset: 1

Views

Author

Tanya Khovanova & Alexey Radul, Aug 09 2009

Keywords

Examples

			324=18^2 is a perfect square and 325=A000217(25) is a triangular number. Therefore 324 is in this sequence.
		

Programs

  • Mathematica
    LinearRecurrence[{35,-35,1},{0,9,324},20] (* Harvey P. Dale, Oct 24 2023 *)

Formula

a(n) = A164055(n)-1.
a(n) = A072221(n)*(A072221(n)+1)/2 - 1.
a(n) = 35*a(n-1) -35*a(n-2) +a(n-3) = 9*A001110(n-1). G.f.: 9*x^2*(1+x)/((1-x)*(x^2-34*x+1)). [R. J. Mathar, Oct 21 2009]

Extensions

Comments turned into formulas. - R. J. Mathar, Oct 21 2009

A229083 Numbers k such that the distance between the k-th triangular number and the nearest square is at most 1.

Original entry on oeis.org

1, 2, 4, 5, 8, 15, 25, 32, 49, 90, 148, 189, 288, 527, 865, 1104, 1681, 3074, 5044, 6437, 9800, 17919, 29401, 37520, 57121, 104442, 171364, 218685, 332928, 608735, 998785, 1274592, 1940449, 3547970, 5821348, 7428869, 11309768, 20679087, 33929305, 43298624, 65918161
Offset: 1

Views

Author

Ralf Stephan, Sep 13 2013

Keywords

Comments

The k-th triangular number (A000217) is a square, or a square plus or minus one.
Union of A006451 (k-th triangular number is a square minus one), A072221 (k-th triangular number is a square plus one), and A001108 (k-th triangular number is square). Also, union of A229131 and A001108.

Examples

			A000217(4) = 10 and 10 - 3^2 = 1 so 4 is in the sequence.
A000217(5) = 15 and 4^2 - 15 = 1 so 5 is in the sequence.
A000217(8) = 36 = 6^2 so 8 is in sequence.
		

Crossrefs

Programs

  • PARI
    for(n=1,10^8,for(i=-1,1,f=0;if(issquare(n*(n+1)/2+i),f=1;break));if(f,print1(n,",")))

Formula

G.f.: (x^7 - 2*x^6 + x^5 - 3*x^4 + x^3 + 2*x^2 + x + 1)/((1-2*x^2+x^4)*(1-2*x^2-x^4)*(1-x)) (conjectured).
Showing 1-10 of 16 results. Next