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

A001110 Square triangular numbers: numbers that are both triangular and square.

Original entry on oeis.org

0, 1, 36, 1225, 41616, 1413721, 48024900, 1631432881, 55420693056, 1882672131025, 63955431761796, 2172602007770041, 73804512832419600, 2507180834294496361, 85170343853180456676, 2893284510173841030625, 98286503002057414584576, 3338847817559778254844961, 113422539294030403250144100
Offset: 0

Views

Author

Keywords

Comments

Satisfies a recurrence of S_r type for r=36: 0, 1, 36 and a(n-1)*a(n+1)=(a(n)-1)^2. First observed by Colin Dickson in alt.math.recreational, Mar 07 2004. - Rainer Rosenthal, Mar 14 2004
For every n, a(n) is the first of three triangular numbers in geometric progression. The third number in the progression is a(n+1). The middle triangular number is sqrt(a(n)*a(n+1)). Chen and Fang prove that four distinct triangular numbers are never in geometric progression. - T. D. Noe, Apr 30 2007
The sum of any two terms is never equal to a Fermat number. - Arkadiusz Wesolowski, Feb 14 2012
Conjecture: No a(2^k), where k is a nonnegative integer, can be expressed as a sum of a positive square number and a positive triangular number. - Ivan N. Ianakiev, Sep 19 2012
For n=2k+1, A010888(a(n))=1 and for n=2k, k > 0, A010888(a(n))=9. - Ivan N. Ianakiev, Oct 12 2013
For n > 0, these are the triangular numbers which are the sum of two consecutive triangular numbers, for instance 36 = 15 + 21 and 1225 = 595 + 630. - Michel Marcus, Feb 18 2014
The sequence is the case P1 = 36, P2 = 68, Q = 1 of the 3-parameter family of 4th order linear divisibility sequences found by Williams and Guy. - Peter Bala, Apr 03 2014
For n=2k, k > 0, a(n) is divisible by 12 and is therefore abundant. I conjecture that for n=2k+1 a(n) is deficient [true for k up to 43 incl.]. - Ivan N. Ianakiev, Sep 30 2014
The conjecture is true for all k > 0 because: For n=2k+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. So for n=2k+1, k > 0, a(n) is deficient. - Muniru A Asiru, Apr 13 2016
Numbers k for which A139275(k) is a perfect square. - Bruno Berselli, Jan 16 2018

Examples

			a(2) = ((17 + 12*sqrt(2))^2 + (17 - 12*sqrt(2))^2 - 2)/32 = (289 + 24*sqrt(2) + 288 + 289 - 24*sqrt(2) + 288 - 2)/32 = (578 + 576 - 2)/32 = 1152/32 = 36 and 6^2 = 36 = 8*9/2 => a(2) is both the 6th square and the 8th triangular number.
		

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 pp. 38, 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.
  • Martin Gardner, Time Travel and other Mathematical Bewilderments, Freeman & Co., 1988, pp. 16-17.
  • Miodrag S. Petković, Famous Puzzles of Great Mathematicians, Amer. Math. Soc. (AMS), 2009, p. 64.
  • J. H. Silverman, A Friendly Introduction to Number Theory, Prentice Hall, 2001, p. 196.
  • 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-259.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987. See p. 93.

Crossrefs

Other S_r type sequences are S_4=A000290, S_5=A004146, S_7=A054493, S_8=A001108, S_9=A049684, S_20=A049683, S_36=this sequence, S_49=A049682, S_144=A004191^2.
Cf. A001014; intersection of A000217 and A000290; A010052(a(n))*A010054(a(n)) = 1.
Cf. A005214, A054686, A232847 and also A233267 (reveals an interesting divisibility pattern for this sequence).
Cf. A240129 (triangular numbers that are squares of triangular numbers), A100047.
See A229131, A182334, A299921 for near-misses.

