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-6 of 6 results.

A001652 a(n) = 6*a(n-1) - a(n-2) + 2 with a(0) = 0, a(1) = 3.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Consider all Pythagorean triples (X, X+1, Z) ordered by increasing Z; sequence gives X values.
Numbers n such that triangular number t(n) (see A000217) = n(n+1)/2 is a product of two consecutive integers (cf. A097571).
Members of Diophantine pairs. Solution to a*(a+1) = 2*b*(b+1) in natural numbers including 0; a = a(n), b = b(n) = A053141(n); The solution of a special case of a binomial problem of H. Finner and K. Strassburger (strass(AT)godot.dfi.uni-duesseldorf.de).
The index of all triangular numbers T(a(n)) for which 4T(n)+1 is a perfect square.
The three sequences x (A001652), y (A046090) and z (A001653) may be obtained by setting u and v equal to the Pell numbers (A000129) in the formulas x = 2uv, y = u^2 - v^2, z = u^2 + v^2 [Joseph Wiener and Donald Skow]. - Antonio Alberto Olivares, Dec 22 2003
All Pythagorean triples {X(n), Y(n)=X(n)+1, Z(n)} with X M*W(n), where W(n)=transpose of vector [X(n) Y(n) Z(n)] and M a 3 X 3 matrix given by [2 1 2 / 1 2 2 / 2 2 3]. - Lekraj Beedassy, Aug 14 2006
Let b(n) = A053141 then a(n)*b(n+1) = b(n)*a(n+1) + b(n). - Kenneth J Ramsey, Sep 22 2007
In general, if b(n) = A053141(n), then a(n)*b(n+k) = a(n+k)*b(n)+b(k); e.g., 3*84 = 119*2+14; 3*2870 = 4059*2+492; 20*2870 = 5741*14+84. - Charlie Marion, Nov 19 2007
Limit_{n -> oo} a(n)/a(n-1) = 3+2*sqrt(2) = A156035. - Klaus Brockhaus, Feb 17 2009
If (p,q) is a solution of the Diophantine equation: X^2 + (X+1)^2 = Y^2 then (p+q) or (p+q+1) are perfect squares. If (p,q) is a solution of the Diophantine equation: X^2 + (X+1)^2 = Y^2 then (p+q) or (p+q)/8 are perfect squares. If (p,q) and (r,s) are two consecutive solutions of the Diophantine equation: X^2 + (X+1)^2 = Y^2 with pMohamed Bouhamida, Aug 29 2009
If (p,q) and (r,s) are two consecutive solutions of the Diophantine equation: X^2 + (X + 1)^2 = y^2 with pMohamed Bouhamida, Sep 02 2009
a(n+k) = A001541(k)*a(n) + A001542(k)*A001653(n+1) + A001108(k). - Charlie Marion, Dec 10 2010
The numbers 3*A001652 = (0, 9, 60, 357, 2088, 12177, 70980, ...) are all the nonnegative values of X such that X^2 + (X+3)^2 = Z^2 (Z is in A075841). - Bruno Berselli, Aug 26 2010
Let T(n) = n*(n+1)/2 (the n-th triangular number). For n > 0,
T(a(n) + 2*k*A001653(n+1)) = 2*T(A053141(n-1) + k*A002315(n)) + k^2 and
T(a(n) + (2*k+1)*A001653(n+1)) = (A001109(n+1) + k*A002315(n))^2 + k*(k+1).
Also (a(n) + k*A001653(n))^2 + (a(n) + k*A001653(n) + 1)^2 = (A001653(n+1) + k*A002315(n))^2 + k^2. - Charlie Marion, Dec 09 2010
For n>0, A143608(n) divides a(n). - Kenneth J Ramsey, Jun 28 2012
Set a(n)=p; a(n)+1=q; the generated triple x=p^2+pq; y=q^2+pq; k=p^2+q^2 satisfies x^2+y^2=k(x+y). - Carmine Suriano, Dec 17 2013
The arms of the triangle are found with (b(n),c(n)) for 2*b(n)*c(n) and c(n)^2 - b(n)^2. Let b(1) = 1 and c(1) = 2, then b(n) = c(n-1) and c(n) = 2*c(n-1) + b(n-1). Alternatively, b(n) = c(n-1) and c(n) equals the nearest integer to b(n)*(1+sqrt(2)). - J. M. Bergot, Oct 09 2014
Conjecture: For n>1 a(n) is the index of the first occurrence of n in sequence A123737. - Vaclav Kotesovec, Jun 02 2015
Numbers m such that Product_{k=1..m} (4*k^4+1) is a square (see A274307). - Chai Wah Wu, Jun 21 2016
Numbers m such that m^2+(m+1)^2 is a square. - César Aguilera, Aug 14 2017
For integers a and d, let P(a,d,1) = a, P(a,d,2) = a+d, and, for n>2, P(a,d,n) = 2*P(a,d,n-1) + P(a,d,n-2). Further, let p(n) = Sum_{i=1..2n} P(a,d,i). Then p(n)^2 + (p(n)+d)^2 + a^2 = P(a,d,2n+1)^2 + d^2. When a = 1 and d = 1, p(n) = a(n) and P(a,d,n) = A000129(n), the n-th Pell number. - Charlie Marion, Dec 08 2018
The terms of this sequence satisfy the Diophantine equation k^2 + (k+1)^2 = m^2, which is equivalent to (2k+1)^2 - 2*m^2 = -1. Now, with x=2k+1 and y=m, we get the Pell-Fermat equation x^2 - 2*y^2 = -1. The solutions (x,y) of this equation are respectively in A002315 and A001653. The relation k = (x-1)/2 explains Lekraj Beedassy's Nov 25 2003 formula. Thus, the corresponding numbers m = y, which express the length of the hypotenuse of these right triangles (k,k+1,m) are in A001653. - Bernard Schott, Mar 10 2019
Members of Diophantine pairs. Related to solutions of p^2 = 2q^2 + 2 in natural numbers; p = p(n) = 2*sqrt(4T(a(n))+1), q = q(n) = sqrt(8*T(a(n))+1). Note that this implies that 4*T(a(n))+1 is a perfect square (numbers of the form 8*T(n)+1 are perfect squares for all n); these T(a(n))'s are the only solutions to the given Diophantine equation. - Steven Blasberg, Mar 04 2021

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

