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.

A046090 Consider all Pythagorean triples (X,X+1,Z) ordered by increasing Z; sequence gives X+1 values.

Original entry on oeis.org

1, 4, 21, 120, 697, 4060, 23661, 137904, 803761, 4684660, 27304197, 159140520, 927538921, 5406093004, 31509019101, 183648021600, 1070379110497, 6238626641380, 36361380737781, 211929657785304, 1235216565974041, 7199369738058940, 41961001862379597, 244566641436218640
Offset: 0

Views

Author

Keywords

Comments

Solution to a*(a-1) = 2b*(b-1) in natural numbers: a = a(n), b = b(n) = A011900(n).
n such that n^2 = (1/2)*(n+floor(sqrt(2)*n*floor(sqrt(2)*n))). - Benoit Cloitre, Apr 15 2003
Place a(n) balls in an urn, of which b(n) = A011900(n) are red; draw 2 balls without replacement; 2*Probability(2 red balls) = Probability(2 balls); this is equivalent to the Pell equation A(n)^2-2*B(n)^2 = -1 with a(n) = (A(n)+1)/2; b(n) = (B(n)+1)/2; and the fundamental solution (7;5) and the solution (3;2) for the unit form. - Paul Weisenhorn, Aug 03 2010
Find base x in which repdigit yy has a square that is repdigit zzzz, corresponding to Diophantine equation zzzz_x = (yy_x)^2; then, solution z = a(n) with x = A002315(n) and y = A001653(n+1) for n >= 1 (see Maurice Protat reference). - Bernard Schott, Dec 21 2022

Examples

			For n=4: a(4)=697; b(4)=493; 2*binomial(493,2)=485112=binomial(697,2). - _Paul Weisenhorn_, Aug 03 2010
		

References

  • A. H. Beiler, Recreations in the Theory of Numbers. New York: Dover, pp. 122-125, 1964.
  • Maurice Protat, Des Olympiades à l'Agrégation, De zzzz_x = (yy_x)^2 à Pell-Fermat, Problème 23, pp. 52-54, Ellipses, Paris, 1997.

Crossrefs

Programs

  • Haskell
    a046090 n = a046090_list !! n
    a046090_list = 1 : 4 : map (subtract 2)
       (zipWith (-) (map (* 6) (tail a046090_list)) a046090_list)
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!((1-3*x)/((1-6*x+x^2)*(1-x)))); // G. C. Greubel, Jul 15 2018
  • Maple
    Digits:=100: seq(round((1+(7+5*sqrt(2))*(3+2*sqrt(2))^(n-1))/2)/2, n=0..20); # Paul Weisenhorn, Aug 03 2010
  • Mathematica
    Join[{1},#+1&/@With[{c=3+2Sqrt[2]},NestList[Floor[c #]+3&,3,20]]] (* Harvey P. Dale, Aug 19 2011 *)
    LinearRecurrence[{7,-7,1},{1,4,21},25] (* Harvey P. Dale, Apr 13 2012 *)
    a[n_] := (2-ChebyshevT[n, 3]+ChebyshevT[n+1, 3])/4; Array[a, 21, 0] (* Jean-François Alcover, Jul 10 2016, adapted from PARI *)
  • PARI
    a(n)=(2-subst(poltchebi(abs(n))-poltchebi(abs(n+1)),x,3))/4
    
  • PARI
    x='x+O('x^30); Vec((1-3*x)/((1-6*x+x^2)*(1-x))) \\ G. C. Greubel, Jul 15 2018
    

Formula

a(n) = (-1+sqrt(1+8*b(n)*(b(n)+1)))/2 with b(n) = A011900(n). [corrected by Michel Marcus, Dec 23 2022]
a(n) = 6*a(n-1) - a(n-2) - 2, n >= 2, a(0) = 1, a(1) = 4.
a(n) = (A(n+1) - 3*A(n) + 2)/4 with A(n) = A001653(n).
A001652(n) = -a(-1-n).
From Barry E. Williams, May 03 2000: (Start)
G.f.: (1-3*x)/((1-6*x+x^2)*(1-x)).
a(n) = partial sums of A001541(n). (End)
From Charlie Marion, Jul 01 2003: (Start)
A001652(n)*A001652(n+1) + a(n)*a(n+1) = A001542(n+1)^2 = A084703(n+1).
Let a(n) = A001652(n), b(n) = this sequence 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+2k+1) + b(n)*b(n+2k+1) + c(n)*c(n+2k+1) = (a(n+k+1) - a(n+k))^2; a(n)*a(n+2k) + b(n)*b(n+2k) + c(n)*c(n+2k) = 2*c(n+k)^2. (End)
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
2*a(n) = 2*A084159(n) + 1 + (-1)^(n+1) = 2*A046729(n) + 1 - (-1)^(n+1). - Lekraj Beedassy, Jul 16 2004
a(n) = A001109(n+1) - A053141(n). - Manuel Valdivia, Apr 03 2010
From Paul Weisenhorn, Aug 03 2010: (Start)
a(n+1) = round((1+(7+5*sqrt(2))*(3+2*sqrt(2))^n)/2);
b(n+1) = round((2+(10+7*sqrt(2))*(3+2*sqrt(2))^n)/4) = A011900(n+1).
(End)
a(n)*(a(n)-1)/2 = b(n)*b(n+1) and 2*a(n) - 1 = b(n) + b(n+1), where b(n) = A001109. - Kenneth J Ramsey, Apr 24 2011
T(a(n)) = A011900(n)^2 + A001109(n), where T(n) is the n-th triangular number. See also A001653. - Charlie Marion, Apr 25 2011
a(0)=1, a(1)=4, a(2)=21, a(n) = 7*a(n-1) - 7*a(n-2) + a(n-3). - Harvey P. Dale, Apr 13 2012
Limit_{n->oo} a(n+1)/a(n) = 3 + 2*sqrt(2) = A156035. - Ilya Gutkovskiy, Jul 10 2016
a(n) = A001652(n)+1. - Dimitri Papadopoulos, Jul 06 2017
a(n) = (A002315(n) + 1)/2. - Bernard Schott, Dec 21 2022
E.g.f.: (exp(x) + exp(3*x)*(cosh(2*sqrt(2)*x) + sqrt(2)*sinh(2*sqrt(2)*x)))/2. - Stefano Spezia, Mar 16 2024
a(n) = A002024(A029549(n))+1. - Pontus von Brömssen, Sep 11 2024

Extensions

Additional comments from Wolfdieter Lang
Comment moved to A001653 by Claude Morin, Sep 22 2023