Programs

  • Haskell
    a001110 n = a001110_list !! n
    a001110_list = 0 : 1 : (map (+ 2) $
       zipWith (-) (map (* 34) (tail a001110_list)) a001110_list)
    -- Reinhard Zumkeller, Oct 12 2011
    
  • Magma
    [n le 2 select n-1 else Floor((6*Sqrt(Self(n-1)) - Sqrt(Self(n-2)))^2): n in [1..20]]; // Vincenzo Librandi, Jul 22 2015
  • Maple
    a:=17+12*sqrt(2); b:=17-12*sqrt(2); A001110:=n -> expand((a^n + b^n - 2)/32); seq(A001110(n), n=0..20); # Jaap Spies, Dec 12 2004
    A001110:=-(1+z)/((z-1)*(z**2-34*z+1)); # Simon Plouffe in his 1992 dissertation
  • Mathematica
    f[n_]:=n*(n+1)/2; lst={}; Do[If[IntegerQ[Sqrt[f[n]]],AppendTo[lst,f[n]]],{n,0,10!}]; lst (* Vladimir Joseph Stephan Orlovsky, Feb 12 2010 *)
    Table[(1/8) Round[N[Sinh[2 n ArcSinh[1]]^2, 100]], {n, 0, 20}] (* Artur Jasinski, Feb 10 2010 *)
    Transpose[NestList[Flatten[{Rest[#],34Last[#]-First[#]+2}]&, {0,1},20]][[1]]  (* Harvey P. Dale, Mar 25 2011 *)
    LinearRecurrence[{35, -35, 1}, {0, 1, 36}, 20] (* T. D. Noe, Mar 25 2011 *)
    LinearRecurrence[{6,-1},{0,1},20]^2 (* Harvey P. Dale, Oct 22 2012 *)
    (* Square = Triangular = Triangular = A001110 *)
    ChebyshevU[#-1,3]^2==Binomial[ChebyshevT[#/2,3]^2,2]==Binomial[(1+ChebyshevT[#,3])/2,2]=={1,36,1225,41616,1413721}[[#]]&@Range[5]
    True (* Bill Gosper, Jul 20 2015 *)
    L=0;r={};Do[AppendTo[r,L];L=1+17*L+6*Sqrt[L+8*L^2],{i,1,19}];r (* Kebbaj Mohamed Reda, Aug 02 2023 *)
  • PARI
    a=vector(100);a[1]=1;a[2]=36;for(n=3,#a,a[n]=34*a[n-1]-a[n-2]+2);a \\ Charles R Greathouse IV, Jul 25 2011
    
  • Scheme
    ;; With memoizing definec-macro from Antti Karttunen's IntSeq-library.
    (definec (A001110 n) (if (< n 2) n (+ 2 (- (* 34 (A001110 (- n 1))) (A001110 (- n 2))))))
    ;; Antti Karttunen, Dec 06 2013
    
  • Scheme
    ;; For testing whether n is in this sequence:
    (define (inA001110? n) (and (zero? (A068527 n)) (inA001109? (floor->exact (sqrt n)))))
    (define (inA001109? n) (= (* 8 n n) (floor->exact (* (sqrt 8) n (ceiling->exact (* (sqrt 8) n))))))
    ;; Antti Karttunen, Dec 06 2013
    

Formula

a(0) = 0, a(1) = 1; for n >= 2, a(n) = 34 * a(n-1) - a(n-2) + 2.
G.f.: x*(1 + x) / (( 1 - x )*( 1 - 34*x + x^2 )).
a(n-1) * a(n+1) = (a(n)-1)^2. - Colin Dickson, posting to alt.math.recreational, Mar 07 2004
If L is a square-triangular number, then the next one is 1 + 17*L + 6*sqrt(L + 8*L^2). - Lekraj Beedassy, Jun 27 2001
a(n) - a(n-1) = A046176(n). - Sophie Kuo (ejiqj_6(AT)yahoo.com.tw), May 27 2006
a(n) = A001109(n)^2 = A001108(n)*(A001108(n)+1)/2 = (A000129(n)*A001333(n))^2 = (A000129(n)*(A000129(n) + A000129(n-1)))^2. - Henry Bottomley, Apr 19 2000
a(n) = (((17+12*sqrt(2))^n) + ((17-12*sqrt(2))^n)-2)/32. - Bruce Corrigan (scentman(AT)myfamily.com), Oct 26 2002
Limit_{n->oo} a(n+1)/a(n) = 17 + 12*sqrt(2). See UWC problem link and solution. - Jaap Spies, Dec 12 2004
From Antonio Alberto Olivares, Nov 07 2003: (Start)
a(n) = 35*(a(n-1) - a(n-2)) + a(n-3);
a(n) = -1/16 + ((-24 + 17*sqrt(2))/2^(11/2))*(17 - 12*sqrt(2))^(n-1) + ((24 + 17*sqrt(2))/2^(11/2))*(17 + 12*sqrt(2))^(n-1). (End)
a(n+1) = (17*A029547(n) - A091761(n) - 1)/16. - R. J. Mathar, Nov 16 2007
a(n) = A001333^2 * A000129^2 = A000129(2*n)^2/4 = binomial(A001108,2). - Bill Gosper, Jul 28 2008
Closed form (as square = triangular): ( (sqrt(2)+1)^(2*n)/(4*sqrt(2)) - (1-sqrt(2))^(2*n)/(4*sqrt(2)) )^2 = (1/2) * ( ( (sqrt(2)+1)^n / 2 - (sqrt(2)-1)^n / 2 )^2 + 1 )*( (sqrt(2)+1)^n / 2 - (sqrt(2)-1)^n / 2 )^2. - Bill Gosper, Jul 25 2008
a(n) = (1/8)*(sinh(2*n*arcsinh(1)))^2. - Artur Jasinski, Feb 10 2010
a(n) = floor((17 + 12*sqrt(2))*a(n-1)) + 3 = floor(3*sqrt(2)/4 + (17 + 12*sqrt(2))*a(n-1) + 1). - Manuel Valdivia, Aug 15 2011
a(n) = (A011900(n) + A001652(n))^2; see the link about the generalized proof of square triangular numbers. - Kenneth J Ramsey, Oct 10 2011
a(2*n+1) = A002315(n)^2*(A002315(n)^2 + 1)/2. - Ivan N. Ianakiev, Oct 10 2012
a(2*n+1) = ((sqrt(t^2 + (t+1)^2))*(2*t+1))^2, where t = (A002315(n) - 1)/2. - Ivan N. Ianakiev, Nov 01 2012
a(2*n) = A001333(2*n)^2 * (A001333(2*n)^2 - 1)/2, and a(2*n+1) = A001333(2*n+1)^2 * (A001333(2*n+1)^2 + 1)/2. The latter is equivalent to the comment above from Ivan using A002315, which is a bisection of A001333. Using A001333 shows symmetry and helps show that a(n) are both "squares of triangular" and "triangular of squares". - Richard R. Forberg, Aug 30 2013
a(n) = (A001542(n)/2)^2.
From Peter Bala, Apr 03 2014: (Start)
a(n) = (T(n,17) - 1)/16, where T(n,x) denotes the Chebyshev polynomial of the first kind.
a(n) = U(n-1,3)^2, for n >= 1, where U(n,x) denotes the Chebyshev polynomial of the second kind.
a(n) = the bottom left entry of the 2 X 2 matrix T(n, M), where M is the 2 X 2 matrix [0, -17; 1, 18].
See the remarks in A100047 for the general connection between Chebyshev polynomials of the first kind and 4th-order linear divisibility sequences. (End)
a(n) = A096979(2*n-1) for n > 0. - Ivan N. Ianakiev, Jun 21 2014
a(n) = (6*sqrt(a(n-1)) - sqrt(a(n-2)))^2. - Arkadiusz Wesolowski, Apr 06 2015
From Daniel Poveda Parrilla, Jul 16 2016 and Sep 21 2016: (Start)
a(n) = A000290(A002965(2*n)*A002965(2*n + 1)) (after Hugh Darwen).
a(n) = A000217(2*(A000129(n))^2 - (A000129(n) mod 2)).
a(n) = A000129(n)^4 + Sum_{k=0..(A000129(n)^2 - (A000129(n) mod 2))} 2*k. This formula can be proved graphically by taking the corresponding triangle of a square triangular number and cutting both acute angles, one level at a time (sum of consecutive even numbers), resulting in a square of squares (4th powers).
a(n) = A002965(2*n)^4 + Sum_{k=A002965(2*n)^2..A002965(2*n)*A002965(2*n + 1) - 1} 2*k + 1. This formula takes an equivalent sum of consecutives, but odd numbers. (End)
E.g.f.: (exp((17-12*sqrt(2))*x) + exp((17+12*sqrt(2))*x) - 2*exp(x))/32. - Ilya Gutkovskiy, Jul 16 2016

A004254 a(n) = 5*a(n-1) - a(n-2) for n > 1, a(0) = 0, a(1) = 1.

Original entry on oeis.org

0, 1, 5, 24, 115, 551, 2640, 12649, 60605, 290376, 1391275, 6665999, 31938720, 153027601, 733199285, 3512968824, 16831644835, 80645255351, 386394631920, 1851327904249, 8870244889325, 42499896542376, 203629237822555, 975646292570399, 4674602225029440, 22397364832576801
Offset: 0

Views

Author

Keywords

Comments

Nonnegative values of y satisfying x^2 - 21*y^2 = 4; values of x are in A003501. - Wolfdieter Lang, Nov 29 2002
a(n) is equal to the permanent of the (n-1) X (n-1) Hessenberg matrix with 5's along the main diagonal, i's along the superdiagonal and the subdiagonal (i is the imaginary unit), and 0's everywhere else. - John M. Campbell, Jun 09 2011
For n >= 1, a(n) equals the number of 01-avoiding words of length n-1 on alphabet {0,1,2,3,4}. - Milan Janjic, Jan 25 2015
From Klaus Purath, Jul 26 2024: (Start)
For any three consecutive terms (x, y, z), y^2 - xz = 1 always applies.
a(n) = (t(i+2n) - t(i))/(t(i+n+1) - t(i+n-1)) where (t) is any recurrence t(k) = 4t(k-1) + 4t(k-2) - t(k-3) or t(k) = 5t(k-1) - t(k-2) without regard to initial values.
In particular, if the recurrence (t) of the form (4,4,-1) has the same three initial values as the current sequence, a(n) = t(n) applies.
a(n) = (t(k+1)*t(k+n) - t(k)*t(k+n+1))/(y^2 - xz) where (t) is any recurrence of the current family with signature (5,-1) and (x, y, z) are any three consecutive terms of (t), for integer k >= 0. (End)

Examples

			G.f. = x + 5*x^2 + 24*x^3 + 115*x^4 + 551*x^5 + 2640*x^6 + 12649*x^7 + ...
		

References

  • F. A. Haight, On a generalization of Pythagoras' theorem, pp. 73-77 of J. C. Butcher, editor, A Spectrum of Mathematics. Auckland University Press, 1971.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Partial sums of A004253.
Cf. A000027, A001906, A001353, A003501, A030221. a(n) = sqrt((A003501(n)^2 - 4)/21).
First differences of a(n) are in A004253, partial sums in A089817.
Cf. A004253.
INVERT transformation yields A001109. - R. J. Mathar, Sep 11 2008

Programs

  • Magma
    [ n eq 1 select 0 else n eq 2 select 1 else 5*Self(n-1)-Self(n-2): n in [1..30] ]; // Vincenzo Librandi, Aug 19 2011
  • Maple
    A004254:=1/(1-5*z+z**2); # Simon Plouffe in his 1992 dissertation
  • Mathematica
    a[n_]:=(MatrixPower[{{1,3},{1,4}},n].{{1},{1}})[[2,1]]; Table[a[n],{n,0,40}] (* Vladimir Joseph Stephan Orlovsky, Feb 19 2010 *)
    a[ n_] := ChebyshevU[2 n - 1, Sqrt[7]/2] / Sqrt[7]; (* Michael Somos, Jan 22 2017 *)
  • PARI
    {a(n) = subst(4*poltchebi(n+1) - 10*poltchebi(n), x, 5/2) / 21}; /* Michael Somos, Dec 04 2002 */
    
  • PARI
    {a(n) = imag((5 + quadgen(84))^n) / 2^(n-1)}; /* Michael Somos, Dec 04 2002 */
    
  • PARI
    {a(n) = polchebyshev(n - 1, 2, 5/2)}; /* Michael Somos, Jan 22 2017 */
    
  • PARI
    {a(n) = simplify( polchebyshev( 2*n - 1, 2, quadgen(28)/2) / quadgen(28))}; /* Michael Somos, Jan 22 2017 */
    
  • Sage
    [lucas_number1(n,5,1) for n in range(27)] # Zerinvary Lajos, Jun 25 2008
    

Formula

G.f.: x/(1-5*x+x^2).
a(n) = (((5+sqrt(21))/2)^n-((5-sqrt(21))/2)^n)/sqrt(21). - Barry E. Williams, Aug 29 2000
a(n) = S(2*n-1, sqrt(7))/sqrt(7) = S(n-1, 5); S(n, x)=U(n, x/2), Chebyshev polynomials of 2nd kind, A049310.
A003501(n) = sqrt(21*a(n)^2 + 4).
a(n) = Sum_{k=0..n-1} binomial(n+k, 2*k+1)*2^k. - Paul Barry, Nov 30 2004
[A004253(n), a(n)] = [1,3; 1,4]^n * [1,0]. - Gary W. Adamson, Mar 19 2008
a(n+1) = Sum_{k=0..n} Gegenbauer_C(n-k,k+1,2). - Paul Barry, Apr 21 2009
a(n+1) = Sum_{k=0..n} A101950(n,k)*4^k. - Philippe Deléham, Feb 10 2012
From Peter Bala, Dec 23 2012: (Start)
Product {n >= 1} (1 + 1/a(n)) = (1/3)*(3 + sqrt(21)).
Product {n >= 2} (1 - 1/a(n)) = (1/10)*(3 + sqrt(21)). (End)
From Michael Somos, Jan 22 2017: (Start)
A054493(2*n - 1) = 7 * a(n)^2 for all n in Z.
a(n) = -a(-n) for all n in Z.
0 = -1 + a(n)*(+a(n) - 5*a(n+1)) + a(n+1)*(+a(n+1)) for all n in Z. (End)
Limit_{n->oo} a(n+1)/a(n) = (5 + sqrt(21))/2 = A107905. - Wolfdieter Lang, Nov 15 2023
From Klaus Purath, Jul 26 2024: (Start)
a(n) = 4(a(n-1) + a(n-2)) - a(n-3).
a(n) = 6(a(n-1) - a(n-2)) + a(n-3).
In general, for all sequences of the form U(n) = P*U(n-1) - U(n-2) the following applies:
U(n) = (P-1)*U(n-1) + (P-1)*U(n-2) - U(n-3).
U(n) = (P+1)*U(n-1) - (P+1)*U(n-2) + U(n-3). (End)
a(n) = (5*a(n-1)+sqrt(21*a(n-1)^2+4))/2 for n>0. - Alexandru Petrescu, Apr 15 2025
From Peter Bala, May 22 2025: (Start)
Product_{n >= 1} ((a(2*n) + 1)/(a(2*n) - 1))^2 = 7/3.
Product_{n >= 1} ((a(2*n+1) + 1)/(a(2*n+1) - 1))^2 = 25/21.
The o.g.f. A(x) satisfies A(x) + A(-x) + 10*A(x)*A(-x) = 0. The o.g.f. for A097778 equals -1/x * A(sqrt(x))*A(-sqrt(x)). (End)
E.g.f.: 2*exp(5*x/2)*sinh(sqrt(21)*x/2)/sqrt(21). - Stefano Spezia, Jul 02 2025

A100047 A Chebyshev transform of the Fibonacci numbers.

Original entry on oeis.org

0, 1, 1, -1, -1, 0, -1, -1, 1, 1, 0, 1, 1, -1, -1, 0, -1, -1, 1, 1, 0, 1, 1, -1, -1, 0, -1, -1, 1, 1, 0, 1, 1, -1, -1, 0, -1, -1, 1, 1, 0, 1, 1, -1, -1, 0, -1, -1, 1, 1, 0, 1, 1, -1, -1, 0, -1, -1, 1, 1, 0, 1, 1, -1, -1, 0, -1, -1, 1, 1, 0, 1, 1, -1, -1, 0, -1, -1, 1, 1, 0, 1, 1, -1, -1, 0, -1, -1, 1, 1
Offset: 0

Views

Author

Paul Barry, Oct 31 2004

Keywords

Comments

Multiplicative with a(p^e) = (-1)^(e+1) if p = 2, 0 if p = 5, 1 if p == 1 or 9 (mod 10), (-1)^e if p == 3 or 7 (mod 10). - David W. Wilson, Jun 10 2005
This sequence is a divisibility sequence, i.e., a(n) divides a(m) whenever n divides m. Case P1 = 1, P2 = -1, Q = 1 of the 3 parameter family of 4th-order linear divisibility sequences found by Williams and Guy. - Peter Bala, Mar 24 2014
From Peter Bala, Mar 24 2014: (Start)
This is the particular case P1 = 1, P2 = -1, Q = 1 of the following results:
Let P1, P2 and Q be integers. Let alpha and beta denote the roots of the quadratic equation x^2 - 1/2*P1*x + 1/4*P2 = 0. Let T(n,x;Q) denote the bivariate Chebyshev polynomial of the first kind defined by T(n,x;Q) = 1/2*( (x + sqrt(x^2 - Q))^n + (x - sqrt(x^2 - Q))^n ) (when Q = 1, T(n,x;Q) reduces to the ordinary Chebyshev polynomial of the first kind T(n,x)). Then we have
1) The sequence A(n) := ( T(n,alpha;Q) - T(n,beta;Q) )/(alpha - beta) is a linear divisibility sequence of the fourth order.
2) A(n) belongs to the 3-parameter family of fourth-order divisibility sequences found by Williams and Guy.
3) The o.g.f. of the sequence A(n) is the rational function x*(1 - Q*x^2)/(1 - P1*x + (P2 + 2*Q)*x^2 - P1*Q*x^3 + Q^2*x^4).
4) The o.g.f. is the Chebyshev transform of the rational function x/(1 - P1*x + P2*x^2), where the Chebyshev transform takes the function A(x) to the function (1 - Q*x^2)/(1 + Q*x^2)*A(x/(1 + Q*x^2)).
5) Let q = sqrt(Q) and set a = sqrt( q + (P2)/(4*q) + (P1)/2 ) and b = sqrt( q + (P2)/(4*q) - (P1)/2 ). Then the o.g.f. of the sequence A(n) is the Hadamard product of the rational functions x/(1 - (a + b)*x + q*x^2) and x/(1 - (a - b)*x + q*x^2). Thus A(n) is the product of two (usually, non-integer) Lucas-type sequences.
6) A(n) = the bottom left entry of the 2 X 2 matrix 2*T(n,1/2*M;Q), where M is the 2 X 2 matrix [0, -P2; 1, P1].
For examples of the above see A006238, A054493, A078070, A092184, A098306, A100048, A108196, A138573, A152090 and A218134. (End)

Examples

			A Chebyshev transform of the Fibonacci numbers A000045: if A(x) is the g.f. of a sequence, map it to ((1-x^2)/(1+x^2))A(x/(1+x^2)).
The denominator is the 10th cyclotomic polynomial.
G.f. = x + x^2 - x^3 - x^4 - x^6 - x^7 + x^8 + x^9 + x^11 + x^12 - x^13 + ...
		

Crossrefs

Programs

  • Maple
    a := n -> (-1)^iquo(n, 5)*signum(mods(n, 5)):
    seq(a(n), n=0..89); # after Michael Somos, Peter Luschny, Dec 30 2018
  • Mathematica
    a[ n_] := {1, 1, -1, -1, 0, -1, -1, 1, 1, 0}[[Mod[ n, 10, 1]]]; (* Michael Somos, May 24 2015 *)
    a[ n_] := (-1)^Quotient[ n, 5] Sign[ Mod[ n, 5, -2]]; (* Michael Somos, May 24 2015 *)
    a[ n_] := (-1)^Quotient[n, 5] {1, 1, -1, -1, 0}[[Mod[ n, 5, 1]]]; (* Michael Somos, May 24 2015 *)
    LinearRecurrence[{1, -1, 1, -1}, {0, 1, 1, -1}, 90] (* Jean-François Alcover, Jun 11 2019 *)
  • PARI
    {a(n) = (-1)^(n\5) * [0, 1, 1, -1, -1][n%5+1]}; /* Michael Somos, May 24 2015 */
    
  • PARI
    {a(n) = (-1)^(n\5) * sign( centerlift( Mod(n, 5)))}; /* Michael Somos, May 24 2015 */

Formula

G.f.: x*(1 - x^2)/(1 - x + x^2 - x^3 + x^4).
a(n) = a(n-1) - a(n-2) + a(n-3) - a(n-4).
a(n) = n*Sum_{k=0..floor(n/2)} (-1)^k *binomial(n-k, k)*A000045(n-2*k)/(n -k).
From Peter Bala, Mar 24 2014: (Start)
a(n) = (T(n,alpha) - T(n,beta))/(alpha - beta), where alpha = (1 + sqrt(5))/4 and beta = (1 - sqrt(5))/4 and T(n,x) denotes the Chebyshev polynomial of the first kind.
a(n) = bottom left entry of the matrix T(n, M), where M is the 2 X 2 matrix [0, 1/4; 1, 1/2].
The o.g.f. is the Hadamard product of the rational functions x/(1 - 1/2*(sqrt(5) + 1)*x + x^2) and x/(1 - 1/2*(sqrt(5) - 1)*x + x^2). (End)
Euler transform of length 10 sequence [ 1, -2, 0, 0, -1, 0, 0, 0, 0, 1]. - Michael Somos, May 24 2015
a(n) = a(-n) = -a(n + 5) for all n in Z. - Michael Somos, May 24 2015
|A011558(n)| = |A080891(n)| = |a(n)| = A244895(n). - Michael Somos, May 24 2015

A092184 Sequence S_6 of the S_r family.

Original entry on oeis.org

0, 1, 6, 25, 96, 361, 1350, 5041, 18816, 70225, 262086, 978121, 3650400, 13623481, 50843526, 189750625, 708158976, 2642885281, 9863382150, 36810643321, 137379191136, 512706121225, 1913445293766, 7141075053841, 26650854921600, 99462344632561, 371198523608646
Offset: 0

Views

Author

Rainer Rosenthal, Apr 03 2004

Keywords

Comments

The r-family of sequences is S_r(n) = 2*(T(n,(r-2)/2) - 1)/(r-4) provided r is not equal to 4 and S_4(n) = n^2 = A000290(n). Here T(n,x) are Chebyshev's polynomials of the first kind. See their coefficient triangle A053120. See also the R. Stephan link for the explicit formula for s_k(n) for k not equal to 4 (Stephan's s_k(n) is identical with S_r(n)).
An integer n is in this sequence iff mutually externally tangent circles with radii n, n+1, n+2 have Soddy circles (i.e., circles tangent to all three) of rational radius. - James R. Buddenhagen, Nov 16 2005
This sequence is a divisibility sequence, i.e., a(n) divides a(m) whenever n divides m. It is the case P1 = 6, P2 = 8, Q = 1 of the 3-parameter family of 4th-order linear divisibility sequences found by Williams and Guy. - Peter Bala, Mar 25 2014
a(n) is the block size of the (n-1)-th design in a sequence of multi-set designs with 2 blocks, see A335649. - John P. McSorley, Jun 22 2020