Crossrefs

Cf. A046090(n) = -a(-1-n).
Cf. A001108, A143608, A089950 (partial sums), A156035.
Cf. numbers m such that k*A000217(m)+1 is a square: A006451 for k=1; m=0 for k=2; A233450 for k=3; this sequence for k=4; A129556 for k=5; A001921 for k=6. - Bruno Berselli, Dec 16 2013
Cf. A002315, A001653 (solutions of x^2 - 2*y^2 = -1).

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
Sum_{k=0...n} (2*k+1)*a(n-k) = A001109(n+1) - A000217(n+1). - Charlie Marion, Jul 18 2003
a(n) = A055997(n) - 1 + sqrt(2*A055997(n)*A001108(n)). - Charlie Marion, Jul 21 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) = (A001653(n+1) - 3*A001653(n) - 2)/4. - Lekraj Beedassy, Jul 13 2004
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
a(n+1) = 3*A001541(n) + 10*A001109(n) + A001108(n). - Hermann Stamm-Wilbrandt, Sep 09 2014
For n>0, a(n) = Sum_{k=1..2*n} A000129(k). - Charlie Marion, Nov 07 2015
a(n) = 3*A053142(n) - A053142(n-1). - R. J. Mathar, Feb 05 2016
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(n) = A001108(n) + 2*sqrt(A000217(A001108(n))). - Dimitri Papadopoulos, Jul 06 2017
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
A generalization of the identity a(n)^2 + A046090(n)^2 = A001653(n+1)^2 follows. Let P(k,n) be the n-th k-gonal number. Then P(k,a(n)) + P(k,A046090(n)) = P(k,A001653(n+1)) + (4-k)*A001109(n). - Charlie Marion, Dec 07 2021
a(n) = A046090(n)-1 = A002024(A029549(n)). - Pontus von Brömssen, Sep 11 2024

Extensions

Additional comments from Wolfdieter Lang, Feb 10 2000

A237599 Positive integers k such that x^2 - 6xy + y^2 + k = 0 has integer solutions.

Original entry on oeis.org

