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 19 results. Next

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

A006451 Numbers k such that k*(k+1)/2 + 1 is a square.

Original entry on oeis.org

0, 2, 5, 15, 32, 90, 189, 527, 1104, 3074, 6437, 17919, 37520, 104442, 218685, 608735, 1274592, 3547970, 7428869, 20679087, 43298624, 120526554, 252362877, 702480239, 1470878640, 4094354882, 8572908965, 23863649055, 49966575152
Offset: 0

Views

Author

Keywords

References

  • A. J. Gottlieb, How four dogs meet in a field, etc., Technology Review, Problem J/A2, Jul/August 1973 pp. 73-74; solution Jan 1974 (see link).
  • Jeffrey Shallit, personal communication.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. numbers m such that k*A000217(m)+1 is a square: this sequence for k=1; m=0 for k=2; A233450 for k=3; A001652 for k=4; A129556 for k=5; A001921 for k=6. - Bruno Berselli, Dec 16 2013

Programs

  • Haskell
    a006451 n = a006451_list !! n
    a006451_list = 0 : 2 : 5 : 15 : map (+ 2)
       (zipWith (-) (map (* 6) (drop 2 a006451_list)) a006451_list)
    -- Reinhard Zumkeller, Jan 10 2012
  • Maple
    N:= 100: # to get a(0) to a(N)
    A[0]:= 0: A[1]:= 2: A[2]:= 5: A[3]:= 15:
    for n from 4 to N do A[n]:= 6*A[n-2] - A[n-4] + 2 od:
    seq(A[n],n=0..N); # Robert Israel, Aug 26 2014
  • Mathematica
    LinearRecurrence[{1,6,-6,-1,1},{0,2,5,15,32},30] (* Harvey P. Dale, Jul 17 2013 *)
    Select[Range[10^6], IntegerQ@ Sqrt[# (# + 1)/2 + 1] &] (* Michael De Vlieger, Apr 25 2017 *)
  • PARI
    for(n=1,10000,t=n*(n+1)/2+1;if(issquare(t), print1(n,", "))) \\ Joerg Arndt, Oct 10 2009
    

Formula

G.f.: x*(-2-3*x+2*x^2+x^3)/(x-1)/(x^2+2*x-1)/(x^2-2*x-1). Conjectured (correctly) by Simon Plouffe in his 1992 dissertation.
a(n) = 6*a(n-2) - a(n-4) + 2 with a(0)=0, a(1)=2, a(2)=5, a(3)=15. - Zak Seidov, Apr 15 2008
a(n) = 3*a(n-2) + 4*sqrt((a(n-2)^2 + a(n-2))/2 + 1) + 1 with a(0) = 0, a(1) = 2. - Raphie Frank, Feb 02 2013
a(n) = a(n-1) + 6*a(n-2) - 6*a(n-3) - a(n-4) + a(n-5); a(0)=0, a(1)=2, a(2)=5, a(3)=15, a(4)=32. - Harvey P. Dale, Jul 17 2013
a(n) = 7*a(n-2) - 7*a(n-4) + a(n-6), for n>5. - Hermann Stamm-Wilbrandt, Aug 26 2014
a(2*n+1) = A098790(2*n+1). - Hermann Stamm-Wilbrandt, Aug 26 2014
a(2*n) = A098586(2*n-1), for n>0. - Hermann Stamm-Wilbrandt, Aug 27 2014
a(n) = 8*sqrt(T(a(n-2)) + 1) + a(n-4) where T(a(n)) = A000217(a(n)), and a(-1) = -1, a(0)=0, a(1)=2, a(2)=5. - Vladimir Pletser, Apr 29 2017

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Feb 07 2001
Edited by N. J. A. Sloane, Oct 24 2009, following discussions by several correspondents in the Sequence Fans Mailing List, Oct 10 2009

A001570 Numbers k such that k^2 is centered hexagonal.

Original entry on oeis.org

1, 13, 181, 2521, 35113, 489061, 6811741, 94875313, 1321442641, 18405321661, 256353060613, 3570537526921, 49731172316281, 692665874901013, 9647591076297901, 134373609193269601, 1871582937629476513, 26067787517619401581, 363077442309042145621
Offset: 1

Views

Author

Keywords

Comments

Chebyshev T-sequence with Diophantine property. - Wolfdieter Lang, Nov 29 2002
a(n) = L(n,14), where L is defined as in A108299; see also A028230 for L(n,-14). - Reinhard Zumkeller, Jun 01 2005
Numbers x satisfying x^2 + y^3 = (y+1)^3. Corresponding y given by A001921(n)={A028230(n)-1}/2. - Lekraj Beedassy, Jul 21 2006
Mod[ a(n), 12 ] = 1. (a(n) - 1)/12 = A076139(n) = Triangular numbers that are one-third of another triangular number. (a(n) - 1)/4 = A076140(n) = Triangular numbers T(k) that are three times another triangular number. - Alexander Adamchuk, Apr 06 2007
Also numbers n such that RootMeanSquare(1,3,...,2*n-1) is an integer. - Ctibor O. Zizka, Sep 04 2008
a(n), with n>1, is the length of the cevian of equilateral triangle whose side length is the term b(n) of the sequence A028230. This cevian divides the side (2*x+1) of the triangle in two integer segments x and x+1. - Giacomo Fecondo, Oct 09 2010
For n>=2, a(n) equals the permanent of the (2n-2)X(2n-2) tridiagonal matrix with sqrt(12)'s along the main diagonal, and 1's along the superdiagonal and the subdiagonal. - John M. Campbell, Jul 08 2011
Beal's conjecture would imply that set intersection of this sequence with the perfect powers (A001597) equals {1}. In other words, existence of a nontrivial perfect power in this sequence would disprove Beal's conjecture. - Max Alekseyev, Mar 15 2015
Numbers n such that there exists positive x with x^2 + x + 1 = 3n^2. - Jeffrey Shallit, Dec 11 2017
Given by the denominators of the continued fractions [1,(1,2)^i,3,(1,2)^{i-1},1]. - Jeffrey Shallit, Dec 11 2017
A near-isosceles integer-sided triangle with an angle of 2*Pi/3 is a triangle whose sides (a, a+1, c) satisfy Diophantine equation (a+1)^3 - a^3 = c^2. For n >= 2, the largest side c is given by a(n) while smallest and middle sides (a, a+1) = (A001921(n-1), A001922(n-1)) (see Julia link). - Bernard Schott, Nov 20 2022

Examples

			G.f. = x + 13*x^2 + 181*x^3 + 2521*x^4 + 35113*x^5 + 489061*x^6 + 6811741*x^7 + ...
		

References

  • E.-A. Majol, Note #2228, L'Intermédiaire des Mathématiciens, 9 (1902), pp. 183-185. - N. J. A. Sloane, Mar 03 2022
  • 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

Bisection of A003500/4. Cf. A006051, A001921, A001922.
One half of odd part of bisection of A001075. First differences of A007655.
Cf. A077417 with companion A077416.
Row 14 of array A094954.
A122571 is another version of the same sequence.
Row 2 of array A188646.
Cf. similar sequences listed in A238379.
Cf. A028231, which gives the corresponding values of x in 3n^2 = x^2 + x + 1.
Similar sequences of the type cosh((2*m+1)*arccosh(k))/k are listed in A302329. This is the case k=2.

Programs

  • Magma
    [((2 + Sqrt(3))^(2*n - 1) + (2 - Sqrt(3))^(2*n - 1))/4: n in [1..50]]; // G. C. Greubel, Nov 04 2017
  • Maple
    A001570:=-(-1+z)/(1-14*z+z**2); # Simon Plouffe in his 1992 dissertation.
  • Mathematica
    NestList[3 + 7*#1 + 4*Sqrt[1 + 3*#1 + 3*#1^2] &, 0, 24] (* Zak Seidov, May 06 2007 *)
    f[n_] := Simplify[(2 + Sqrt@3)^(2 n - 1) + (2 - Sqrt@3)^(2 n - 1)]/4; Array[f, 19] (* Robert G. Wilson v, Oct 28 2010 *)
    a[c_, n_] := Module[{},
       p := Length[ContinuedFraction[ Sqrt[ c]][[2]]];
       d := Denominator[Convergents[Sqrt[c], n p]];
       t := Table[d[[1 + i]], {i, 0, Length[d] - 1, p}];
       Return[t];
      ] (* Complement of A041017 *)
    a[12, 20] (* Gerry Martens, Jun 07 2015 *)
    LinearRecurrence[{14, -1}, {1, 13}, 19] (* Jean-François Alcover, Sep 26 2017 *)
    CoefficientList[Series[x (1-x)/(1-14x+x^2),{x,0,20}],x] (* Harvey P. Dale, Sep 18 2024 *)
  • PARI
    {a(n) = real( (2 + quadgen( 12)) ^ (2*n - 1)) / 2}; /* Michael Somos, Feb 15 2011 */
    

Formula

a(n) = ((2 + sqrt(3))^(2*n - 1) + (2 - sqrt(3))^(2*n - 1)) / 4. - Michael Somos, Feb 15 2011
G.f.: x * (1 - x) / (1 -14*x + x^2). - Michael Somos, Feb 15 2011
Let q(n, x) = Sum_{i=0, n} x^(n-i)*binomial(2*n-i, i) then a(n) = q(n, 12). - Benoit Cloitre, Dec 10 2002
a(n) = S(n, 14) - S(n-1, 14) = T(2*n+1, 2)/2 with S(n, x) := U(n, x/2), resp. T(n, x), Chebyshev's polynomials of the second, resp. first, kind. See A049310 and A053120. S(-1, x)=0, S(n, 14)=A007655(n+1) and T(n, 2)=A001075(n). - Wolfdieter Lang, Nov 29 2002
a(n) = A001075(n)*A001075(n+1) - 1 and thus (a(n)+1)^6 has divisors A001075(n)^6 and A001075(n+1)^6 congruent to -1 modulo a(n) (cf. A350916). - Max Alekseyev, Jan 23 2022
4*a(n)^2 - 3*b(n)^2 = 1 with b(n)=A028230(n+1), n>=0.
a(n)*a(n+3) = 168 + a(n+1)*a(n+2). - Ralf Stephan, May 29 2004
a(n) = 14*a(n-1) - a(n-2), a(0) = a(1) = 1. a(1 - n) = a(n) (compare A122571).
a(n) = 12*A076139(n) + 1 = 4*A076140(n) + 1. - Alexander Adamchuk, Apr 06 2007
a(n) = (1/12)*((7-4*sqrt(3))^n*(3-2*sqrt(3))+(3+2*sqrt(3))*(7+4*sqrt(3))^n -6). - Zak Seidov, May 06 2007
a(n) = A102871(n)^2+(A102871(n)-1)^2; sum of consecutive squares. E.g. a(4)=36^2+35^2. - Mason Withers (mwithers(AT)semprautilities.com), Jan 26 2008
a(n) = sqrt((3*A028230(n+1)^2 + 1)/4).
a(n) = A098301(n+1) - A001353(n)*A001835(n).
a(n) = A000217(A001571(n-1)) + A000217(A133161(n)), n>=1. - Ivan N. Ianakiev, Sep 24 2013
a(n)^2 = A001922(n-1)^3 - A001921(n-1)^3, for n >= 1. - Bernard Schott, Nov 20 2022
a(n) = 2^(2*n-3)*Product_{k=1..2*n-1} (2 - sin(2*Pi*k/(2*n-1))). Michael Somos, Dec 18 2022
a(n) = A003154(A101265(n)). - Andrea Pinos, Dec 19 2022

A028230 Bisection of A001353. Indices of square numbers which are also octagonal.

Original entry on oeis.org

1, 15, 209, 2911, 40545, 564719, 7865521, 109552575, 1525870529, 21252634831, 296011017105, 4122901604639, 57424611447841, 799821658665135, 11140078609864049, 155161278879431551, 2161117825702177665, 30100488280951055759, 419245718107612602961, 5839339565225625385695
Offset: 1

Views

Author

Keywords

Comments

Chebyshev S-sequence with Diophantine property.
4*b(n)^2 - 3*a(n)^2 = 1 with b(n) = A001570(n), n>=0.
y satisfying the Pellian x^2 - 3*y^2 = 1, for even x given by A094347(n). - Lekraj Beedassy, Jun 03 2004
a(n) = L(n,-14)*(-1)^n, where L is defined as in A108299; see also A001570 for L(n,+14). - Reinhard Zumkeller, Jun 01 2005
Product x*y, where the pair (x, y) solves for x^2 - 3y^2 = -2, i.e., a(n) = A001834(n)*A001835(n). - Lekraj Beedassy, Jul 13 2006
Numbers n such that RootMeanSquare(1,3,...,2*A001570(k)-1) = n. - Ctibor O. Zizka, Sep 04 2008
As n increases, this sequence is approximately geometric with common ratio r = lim(n -> oo, a(n)/a(n-1)) = (2 + sqrt(3))^2 = 7 + 4 * sqrt(3). - Ant King, Nov 15 2011

References

  • R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 329.
  • J. D. E. Konhauser et al., Which Way Did the Bicycle Go?, MAA 1996, p. 104.

Crossrefs

Programs

  • GAP
    a:=[1,15];; for n in [3..30] do a[n]:=14*a[n-1]-a[n-2]; od; a; # G. C. Greubel, Dec 06 2019
  • Magma
    I:=[1,15]; [n le 2 select I[n] else 14*Self(n-1) - Self(n-2): n in [1..30]]; // G. C. Greubel, Dec 06 2019
    
  • Maple
    seq(coeff(series((1+x)/(1-14*x+x^2), x, n+1), x, n), n = 0..30); # G. C. Greubel, Dec 06 2019
  • Mathematica
    LinearRecurrence[{14, - 1}, {1, 15}, 17] (* Ant King, Nov 15 2011 *)
    CoefficientList[Series[(1+x)/(1-14x+x^2), {x, 0, 30}], x] (* Vincenzo Librandi, Jun 17 2014 *)
  • PARI
    Vec((1+x)/(1-14*x+x^2)+O(x^99)) \\ Charles R Greathouse IV, Jun 16 2014
    
  • PARI
    isok(n) = ispolygonal(n^2, 8); \\ Michel Marcus, Jul 09 2017
    
  • Sage
    [(lucas_number2(n,14,1)-lucas_number2(n-1,14,1))/12 for n in range(1, 18)] # Zerinvary Lajos, Nov 10 2009
    

Formula

a(n) = 2*A001921(n)+1.
a(n) = 14*a(n-1) - a(n-2) for n>1.
a(n) = S(n, 14) + S(n-1, 14) = S(2*n, 4) with S(n, x) := U(n, x/2) Chebyshev's polynomials of the second kind. See A049310. S(-1, x) = 0, S(n, 14) = A007655(n+1) and S(n, 4) = A001353(n+1).
G.f.: x*(1+x)/(1-14*x+x^2).
a(n) = (ap^(2*n+1) - am^(2*n+1))/(ap - am) with ap := 2+sqrt(3) and am := 2-sqrt(3).
a(n+1) = Sum_{k=0..n} (-1)^k*binomial(2*n-k, k)*16^(n-k), n>=0.
a(n) = sqrt((4*A001570(n-1)^2 - 1)/3).
a(n) ~ 1/6*sqrt(3)*(2 + sqrt(3))^(2*n-1). - Joe Keane (jgk(AT)jgk.org), May 15 2002
4*a(n+1) = (A001834(n))^2 + 4*(A001835(n+1))^2 - (A001835(n))^2. E.g. 4*a(3) = 4*209 = 19^2 + 4*11^2 - 3^2 = (A001834(2))^2 + 4*(A001835(3))^2 - (A001835(2))^2. Generating floretion: 'i + 2'j + 3'k + i' + 2j' + 3k' + 4'ii' + 3'jj' + 4'kk' + 3'ij' + 3'ji' + 'jk' + 'kj' + 4e. - Creighton Dement, Dec 04 2004
a(n) = f(a(n-1),7) + f(a(n-2),7), where f(x,s) = s*x + sqrt((s^2-1)*x^2+1); f(0,s)=0. - Marcos Carreira, Dec 27 2006
From Ant King, Nov 15 2011: (Start)
a(n) = 1/6 * sqrt(3) * ( (tan(5*Pi/12)) ^ (2n-1) - (tan(Pi/12)) ^ (2n-1) ).
a(n) = floor (1/6 * sqrt(3) * (tan(5*Pi/12)) ^ (2n-1)). (End)
a(n) = A001353(n)^2-A001353(n-1)^2. - Antonio Alberto Olivares, Apr 06 2020
E.g.f.: 1 - exp(7*x)*(3*cosh(4*sqrt(3)*x) - 2*sqrt(3)*sinh(4*sqrt(3)*x))/3. - Stefano Spezia, Dec 12 2022
a(n) = sqrt(A036428(n)). - Bernard Schott, Dec 19 2022

Extensions

Additional comments from Wolfdieter Lang, Nov 29 2002
Incorrect recurrence relation deleted by Ant King, Nov 15 2011
Minor edits by Vaclav Kotesovec, Jan 28 2015

A129556 Numbers k such that the k-th centered pentagonal number A005891(k) = (5k^2 + 5k + 2)/2 is a square.

Original entry on oeis.org

0, 2, 21, 95, 816, 3626, 31005, 137711, 1177392, 5229410, 44709909, 198579887, 1697799168, 7540806314, 64471658493, 286352060063, 2448225223584, 10873837476098, 92968086837717, 412919472031679, 3530339074609680, 15680066099727722, 134059916748330141
Offset: 1

Views

Author

Alexander Adamchuk, Apr 20 2007

Keywords

Comments

Corresponding numbers m > 0 such that m^2 is a centered pentagonal number are listed in A129557 = {1, 4, 34, 151, 1291, 5734, 49024, ...}.
From Andrea Pinos, Nov 02 2022: (Start)
By definition: 5*T(a(n)) = A129557(n)^2 - 1 where triangular number T(j) = j*(j+1)/2. This implies:
Every odd prime factor of a(n) and d(n)=a(n)+1 is present in b(n)=A129557(n)+1 or in c(n)=A129557(n)-1. (End)
From the law of cosines the non-Pythagorean triple {a(n), a(n)+1=A254332(n), A129557(n+1)} forms a near-isosceles triangle whose angle between the consecutive integer sides is equal to the central angle of the regular pentachoron polytope (4-simplex) (see A140244 and A140245). This implies that the terms {a(n)} are also those numbers k such that 1 + 5*A000217(k) is a square. - Federico Provvedi, Apr 04 2023

Crossrefs

Cf. A005891 (centered pentagonal numbers), A129557 (numbers k>0 such that k^2 is a centered pentagonal number), A221874.
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; A001652 for k=4; this sequence for k=5; A001921 for k=6. - Bruno Berselli, Dec 16 2013

Programs

  • Maple
    A005891 := proc(n) (5*n^2+5*n+2)/2 ; end: n := 0 : while true do if issqr(A005891(n)) then print(n) ; fi ; n := n+1 ; od : # R. J. Mathar, Jun 06 2007
  • Mathematica
    Do[ f=(5n^2+5n+2)/2; If[ IntegerQ[ Sqrt[f] ], Print[n] ], {n,1,40000} ]
    LinearRecurrence[{1,38,-38,-1,1},{0,2,21,95,816},30] (* Harvey P. Dale, Nov 09 2017 *)
    Table[(((x^(n+2))+(((-1)^n*(x^(2*n+1)+1)-x)/(x^n)))/(x^2+1)-1)/2/.x->3+Sqrt[10],{n,0,50}]//Round (* Federico Provvedi, Apr 04 2023 *)
  • PARI
    a(n)=([0,1,0,0,0; 0,0,1,0,0; 0,0,0,1,0; 0,0,0,0,1; 1,-1,-38,38,1]^(n-1)*[0;2;21;95;816])[1,1] \\ Charles R Greathouse IV, Feb 11 2019

Formula

For n >= 5, a(n) = 38*a(n-2) - a(n-4) + 18. - Max Alekseyev, May 08 2009
G.f.: x^2*(x^3+2*x^2-19*x-2) / ((x-1)*(x^2-6*x-1)*(x^2+6*x-1)). - Colin Barker, Feb 21 2013
a(n) = (A221874(n) - 1) / 2. - Bruno Berselli, Feb 21 2013
From Andrea Pinos, Oct 24 2022: (Start)
The ratios of successive terms converge to two different limits:
lower: D = lim_{n->oo} a(2n)/a(2n-1) = (7+2*sqrt(10))/3;
upper: E = lim_{n->oo} a(2n+1)/a(2n) = (13+4*sqrt(10))/3.
So lim_{n->oo} a(n+2)/a(n) = D*E = 19 + 6*sqrt(10). (End)
a(n) = (x^(2*(n+1)) + (-1)^n*(x^(2*n+1)+1) - x) / (2*x^n*(x^2 + 1)) - (1/2), with x=3+sqrt(10). - Federico Provvedi, Apr 04 2023

Extensions

More terms from R. J. Mathar, Jun 06 2007
Further terms from Max Alekseyev, May 08 2009
a(22)-a(23) from Colin Barker, Feb 21 2013

A157088 Consider all consecutive integer Pythagorean septuples (X, X+1, X+2, X+3, Z-2, Z-1, Z) ordered by increasing Z; sequence gives X values.

Original entry on oeis.org

0, 21, 312, 4365, 60816, 847077, 11798280, 164328861, 2288805792, 31878952245, 444016525656, 6184352406957, 86136917171760, 1199732487997701, 16710117914796072, 232741918319147325, 3241676738553266496, 45150732421426583637, 628868577161418904440, 8759009347838438078541
Offset: 0

Views

Author

Charlie Marion, Mar 12 2009

Keywords

Comments

In general, the first terms of consecutive integer Pythagorean 2k+1-tuples may be found as follows: let first(0)=0, first(1) = k*(2k+1) and, for n > 1, first(n) = (4k+2)*first(n-1) - first(n-2) + 2*k^2; e.g., if k=4, then first(2) = 680 = 18*36 - 0 + 32.
In general, the first and last terms of consecutive integer Pythagorean 2k+1-tuples may be found as follows: let first(0)=0 and last(0)=k; for n > 0, let first(n) = (2k+1)*first(n-1) + 2k*last(n-1) + k and last(n) = (2k+2)*first(n-1) + (2k+1)*last(n-1) + 2k; e.g., if k=4 and n=2, first(2) = 680 = 9*36 + 8*44 + 4 and last(2) = 764 = 10*36 + 9*44 + 8.
In general, the first terms of consecutive integer Pythagorean 2k+1-tuples may be found as follows: first(n) = (k^(n+1)((1+sqrt((k+1)/k))^(2n+1) + (1-sqrt((k+1)/k))^(2n+1)) - 2*k)/4; e.g., if k=4 and n=2, then first(2) = 680 = (4^3((1+sqrt(5/4)^5 + (1-sqrt(5/4))^5)-2*4)/4.
In general, if u(n) is the numerator and e(n) is the denominator of the n-th continued fraction convergent to sqrt((k+1)/k), then the first terms of consecutive integer Pythagorean 2k+1-tuples may be found as follows: first(2n+1) = k*u(2n)*u(2n+1) and, for n > 0, first(2n) = (k+1)*e(2n-1)*e(2n); e.g., a(3) = 4365 = 3*15*97 and a(4) = 60816 = 4*84*181.
In general, if first(n) is the first term of the n-th consecutive integer Pythagorean 2k+1-tuple, then lim_{n->inf} first(n+1)/first(n) = k*(1+sqrt((k+1)/k))^2 = 2k + 1 + 2*sqrt(k^2+k).

Examples

			a(2)=312 since 312^2 + 313^2 + 314^2 + 315^2 = 361^2 + 361^2 + 363^2.
		

References

  • A. H. Beiler, Recreations in the Theory of Numbers. New York: Dover, 1964, pp. 122-125.
  • L. E. Dickson, History of the Theory of Numbers, Vol. II, Diophantine Analysis. Dover Publications, Inc., Mineola, NY, 2005, pp. 181-183.
  • W. Sierpinski, Pythagorean Triangles. Dover Publications, Mineola NY, 2003, pp. 16-22.

Crossrefs

Programs

  • Magma
    [Round((3^(n+1)*((1+Sqrt(4/3))^(2*n+1)+(1-Sqrt(4/3))^(2*n+1))-2*3)/4): n in [0..50]]; // G. C. Greubel, Nov 04 2017
  • Mathematica
    CoefficientList[Series[3*x*(-7 + x)/((x - 1)*(x^2 - 14*x + 1)), {x, 0, 50}], x] (* G. C. Greubel, Nov 04 2017 *)
  • PARI
    my(x='x+O('x^50)); concat([0], Vec(3*x*(-7+x)/((x-1)*(x^2-14*x+1)))) \\ G. C. Greubel, Nov 04 2017
    

Formula

For n > 1, a(n) = 14*a(n-1) - a(n-2) + 18.
For n > 0, a(n) = 7*a(n-1) + 6*A157089(n-1) + 3.
Limit_{n->oo} a(n+1)/a(n) = 3*(1+sqrt(4/3))^2 = 7 + 2*sqrt(12).
a(n) = (3^(n+1)*((1+sqrt(4/3))^(2*n+1) + (1-sqrt(4/3))^(2*n+1)) - 2*3)/4.
From R. J. Mathar, Mar 19 2009: (Start)
G.f.: 3*x*(-7+x)/((x-1)*(x^2-14*x+1)).
a(n) = 15*a(n-1) - 15*a(n-2) + a(n-3) = 3*A001921(n). (End)

A001922 Numbers k such that 3*k^2 - 3*k + 1 is both a square (A000290) and a centered hexagonal number (A003215).

Original entry on oeis.org

1, 8, 105, 1456, 20273, 282360, 3932761, 54776288, 762935265, 10626317416, 148005508553, 2061450802320, 28712305723921, 399910829332568, 5570039304932025, 77580639439715776, 1080558912851088833, 15050244140475527880, 209622859053806301481
Offset: 0

Views

Author

Keywords

Comments

Also larger of two consecutive integers whose cubes differ by a square. Defined by a(n)^3 - (a(n) - 1)^3 = square.
Let m be the n-th ratio 2/1, 7/4, 26/15, 97/56, 362/209, ... Then a(n) = m*(2-m)/(m^2-3). The numerators 2, 7, 26, ... of m are A001075. The denominators 1, 4, 15, ... of m are A001353.
From Colin Barker, Jan 06 2015: (Start)
Also indices of centered triangular numbers (A005448) which are also centered square numbers (A001844).
Also indices of centered hexagonal numbers (A003215) which are also centered octagonal numbers (A016754).
Also positive integers x in the solutions to 3*x^2 - 4*y^2 - 3*x + 4*y = 0, the corresponding values of y being A156712.
(End)

Examples

			8 is in the sequence because 3*8^2 - 3*8 + 1 = 169 is a square and also a centered hexagonal number. - _Colin Barker_, Jan 07 2015
		

References

  • 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

Programs

  • Magma
    I:=[1, 8, 105]; [n le 3 select I[n] else 15*Self(n-1)-15*Self(n-2)+Self(n-3): n in [1..20]]; // Vincenzo Librandi, Apr 16 2012
    
  • Maple
    seq(simplify((1 +ChebyshevU(n,7) +ChebyshevU(n-1,7))/2), n=0..30); # G. C. Greubel, Oct 07 2022
  • Mathematica
    With[{s1=3+2Sqrt[3],s2=3-2Sqrt[3],t1=7+4Sqrt[3],t2=7-4Sqrt[3]}, Simplify[ Table[(s1 t1^n+s2 t2^n+6)/12,{n,0,20}]]] (* or *) LinearRecurrence[ {15,-15,1},{1,8,105},21] (* Harvey P. Dale, Aug 14 2011 *)
    CoefficientList[Series[(1-7*x)/(1-15*x+15*x^2-x^3),{x,0,30}],x] (* Vincenzo Librandi, Apr 16 2012 *)
  • PARI
    Vec((1-7*x)/(1-15*x+15*x^2-x^3) + O(x^100)) \\ Colin Barker, Jan 06 2015
    
  • SageMath
    [(1+chebyshev_U(n,7) +chebyshev_U(n-1,7))/2 for n in range(30)] # G. C. Greubel, Oct 07 2022

Formula

a(n) = 15*a(n-1) - 15*a(n-2) + a(n-3).
a(n) = (s1*t1^n + s2*t2^n + 6)/12 where s1 = 3 + 2*sqrt(3), s2 = 3 - 2*sqrt(3), t1 = 7 + 4*sqrt(3), t2 = 7 - 4*sqrt(3).
a(n) = A001075(n)*A001353(n+1).
G.f.: (1-7*x)/((1-x)*(1-14*x+x^2)). - Simon Plouffe (in his 1992 dissertation) and Colin Barker, Jan 01 2012
a(n) = A076139(n+1) - 7*A076139(n). - R. J. Mathar, Jul 14 2015
a(n) = (1/2)*(1 + ChebyshevU(n, 7) + ChebyshevU(n-1, 7)). G. C. Greubel, Oct 07 2022
a(n) = 1 - a(-1-n) = 1 + A001921(n) for all integers n. - Michael Somos, Jul 10 2025

Extensions

Additional comments from James R. Buddenhagen, Mar 04 2001
Name improved by Colin Barker, Jan 07 2015
Edited by Robert Israel, Feb 20 2017

A006051 Square hex numbers.

Original entry on oeis.org

1, 169, 32761, 6355441, 1232922769, 239180661721, 46399815451081, 9001325016847969, 1746210653453054881, 338755865444875798921, 65716891685652451935769, 12748738231151130799740241, 2473189499951633722697670961, 479786014252385791072548426169
Offset: 1

Views

Author

Keywords

Comments

Numbers n of the form n = y^2 = 3*x^2 - 3*x + 1.

Examples

			G.f. = x + 169*x^2 + 32761*x^3 + 6355441*x^4 + 1232922769*x^5 + ...
		

References

  • M. Gardner, Time Travel and Other Mathematical Bewilderments. Freeman, NY, 1988, p. 19.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A003500.
Intersection of A000290 and A003215.
Values of x are given by A001922, values of y by A001570.

Programs

  • Magma
    [(7*Evaluate(ChebyshevSecond(n),97) - 7*Evaluate(ChebyshevU(n-1), 97) + 1)/8: n in [1..30]]; // G. C. Greubel, Nov 04 2017; Oct 07 2022
    
  • Mathematica
    Rest@ CoefficientList[Series[x(1-26x+x^2)/((1-x)(1-194x+x^2)), {x,0,20}], x] (* Michael De Vlieger, Jan 02 2017 *)
    LinearRecurrence[{195,-195,1},{1,169,32761},20] (* Harvey P. Dale, Nov 03 2017 *)
  • PARI
    {a(n) = sqr( real( (2 + quadgen( 12)) ^ (2*n - 1)) / 2)} /* Michael Somos, Feb 15 2011 */
    
  • SageMath
    def A006051(n): return (7*chebyshev_U(n-1,97) - 7*chebyshev_U(n-2,97) + 1)/8
    [A006051(n) for n in range(1,31)] # G. C. Greubel, Oct 07 2022

Formula

a(n) = A001570(n)^2.
a(1 - n) = a(n).
G.f.: x * (1 - 26*x + x^2) / ((1 - x) * (1 - 194*x + x^2)). - Simon Plouffe in his 1992 dissertation
a(n) = 194*a(n-1) - a(n-2) - 24, a(1)=1, a(2)=169. - James Sellers, Jul 04 2000
a(n+1) = A003215(A001921(n)). - Joerg Arndt, Jan 02 2017
a(n) = (1/8)*(1 + 7*(ChebyshevU(n-1, 97) - ChebyshevU(n-2, 97))). - G. C. Greubel, Oct 07 2022

A227418 Array A(n,k) with all numbers m such that 3*m^2 +- 3^k is a square and their corresponding square roots, read by downward antidiagonals.

Original entry on oeis.org

0, 1, 1, 0, 2, 4, 3, 3, 7, 15, 0, 6, 12, 26, 56, 9, 9, 21, 45, 97, 209, 0, 18, 36, 78, 168, 362, 780, 27, 27, 63, 135, 291, 627, 1351, 2911, 0, 54, 108, 234, 504, 1086, 2340, 5042, 10864, 81, 81, 189, 405, 873, 1881, 4053, 8733, 18817, 40545
Offset: 0

Views

Author

Richard R. Forberg, Sep 02 2013

Keywords

Comments

Array is analogous to A228405 in goal and structure, with key differences.
Left column is A001353. Top row (not in OEIS) interleaves 0 with the powers of 3, as: 0, 1, 0, 3, 0, 9, 0, 27, 0, 81.
Either or both may be used as initializing values. See Formula section.
The left column is the second binomial transform of the top row. The intermediate transform sequence is A002605, not present in this array.
The columns of the array hold all values, in sequential order, of numbers m such that 3*m^2 + 3^k or 3*m^2 - 3^k are squares, and their corresponding square roots in the next column, which then form the "next round" of m values for column k+1.
For example: A(n,0) are numbers such that 3*m^2 + 1 are squares, the integer square roots of each are in A(n,1), which are then numbers m such that 3*m^2 - 3 are squares, with those square roots in A(n,2), etc. The sign alternates for each increment of k, etc. No integer square roots exist for the opposite sign in a given column, regardless of n.
Also, A(n,1) are values of m such that floor(m^2/3) is square, with the corresponding square roots given by A(n,0).
A(n,k)/A(n,k-2) = 3; A(n,k)/A(n,k-1) converges to sqrt(3) for large n.
A(n,k)/A(n-1,k) converges to 2 + sqrt(3) for large n.
Several ways of combining the first few columns give OEIS sequences:
A(n,0) + A(n,1) = A001835; A(n,1) + A(n,2)= A001834; A(n,2) + A(n,3) = A082841;
A(n,0)*A(n,1)/2 = A007655(n); A(n+2,0)*A(n+1,1) = A001922(n);
A(n,0)*A(n+1,1) = A001921(n); A(n,0)^2 + A(n,1)^2 = A103974(n);
A(n,1)^2 - A(n,0)^2 = A011922(n); (A(n+2,0)^2 + A(n+1,1)^2)/2 = A122770(n) = 2*A011916(n).
The main diagonal (without initial 0) = 2*A090018. The first subdiagonal = abs(A099842). First superdiagonal = A141041.
A001353 (in left column) are the only initializing set of numbers where the recursive square root equation (see below) produces exclusively integer values, for all iterations of k. For any other initial values only even iterations (at k = 2, 4, ...) produce integers.

Examples

			The array, A(n, k), begins as:
    0,    1,    0,    3,    0,     9,     0,    27, ... see A000244;
    1,    2,    3,    6,    9,    18,    27,    54, ... A038754;
    4,    7,   12,   21,   36,    63,   108,   189, ... A228879;
   15,   26,   45,   78,  135,   234,   405,   702, ...
   56,   97,  168,  291,  504,   873,  1512,  2619, ...
  209,  362,  627, 1086, 1881,  3258,  5643,  9774, ...
  780, 1351, 2340, 4053, 7020, 12159, 21060, 36477, ...
Antidiagonal triangle, T(n, k), begins as:
   0;
   1,  1;
   0,  2,   4;
   3,  3,   7,  15;
   0,  6,  12,  26,  56;
   9,  9,  21,  45,  97,  209;
   0, 18,  36,  78, 168,  362,  780;
  27, 27,  63, 135, 291,  627, 1351, 2911;
   0, 54, 108, 234, 504, 1086, 2340, 5042, 10864;
  81, 81, 189, 405, 873, 1881, 4053, 8733, 18817, 40545;
		

Crossrefs

Programs

  • Magma
    function A(n,k)
      if k lt 0 then return 0;
      elif n eq 0 then return Round((1/2)*(1-(-1)^k)*3^((k-1)/2));
      elif k eq 0 then return Evaluate(ChebyshevSecond(n), 2);
      else return 2*A(n, k-1) - A(n-1, k-1);
      end if; return A;
    end function;
    A227418:= func< n,k | A(k, n-k) >;
    [A227418(n,k): k in [0..n], n in [0..15]]; // G. C. Greubel, Oct 09 2022
    
  • Mathematica
    A[n_, k_]:= If[k<0, 0, If[k==0, ChebyshevU[n-1, 2], 2*A[n, k-1] - A[n-1, k-1]]];
    T[n_, k_]:= A[k, n-k];
    Table[T[n, k], {n,0,15}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 09 2022 *)
  • SageMath
    def A(n,k):
        if (k<0): return 0
        elif (k==0): return chebyshev_U(n-1,2)
        else: return 2*A(n, k-1) - A(n-1, k-1)
    def A227418(n, k): return A(k, n-k)
    flatten([[A227418(n,k) for k in range(n+1)] for n in range(15)]) # G. C. Greubel, Oct 09 2022

Formula

If using the left column and top row to initialize, then: A(n,k) = 2*A(n, k-1) - A(n-1, k-1).
If using only the top row to initialize, then: A(n,k) = 4*A(n-1,k) - A(n-2,k).
If using the left column to initialize, then: A(n,k) = sqrt(3*A(n,k-1) + (-3)^(k-1)), for all n, k > 0.
Other internal relationships that apply are: A(2*n-1, 2*k) = A(n,k)^2 - A(n-1,k)^2;
A(n+1,k) * A(n,k+1) - A(n+1, k+1) * A(n,k) = (-3)^k, for all n, k > 0.
A(n, 0) = A001353(n).
A(n, 1) = A001075(n).
A(n, 2) = A005320(n).
A(n, 3) = A151961(n).
A(1, k) = A038754(k).
A(n, n) = 2*A090018(n), for n > 0 (main diagonal).
A(n, n+1) = A141041(n-1) (superdiagonal).
A(n+1, n) = abs(A099842(n)) (subdiagonal).
From G. C. Greubel, Oct 09 2022: (Start)
T(n, 0) = (1/2)*(1-(-1)^n)*3^((n-1)/2).
T(n, 1) = A038754(n-1).
T(n, 2) = A228879(n-2).
T(2*n-1, n-1) = A141041(n-1).
T(2*n, n) = 2*A090018(n-1), n > 0.
T(n, n-4) = 3*A005320(n-4).
T(n, n-3) = 3*A001075(n-3).
T(n, n-2) = 3*A001353(n-2).
T(n, n-1) = A001075(n-1).
T(n, n) = A001353(n).
Sum_{k=0..n-1} T(n, k) = A084156(n).
Sum_{k=0..n} T(n, k) = A084156(n) + A001353(n). (End)

Extensions

Offset corrected by G. C. Greubel, Oct 09 2022

A233450 Numbers n such that 3*T(n)+1 is a square, where T = A000217.

Original entry on oeis.org

0, 1, 6, 15, 64, 153, 638, 1519, 6320, 15041, 62566, 148895, 619344, 1473913, 6130878, 14590239, 60689440, 144428481, 600763526, 1429694575, 5946945824, 14152517273, 58868694718, 140095478159, 582740001360, 1386802264321, 5768531318886, 13727927165055
Offset: 1

Views

Author

Bruno Berselli, Dec 10 2013

Keywords

Comments

For n>1, partial sums of A080872 starting from A080872(1).

Examples

			153 is in the sequence because 3*153*154/2+1 = 188^2.
		

Crossrefs

Sequence A129444 gives n+1.
Cf. A000217, A080872, A129445 (square roots of 3*A000217(a(n))+1), A132596 (numbers m such that 3*A000217(m) is a square).
Cf. numbers m such that k*A000217(m)+1 is a square: A006451 for k=1; m=0 for k=2; this sequence for k=3; A001652 for k=4; A129556 for k=5; A001921 for k=6.

Programs

  • Mathematica
    LinearRecurrence[{1, 10, -10, -1, 1}, {0, 1, 6, 15, 64}, 30]

Formula

G.f.: x^2*(1 + 5*x - x^2 - x^3) / ((1 - x)*(1 - 10*x^2 + x^4)).
a(n) = a(n-1) +10*a(n-2) -10*a(n-3) -a(n-4) +a(n-5) for n>5, a(1)=0, a(2)=1, a(3)=6, a(4)=15, a(5)=64.
a(n) = -1/2 + ( (-3*(-1)^n + 2*sqrt(6))*(5 + 2*sqrt(6))^floor(n/2) - (3*(-1)^n + 2*sqrt(6))*(5 - 2*sqrt(6))^floor(n/2) )/12.
Showing 1-10 of 19 results. Next