Examples

			a(3)=25 because a(1)=1 and a(2)=6 and a(1)*a(3) = 1*25 = (6-1)^2 = (a(2)-1)^2.
		

Crossrefs

See A001110=S_36 for further references to S_r sequences.
Other members of this r-family are: A007877 (r=2), |A078070| (r=3), A004146 (r=5), A054493 (r=7). A098306, A100047. A001353, A001834. A001350, A052530.

Programs

  • Magma
    [Floor(1/2*(-2+(2+Sqrt(3))^n+(2-Sqrt(3))^n)): n in [0..30]]; // Vincenzo Librandi, Oct 14 2015
  • Maple
    A092184 := proc(n)
        option remember;
        if n <= 1 then
            n;
        else
            4*procname(n-1)-procname(n-2)+2 ;
        end if ;
    end proc:
    seq(A092184(n),n=0..10) ;# Zerinvary Lajos, Mar 09 2008
  • Mathematica
    Table[Simplify[ -((2 + Sqrt[3])^n - 1)*((2 - Sqrt[3])^n - 1)]/2, {n, 0, 26}] (* Stefan Steinerberger, May 15 2007 *)
    LinearRecurrence[{5,-5,1},{0,1,6},27] (* Ray Chandler, Jan 27 2014 *)
    CoefficientList[Series[x (1 + x)/(1 - 5 x + 5 x^2 - x^3), {x, 0, 40}], x] (* Vincenzo Librandi, Oct 14 2015 *)
  • PARI
    Vec(x*(1+x)/(1 - 5*x + 5*x^2 - x^3) + O(x^50)) \\ Michel Marcus, Oct 14 2015
    