4, 7, 8, 16, 23, 28, 31, 32, 36, 47, 56, 63, 64, 68, 71, 72, 79, 92, 100, 103, 112, 119, 124, 127, 128, 136, 144, 151, 164, 167, 175, 184, 188, 191, 196, 199, 200, 207, 223, 224, 239, 248, 252, 256, 263, 271, 272, 279, 284, 287, 288, 292, 311, 316, 324, 328
Offset: 1

Views

Author

Colin Barker, Feb 10 2014

Keywords

Comments

Nonnegative numbers of the form 8x^2 - y^2. - Jon E. Schoenfield, Jun 03 2022

Examples

			4 is in the sequence because x^2 - 6xy + y^2 + 4 = 0 has integer solutions, for example (x, y) = (1, 5).
		

Crossrefs

Cf. A001653 (k = 4), A006452 (k = 7), A001541 (k = 8), A075870 (k = 16), A156066 (k = 23), A217975 (k = 28), A003499 (k = 32), A075841 (k = 36), A077443 (k = 56).
For primes see A007522 and A141175.
For a list of sequences giving numbers and/or primes represented by binary quadratic forms, see the "Binary Quadratic Forms and OEIS" link.

A301383 Expansion of (1 + 3*x - 2*x^2)/(1 - 7*x + 7*x^2 - x^3).

Original entry on oeis.org

1, 10, 61, 358, 2089, 12178, 70981, 413710, 2411281, 14053978, 81912589, 477421558, 2782616761, 16218279010, 94527057301, 550944064798, 3211137331489, 18715879924138, 109084142213341, 635788973355910, 3705649697922121, 21598109214176818, 125883005587138789, 733699924308655918
Offset: 0

Views

Author

Bruno Berselli, Mar 20 2018

Keywords

Comments

y solutions to A000217(x-1) + A000217(x) = A000290(y-1) + A000290(y+2). The corresponding x values are listed in A075841.
y solutions to A000217(x-1) + A000217(x) = A000290(y-1) + A000290(y+1) are in A002315, and A075870 gives the x values.
y solutions to A000217(x-1) + A000217(x) = A000290(y-1) + A000290(y) are in A046090, and A001653 gives the x values.
Also, indices y for which 4*A000217(y) + 5 is a square. The next integers k such that k*A000217(y) + 5 is a square for infinitely many y values are 11, 20, 22, 29, 31, ...
First differences are in A106329.

Crossrefs

Programs

  • Julia
    using Nemo
    function A301383List(len)
        R, x = PowerSeriesRing(ZZ, len+2, "x")
        f = divexact(1+3*x-2*x^2, 1-7*x+7*x^2-x^3)
        [coeff(f, k) for k in 0:len]
    end
    A301383List(23) |> println # Peter Luschny, Mar 21 2018
  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1+3*x-2*x^2)/(1-7*x+7*x^2-x^3)));
    
  • Maple
    f:= gfun:-rectoproc({a(n) = 7*a(n-1) - 7*a(n-2) + a(n-3), a(0)=1,a(1)=10,a(2)=61},a(n),remember):
    map(f, [$0..50]); # Robert Israel, Mar 21 2018
  • Mathematica
    CoefficientList[Series[(1 + 3 x - 2 x^2)/(1 - 7 x + 7 x^2 - x^3), {x, 0, 30}], x]
  • Maxima
    makelist(coeff(taylor((1+3*x-2*x^2)/(1-7*x+7*x^2-x^3), x, 0, n), x, n), n, 0, 30);
    
  • PARI
    Vec((1+3*x-2*x^2)/(1-7*x+7*x^2-x^3)+O(x^30))
    
  • Sage
    m=30; L. = PowerSeriesRing(ZZ, m); f=(1+3*x-2*x^2)/(1-7*x+7*x^2-x^3); print(f.coefficients())
    

Formula

O.g.f.: (1 + 3*x - 2*x^2)/((1 - x)*(1 - 6*x + x^2)).
a(n) = 7*a(n-1) - 7*a(n-2) + a(n-3) = 6*a(n-1) - a(n-2) + 2.
a(n) = (3/4)*((1 + sqrt(2))^(2*n + 1) + (1 - sqrt(2))^(2*n + 1)) - 1/2.
a(n) = A033539(2*n+2) = A241976(n+1) + 1 = 3*A001652(n) + 1 = 3*A046090(n) - 2.
a(n) = A053142(n+1) + 3*A053142(n) - 2*A053142(n-1), n>0.
2*a(n) = 3*A002315(n) - 1.
4*a(n) = 3*A077444(n+1) - 2.
E.g.f.: (3*exp(3*x)*(cosh(2*sqrt(2)*x) + sqrt(2)*sinh(2*sqrt(2)*x)) - cosh(x) - sinh(x))/2. - Stefano Spezia, Mar 06 2020
Let T(n) be the n-th triangular number, A000217(n). Then T(a(n)-3) + 2*T(a(n)-2) + 3*T(a(n)-1) + 4*T(a(n)) + 3*T(a(n)+1) + 2*T(a(n)+2) + T(a(n)+3) = (A001653(n) + A001653(n+2))^2. - Charlie Marion, Mar 16 2021

A241976 Values of k such that k^2 + (k+3)^2 is a square.

Original entry on oeis.org

0, 9, 60, 357, 2088, 12177, 70980, 413709, 2411280, 14053977, 81912588, 477421557, 2782616760, 16218279009, 94527057300, 550944064797, 3211137331488, 18715879924137, 109084142213340, 635788973355909, 3705649697922120, 21598109214176817, 125883005587138788
Offset: 1

Views

Author

Colin Barker, Aug 10 2014

Keywords

Comments

A075841 gives the corresponding values of sqrt(n^2 + (n+3)^2).

Examples

			9 is in the sequence because 9^2 + 12^2 = 225 = 15^2.
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[3 x (x - 3)/((x - 1) (x^2 - 6 x + 1)), {x, 0, 30}], x] (* Vincenzo Librandi, Aug 11 2014 *)
  • PARI
    concat(0, Vec(3*x^2*(x-3)/((x-1)*(x^2-6*x+1)) + O(x^100)))

Formula

G.f.: 3*x^2*(x-3) / ((x-1)*(x^2-6*x+1)).
a(n) = 7*a(n-1) - 7*a(n-2) + a(n-3).
a(n) = 3*A001652(n-1).
a(n) = -3*(2 + (3-2*sqrt(2))^n*(1+sqrt(2)) - (-1+sqrt(2))*(3+2*sqrt(2))^n) / 4. - Colin Barker, Apr 13 2017

A294774 a(n) = 2*n^2 + 2*n + 5.

Original entry on oeis.org

5, 9, 17, 29, 45, 65, 89, 117, 149, 185, 225, 269, 317, 369, 425, 485, 549, 617, 689, 765, 845, 929, 1017, 1109, 1205, 1305, 1409, 1517, 1629, 1745, 1865, 1989, 2117, 2249, 2385, 2525, 2669, 2817, 2969, 3125, 3285, 3449, 3617, 3789, 3965, 4145, 4329, 4517, 4709, 4905
Offset: 0

Views

Author

Bruno Berselli, Nov 08 2017

Keywords

Comments

This is the case k = 9 of 2*n^2 + (1-(-1)^k)*n + (2*k-(-1)^k+1)/4 (similar sequences are listed in Crossrefs section). Note that:
2*( 2*n^2 + (1-(-1)^k)*n + (2*k-(-1)^k+1)/4 ) - k = ( 2*n + (1-(-1)^k)/2 )^2. From this follows an alternative definition for the sequence: Numbers h such that 2*h - 9 is a square. Therefore, if a(n) is a square then its base is a term of A075841.

Crossrefs

1st diagonal of A154631, 3rd diagonal of A055096, 4th diagonal of A070216.
Second column of Mathar's array in A016813 (Comments section).
Subsequence of A001481, A001983, A004766, A020668, A046711 and A057653 (because a(n) = (n+2)^2 + (n-1)^2); A097268 (because it is also a(n) = (n^2+n+3)^2 - (n^2+n+2)^2); A047270; A243182 (for y=1).
Similar sequences (see the first comment): A161532 (k=-14), A181510 (k=-13), A152811 (k=-12), A222182 (k=-11), A271625 (k=-10), A139570 (k=-9), (-1)*A147973 (k=-8), A059993 (k=-7), A268581 (k=-6), A090288 (k=-5), A054000 (k=-4), A142463 or A132209 (k=-3), A056220 (k=-2), A046092 (k=-1), A001105 (k=0), A001844 (k=1), A058331 (k=2), A051890 (k=3), A271624 (k=4), A097080 (k=5), A093328 (k=6), A271649 (k=7), A255843 (k=8), this sequence (k=9).