Formula

S_r type sequences are defined by a(0)=0, a(1)=1, a(2)=r and a(n-1)*a(n+1) = (a(n)-1)^2. This sequence emanates from r=6.
a(n) = 1/2*(-2 + (2+sqrt(3))^n + (2-sqrt(3))^n). - Ralf Stephan, Apr 14 2004
G.f.: x*(1+x)/(1 - 5*x + 5*x^2 - x^3) = x*(1+x)/((1-x)*(1 - 4*x + x^2)). [from the Ralf Stephan link]
a(n) = T(n, 2)-1 = A001075(n)-1, with Chebyshev's polynomials T(n, 2) of the first kind.
a(n) = b(n) + b(n-1), n >= 1, with b(n):=A061278(n) the partial sums of S(n, 4) = U(n, 2) = A001353(n+1) Chebyshev's polynomials of the second kind.
An integer k is in this sequence iff k is nonnegative and (k^2 + 2*k)/3 is a square. - James R. Buddenhagen, Nov 16 2005
a(0)=0, a(1)=1, a(n+1) = 3 + floor(a(n)*(2+sqrt(3))). - Anton Vrba (antonvrba(AT)yahoo.com), Jan 16 2007
a(n) = 4*a(n-1) - a(n-2) + 2. - Zerinvary Lajos, Mar 09 2008
From Peter Bala, Mar 25 2014: (Start)
a(2*n) = 6*A001353(n)^2; a(2*n+1) = A001834(n)^2.
a(n) = u(n)^2, where {u(n)} is the Lucas sequence in the quadratic integer ring Z[sqrt(6)] defined by the recurrence u(0) = 0, u(1) = 1, u(n) = sqrt(6)*u(n-1) - u(n-2) for n >= 2.
Equivalently, a(n) = U(n-1,sqrt(6)/2)^2, where U(n,x) denotes the Chebyshev polynomial of the second kind.
a(n) = (1/2)*( ((sqrt(6) + sqrt(2))/2)^n - ((sqrt(6) - sqrt(2))/2)^n )^2.
a(n) = bottom left entry of the 2 X 2 matrix T(n, M), where M is the 2 X 2 matrix [0, -2; 1, 3] and T(n,x) denotes the Chebyshev polynomial of the first kind. Cf. A098306.
See the remarks in A100047 for the general connection between Chebyshev polynomials of the first kind and 4th-order linear divisibility sequences. (End)
exp( Sum_{n >= 1} 2*a(n)*x^n/n ) = 1 + Sum_{n >= 1} A052530(n)*x^n. Cf. A001350. - Peter Bala, Mar 19 2015
E.g.f.: exp(2*x)*cosh(sqrt(3)*x) - cosh(x) - sinh(x). - Stefano Spezia, Oct 13 2019

Extensions

Extension and Chebyshev comments from Wolfdieter Lang, Sep 10 2004

A030221 Chebyshev even-indexed U-polynomials evaluated at sqrt(7)/2.

Original entry on oeis.org

1, 6, 29, 139, 666, 3191, 15289, 73254, 350981, 1681651, 8057274, 38604719, 184966321, 886226886, 4246168109, 20344613659, 97476900186, 467039887271, 2237722536169, 10721572793574, 51370141431701, 246129134364931, 1179275530392954, 5650248517599839
Offset: 0

Views

Author

Keywords

Comments

a(n) = L(n,-5)*(-1)^n, where L is defined as in A108299; see also A004253 for L(n,+5). - Reinhard Zumkeller, Jun 01 2005
General recurrence is a(n) = (a(1)-1)*a(n-1) - a(n-2), a(1) >= 4; lim_{n->oo} a(n) = x*(k*x+1)^n, k =(a(1)-3), x=(1+sqrt((a(1)+1)/(a(1)-3)))/2. Examples in OEIS: a(1)=4 gives A002878. a(1)=5 gives A001834. a(1)=6 gives the present sequence. a(1)=7 gives A002315. a(1)=8 gives A033890. a(1)=9 gives A057080. a(1)=10 gives A057081. - Ctibor O. Zizka, Sep 02 2008
The primes in this sequence are 29, 139, 3191, 15289, 350981, 1681651, ... - Ctibor O. Zizka, Sep 02 2008
Inverse binomial transform of A030240. - Philippe Deléham, Nov 19 2009
For positive n, a(n) equals the permanent of the (2n)X(2n) matrix with sqrt(7)'s along the main diagonal, and i's along the superdiagonal and the subdiagonal (i is the imaginary unit). - John M. Campbell, Jul 08 2011
The aerated sequence (b(n))n>=1 = [1, 0, 6, 0, 29, 0, 139, 0, ...] is a fourth-order linear divisibility sequence; that is, if n | m then b(n) | b(m). It is the case P1 = 0, P2 = -3, Q = -1 of the 3-parameter family of divisibility sequences found by Williams and Guy. See A100047 for a connection with Chebyshev polynomials. - Peter Bala, Mar 22 2015
From Wolfdieter Lang, Oct 26 2020: (Start)
((-1)^n)*a(n) = X(n) = ((-1)^n)*(S(n, 5) + S(n-1, 5)) and Y(n) = X(n-1) gives all integer solutions (modulo sign flip between X and Y) of X^2 + Y^2 + 5*X*Y = +7, for n = -oo..+oo, with Chebyshev S polynomials (see A049310), with S(-1, x) = 0, and S(-n, x) = - S(n-2, x), for n >= 2.
This binary indefinite quadratic form of discriminant 21, representing 7, has only this family of proper solutions (modulo sign flip), and no improper ones.
This comment is inspired by a paper by Robert K. Moniot (private communication). See his Oct 04 2020 comment in A027941 related to the case of x^2 + y^2 - 3*x*y = -1 (special Markov solutions). (End)