Programs

  • Maple
    seq(2*n^2 + 2*n + 5, n=0..100); # Robert Israel, Nov 10 2017
  • Mathematica
    Table[2n^2+2n+5,{n,0,50}] (* or *) LinearRecurrence[{3,-3,1},{5,9,17},50] (* Harvey P. Dale, Sep 18 2023 *)
  • PARI
    Vec((5 - 6*x + 5*x^2) / (1 - x)^3 + O(x^50)) \\ Colin Barker, Nov 13 2017

Formula

O.g.f.: (5 - 6*x + 5*x^2)/(1 - x)^3.
E.g.f.: (5 + 4*x + 2*x^2)*exp(x).
a(n) = a(-1-n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
a(n) = 5*A000217(n+1) - 6*A000217(n) + 5*A000217(n-1).
n*a(n) - Sum_{j=0..n-1} a(j) = A002492(n) for n>0.
a(n) = Integral_{x=0..2n+4} |3-x| dx. - Pedro Caceres, Dec 29 2020

A217758 Triangular numbers of the form k^2 + k - 1.

Original entry on oeis.org

1, 55, 1891, 64261, 2183005, 74157931, 2519186671, 85578188905, 2907139236121, 98757155839231, 3354836159297755, 113965672260284461, 3871478020690373941, 131516287031212429555, 4467682281040532230951, 151769681268346883422801
Offset: 1

Views

Author

Alex Ratushnyak, Mar 23 2013

Keywords

Comments

Triangular numbers belonging to A028387. - Bruno Berselli, Apr 18 2018
Since this sequence lists triangular numbers t such that 4*t + 5 = u^2 and 8*t + 1 = v^2 by definition of triangular numbers, 2*u^2 - 9 = 2*(4*t + 5) - 9 = 8*t + 1 = v^2, that is, sqrt(4*a(n) + 5) is in A075841. - Altug Alkan, Apr 18 2018

Examples

			Triangular(10) = 55 = 7^2 + 7 - 1, so 55 is in the sequence.
		

Crossrefs

Programs

  • C
    #include 
    typedef unsigned long long U64;
    U64 rootPronic(U64 a) {
        U64 sr = 1L<<32, s, b;
        while (a < sr*(sr-1))  sr>>=1;
        for (b = sr>>1; b; b>>=1) {
            s = sr+b;
            if (a >= s*(s-1))  sr = s;
        }
        return sr;
    }
    int main() {
      U64 a, i, t;
      for (i=0; i < 1L<<32; ++i) {
          a = i*(i+1)/2 + 1;
          t = rootPronic(a);
          if (a == t*(t-1))  printf("%llu %llu %llu\n", i, t, a-1);
      }
      return 0;
    }
    
  • Mathematica
    a[1]=1; a[2]=55; a[3]=1891; a[n_] := a[n] = 35*a[n-1] - 35*a[n-2] + a[n-3]; Array[a,20] (* Giovanni Resta, Mar 24 2013 *)
    Table[Floor@(9 (17 + Sqrt@ 288)^n*(3 - Sqrt@ 8)/32), {n, 0, 16}] (* or *)
    CoefficientList[Series[-x (1 + 20 x + x^2)/((x - 1) (x^2 - 34 x + 1)), {x, 0, 16}], x] (* Michael De Vlieger, Oct 08 2016 *)
  • PARI
    Vec(x*(1+20*x+x^2)/(1-35*x+35*x^2-x^3)+O(x^66)) \\ Joerg Arndt, Mar 25 2013

Formula

From Giovanni Resta, Mar 24 2013: (Start)
G.f.: -x*(1 + 20*x + x^2) / ( (x - 1)*(x^2 - 34*x + 1) ).
a(n) = floor(9 * (17 + sqrt(288))^n * (3 - sqrt(8))/32). (End)
a(n) = (A075841(n)^2 - 5)/4. - Altug Alkan, Apr 18 2018
Showing 1-6 of 6 results.