Examples

			G.f. = 1 + 6*x + 29*x^2 + 139*x^3 + 666*x^4 + 3191*x^5 + 15289*x^6 + ...
		

Crossrefs

Cf. A004253, A004254, A100047, A054493 (partial sums), A049310, A003501 (first differences), A299109 (subsequence of primes).

Programs

  • Magma
    I:=[1,6]; [n le 2 select I[n] else 5*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Mar 22 2015
    
  • Maple
    A030221 := proc(n)
        option remember;
        if n <= 1 then
            op(n+1,[1,6]);
        else
            5*procname(n-1)-procname(n-2) ;
        end if;
    end proc: # R. J. Mathar, Apr 30 2017
  • Mathematica
    t[n_, k_?EvenQ] := I^k*Binomial[n-k/2, k/2]; t[n_, k_?OddQ] := -I^(k-1)*Binomial[n+(1-k)/2-1, (k-1)/2]; l[n_, x_] := Sum[t[n, k]*x^(n-k), {k, 0, n}]; a[n_] := (-1)^n*l[n, -5]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jul 05 2013, after Reinhard Zumkeller *)
    a[ n_] := ChebyshevU[2 n, Sqrt[7]/2]; (* Michael Somos, Jan 22 2017 *)
  • PARI
    {a(n) = simplify(polchebyshev(2*n, 2, quadgen(28)/2))}; /* Michael Somos, Jan 22 2017 */
  • Sage
    [(lucas_number2(n,5,1)-lucas_number2(n-1,5,1))/3 for n in range(1,22)] # Zerinvary Lajos, Nov 10 2009
    

Formula

a(n) = 5*a(n-1) - a(n-2), a(-1)=-1, a(0)=1.
a(n) = U(2*n, sqrt(7)/2).
G.f.: (1+x)/(x^2-5*x+1).
a(n) = A004254(n) + A004254(n+1).
a(n) ~ (1/2 + (1/6)*sqrt(21))*((1/2)*(5 + sqrt(21)))^n. - Joe Keane (jgk(AT)jgk.org), May 16 2002
Let q(n, x) = Sum_{i=0..n} x^(n-i)*binomial(2*n-i, i); then a(n) = (-1)^n*q(n, -7). - Benoit Cloitre, Nov 10 2002
A054493(2*n) = a(n)^2 for all n in Z. - Michael Somos, Jan 22 2017
a(n) = -a(-1-n) for all n in Z. - Michael Somos, Jan 22 2017
0 = -7 + a(n)*(+a(n) - 5*a(n+1)) + a(n+1)*(+a(n+1)) for all n in Z. - Michael Somos, Jan 22 2017
a(n) = S(n, 5) + S(n-1, 5) = S(2*n, sqrt(7)) (see above in terms of U), for n >= 0 with S(-1, 5) = 0, where the coefficients of the Chebyshev S polynomials are given in A049310. - Wolfdieter Lang, Oct 26 2020
From Peter Bala, May 16 2025: (Start)
Sum_{n >= 1} (-1)^(n+1)/(a(n) - 1/a(n)) = 1/7 (telescoping series: 7/(a(n) - 1/a(n)) = 1/A004254(n+1) + 1/A004254(n)).
Product_{n >= 1} (a(n) + 1)/(a(n) - 1) = sqrt(7/3) (telescoping product: Product_{k = 1..n} ((a(k) + 1)/(a(k) - 1))^2 = 7/3 * (1 - 8/A231087(n+1))). (End)

A231087 Number of perfect matchings in graph C_3 x C_{2n}.

Original entry on oeis.org

50, 224, 1058, 5054, 24200, 115934, 555458, 2661344, 12751250, 61094894, 292723208, 1402521134, 6719882450, 32196891104, 154264573058, 739125974174, 3541365297800, 16967700514814, 81297137276258, 389517985866464, 1866292792056050, 8941945974413774, 42843437080012808, 205275239425650254
Offset: 2

Views

Author

Sergey Perepechko, Nov 03 2013

Keywords

Crossrefs

Programs

  • PARI
    Vec(2*x^2*(25-38*x+7*x^2)/((1-x)*(1-5*x+x^2))+O(x^66)) \\ Joerg Arndt, Nov 03 2013
    
  • PARI
    default(realprecision, 120);
    a(n) = round(sqrt(prod(j=1, n, prod(k=1, 3, 4*sin((2*j-1)*Pi/(2*n))^2+4*sin((2*k-1)*Pi/3)^2)))); \\ Seiichi Manyama, Feb 14 2021

Formula

a(n) = 2*(((sqrt(7)+sqrt(3))/2)^n + ((sqrt(7)-sqrt(3))/2)^n)^2.
G.f.: 2*x^2*(25-38*x+7*x^2)/((1-x)*(1-5*x+x^2)).
From Seiichi Manyama, Feb 14 2021: (Start)
a(n) = sqrt( Product_{j=1..n} Product_{k=1..3} (4*sin((2*j-1)*Pi/(2*n))^2 + 4*sin((2*k-1)*Pi/3)^2) ).
a(n) = 5*a(n-1) - a(n-2) - 12. (End)
a(n) = 6*A054493(n-1) + 8. - Peter Bala, May 17 2025

A212798 Row 3 of array in A212796.

Original entry on oeis.org

3, 294, 11664, 367500, 10609215, 292626432, 7839321861, 205683135000, 5312031978672, 135495143785470, 3421536337406913, 85686871818240000, 2130987634616000199, 52682956706683197258, 1295799745309605101520, 31730077997731715070000
Offset: 1

Views

Author

N. J. A. Sloane, May 27 2012

Keywords

Comments

A linear divisibility sequence of order 10. - Peter Bala, May 04 2014

Crossrefs

Programs

  • Maple
    seq(simplify(n/3*(-2 + ( (5 + sqrt(21))/2 )^n + ( (5 - sqrt(21))/2 )^n)^2), n = 1..14); # Peter Bala, May 04 2014
  • Python
    # Using graphillion
    from graphillion import GraphSet
    def make_CnXCk(n, k):
        grids = []
        for i in range(1, k + 1):
            for j in range(1, n):
                grids.append((i + (j - 1) * k, i + j * k))
            grids.append((i + (n - 1) * k, i))
        for i in range(1, k * n, k):
            for j in range(1, k):
                grids.append((i + j - 1, i + j))
            grids.append((i + k - 1, i))
        return grids
    def A212798(n):
        if n == 1: return 3
        if n == 2: return 294
        universe = make_CnXCk(n, 3)
        GraphSet.set_universe(universe)
        spanning_trees = GraphSet.trees(is_spanning=True)
        return spanning_trees.len()
    print([A212798(n) for n in range(1, 30)])  # Seiichi Manyama, Nov 22 2020

Formula

From Peter Bala, May 04 2014: (Start)
a(n) = n/3*(-2 + ( (5 + sqrt(21))/2 )^n + ( (5 - sqrt(21))/2 )^n)^2 = 3*n*A054493(n-1)^2.
O.g.f.: 3*(x^8 + 40*x^7 - 665*x^6 - 866*x^5 + 5626*x^4 - 866*x^3 - 665*x^2 + 40*x + 1)/( (x - 1)^2*(x^2 - 5*x + 1)^2*(x^2 - 23*x + 1)^2 ). (End)

Extensions

More terms from Peter Bala, May 04 2014

A221365 The simple continued fraction expansion of F(x) := Product_{n >= 0} (1 - x^(4*n+3))/(1 - x^(4*n+1)) when x = 1/2*(5 - sqrt(21)).

Original entry on oeis.org

1, 3, 1, 21, 1, 108, 1, 525, 1, 2523, 1, 12096, 1, 57963, 1, 277725, 1, 1330668, 1, 6375621, 1, 30547443, 1, 146361600, 1, 701260563, 1, 3359941221, 1, 16098445548, 1, 77132286525, 1, 369562987083, 1, 1770682648896, 1
Offset: 0

Views

Author

Peter Bala, Jan 15 2013

Keywords

Comments

The function F(x) := Product_{n >= 0} (1 - x^(4*n+3))/(1 - x^(4*n+1)) is analytic for |x| < 1. When x is a quadratic irrational of the form x = 1/2*(N - sqrt(N^2 - 4)), N an integer greater than 2, the real number F(x) has a predictable simple continued fraction expansion. The first examples of these expansions, for N = 2, 4, 6 and 8, are due to Hanna. See A174500 through A175503. The present sequence is the case N = 5. See also A221364 (N = 3), A221366 (N = 7) and A221367 (N = 9).
If we denote the present sequence by [1, c(1), 1, c(2), 1, c(3), ...] then for k = 1, 2, ..., the simple continued fraction expansion of F((1/2*(5 - sqrt(21)))^k) is given by the sequence [1; c(k), 1, c(2*k), 1, c(3*k), 1, ...].

Examples

			F(1/2*(5 - sqrt(21))) = 1.25274 83510 08359 27965 ... = 1 + 1/(3 + 1/(1 + 1/(21 + 1/(1 + 1/(108 + 1/(1 + 1/(525 + ...))))))).
F((1/2*(5 - sqrt(21)))^2) = 1.04545 84663 16495 30047 ... = 1 + 1/(21 + 1/(1 + 1/(525 + 1/(1 + 1/(12096 + 1/(1 + 1/(277725 + ...))))))).
F((1/2*(5 - sqrt(21)))^3) = 1.00917 43188 83793 73068 ... = 1 + 1/(108 + 1/(1 + 1/(12096 + 1/(1 + 1/(1330668 + 1/(1 + 1/(146361600 + ...))))))).
		

Crossrefs

Cf. A004254, A030221, A054493, A174500 (N = 4), A221364 (N = 3), A221366 (N = 7), A221369 (N = 9).

Programs

  • Mathematica
    LinearRecurrence[{0,6,0,-6,0,1},{1,3,1,21,1,108},40] (* Harvey P. Dale, Jun 06 2023 *)

Formula

a(2*n-1) = (1/2*(5 + sqrt(21)))^n + (1/2*(5 - sqrt(21)))^n - 2 = 3*A054493(n); a(2*n) = 1.
a(4*n+1) = 3*(A030221(n))^2; a(4*n-1) = 21*(A004254(n))^2.
a(n) = 6*a(n-2)-6*a(n-4)+a(n-6). G.f.: -(x^4+3*x^3-5*x^2+3*x+1) / ((x-1)*(x+1)*(x^4-5*x^2+1)). - Colin Barker, Jan 20 2013

A140824 Expansion of (x-x^3)/(1-3*x+2*x^2-3*x^3+x^4).

Original entry on oeis.org

0, 1, 3, 6, 15, 41, 108, 281, 735, 1926, 5043, 13201, 34560, 90481, 236883, 620166, 1623615, 4250681, 11128428, 29134601, 76275375, 199691526, 522799203, 1368706081, 3583319040, 9381251041, 24560434083, 64300051206, 168339719535, 440719107401, 1153817602668
Offset: 0

Views

Author

N. J. A. Sloane, Sep 07 2009, based on email from R. K. Guy, Mar 09 2009

Keywords

Comments

Case P1 = 3, P2 = 0, Q = 1 of the 3 parameter family of 4th-order linear divisibility sequences found by Williams and Guy. - Peter Bala, Mar 25 2014

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{3, -2, 3, -1}, {0, 1, 3, 6}, 50] (* G. C. Greubel, Aug 08 2017 *)
  • PARI
    x='x+O('x^50); concat([0], Vec((x-x^3)/(1-3*x+2*x^2-3*x^3+x^4))) \\ G. C. Greubel, Aug 08 2017

Formula

a(0) = 0, a(1) = 1, a(2) = 3, a(3) = 6, a(n) - 3 a(n + 1) + 2 a(n + 2) - 3 a(n + 3) + a(n + 4) = 0.
From Peter Bala, Mar 25 2014: (Start)
a(n) = 2/3*( T(n,3/2) - T(n,0) ), where T(n,x) is a Chebyshev polynomial of the first kind.
a(n) = 1/3 * (A005248(n) - (i^n + (-i)^n)) = 1/3 * (Fibonacci(2*n-1) + Fibonacci(2*n+1) - (i^n + (-i)^n)).
a(n) = bottom left entry of the 2 X 2 matrix 2*T(n, 1/2*M), where M is the 2 X 2 matrix [0, 0; 1, 3].
The o.g.f. is the Hadamard product of the rational functions x/(1 - 1/sqrt(2)*(sqrt(5) + i)*x + x^2) and x/(1 - 1/sqrt(2)*(sqrt(5) - i)*x + x^2). See the remarks in A100047 for the general connection between Chebyshev polynomials and 4th-order linear divisibility sequences. (End)
a(n) = A099483(n) - A099483(n-2). - R. J. Mathar, Feb 10 2016
Showing 1-9 of 9 results.