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.

A078370 a(n) = 4*(n+1)*n + 5.

Original entry on oeis.org

5, 13, 29, 53, 85, 125, 173, 229, 293, 365, 445, 533, 629, 733, 845, 965, 1093, 1229, 1373, 1525, 1685, 1853, 2029, 2213, 2405, 2605, 2813, 3029, 3253, 3485, 3725, 3973, 4229, 4493, 4765, 5045, 5333, 5629, 5933, 6245, 6565, 6893, 7229, 7573, 7925, 8285, 8653, 9029
Offset: 0

Views

Author

Wolfdieter Lang, Nov 29 2002

Keywords

Comments

This is the generic form of D in the (nontrivially) solvable Pell equation x^2 - D*y^2 = -4. See A078356, A078357.
1/5 + 1/13 + 1/29 + ... = (Pi/8)*tanh Pi [Jolley]. - Gary W. Adamson, Dec 21 2006
Appears in A054413 and A086902 in relation to sequences related to the numerators and denominators of continued fractions convergents to sqrt((2*n+1)^2 + 4), n = 1, 2, 3, ... . - Johannes W. Meijer, Jun 12 2010
(2*n + 1 + sqrt(a(n)))/2 = [2*n + 1; 2*n + 1, 2*n + 1, ...], n >= 0, with the regular continued fraction with period length 1. This is the odd case. See A087475 for the general case with the Schroeder reference and comments. For the even case see A002522.
Primes in the sequence are in A005473. - Russ Cox, Aug 26 2019
The continued fraction expansion of sqrt(a(n)) is [2n+1; {n, 1, 1, n, 4n+2}]. For n=0, this collapses to [2; {4}]. - Magus K. Chu, Aug 27 2022
Discriminant of the binary quadratic forms y^2 - x*y - A002061(n+1)*x^2. - Klaus Purath, Nov 10 2022
From Klaus Purath, Apr 08 2025: (Start)
There are no squares in this sequence. The prime factors of these terms are always of the form 4*k + 1.
All a(n) = D satisfy the Pell equation (k*x)^2 - D*(m*y)^2 = -1 for any integer n where m = (D - 3)/2. The values for k and the solutions x, y can be calculated using the following algorithm: k = sqrt(D*m^2 - 1), x(0) = 1, x(1) = 4*D*m^2 - 1, y(0) = 1, y(1) = 4*D*m^2 - 3. The two recurrences are of the form (4*D*m^2 - 2, -1).
It follows from the above that this sequence belongs to A031396. (End)

References

  • L. B. W. Jolley, "Summation of Series", Dover Publications, 1961, p. 176.

Crossrefs

Subsequence of A077426 (D values (not a square) for which Pell x^2 - D*y^2 = -4 is solvable in positive integers).
Subsequence of A031396.

Programs

  • Magma
    [4*n^2+4*n+5 : n in [0..80]]; // Wesley Ivan Hurt, Aug 29 2022
  • Mathematica
    Table[4 n (n + 1) + 5, {n, 0, 45}] (* or *)
    Table[8 Binomial[n + 1, 2] + 5, {n, 0, 45}] (* or *)
    CoefficientList[Series[(5 - 2 x + 5 x^2)/(1 - x)^3, {x, 0, 45}], x] (* Michael De Vlieger, Jan 04 2017 *)
  • PARI
    a(n)=4*n^2+4*n+5 \\ Charles R Greathouse IV, Sep 24 2015
    
  • Python
    a= lambda n: 4*n**2+4*n+5 # Indranil Ghosh, Jan 04 2017
    
  • Scala
    (1 to 99 by 2).map(n => n * n + 4) // Alonso del Arte, May 29 2019
    

Formula

a(n) = (2*n + 1)^2 + 4.
a(n) = 4*(n+1)*n + 5 = 8*binomial(n+1, 2) + 5, hence subsequence of A004770 (5 (mod 8) numbers). [Typo fixed by Zak Seidov, Feb 26 2012]
G.f.: (5 - 2*x + 5*x^2)/(1 - x)^3.
a(n) = 8*n + a(n-1), with a(0) = 5. - Vincenzo Librandi, Aug 08 2010
a(n) = A016754(n) + 4. - Leo Tavares, Feb 22 2023
From Elmo R. Oliveira, Oct 31 2024: (Start)
E.g.f.: (5 + 8*x + 4*x^2)*exp(x).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)

Extensions

More terms from Max Alekseyev, Mar 03 2010

A077426 Nonsquare integers n such that the continued fraction (sqrt(n)+1)/2 has odd period length.

Original entry on oeis.org

5, 13, 17, 29, 37, 41, 53, 61, 65, 73, 85, 89, 97, 101, 109, 113, 125, 137, 145, 149, 157, 173, 181, 185, 193, 197, 229, 233, 241, 257, 265, 269, 277, 281, 293, 313, 317, 325, 337, 349, 353, 365, 373, 389, 397, 401, 409, 421, 425, 433, 445, 449, 457, 461, 481, 485
Offset: 1

Views

Author

Wolfdieter Lang, Nov 29 2002

Keywords

Comments

Nonsquare integers n for which Pell equation x^2 - n*y^2 = -4 has infinitely many integer solutions. The smallest solutions are given in A078356 and A078357.

References

  • O. Perron, "Die Lehre von den Kettenbruechen, Bd.I", Teubner, 1954, 1957 (Sec. 30, table p. 108).

Crossrefs

A subsequence of A077425.
Odd elements of A003814.

Programs

  • Maple
    isOddPrim := proc(n::integer)
        local cf;
        cf := numtheory[cfrac]((sqrt(n)+1)/2,'periodic','quotients') ;
        if nops(op(2,cf)) mod 2 =1 then
            RETURN(true) ;
        else
            RETURN(false) ;
        fi ;
    end:
    notA077426 := proc(n::integer)
        if issqr(n) then
            RETURN(true) ;
        elif not isOddPrim(n) then
            RETURN(true) ;
        else
            RETURN(false) ;
        fi ;
    end:
    A077426 := proc(n::integer)
        local resul,i ;
        resul := 5 ;
        i := 1 ;
        while i < n do
            resul := resul+4 ;
            while notA077426(resul) do
                resul := resul+4 ;
            od ;
            i:= i+1 ;
        od ;
        RETURN(resul) ;
    end:
    for n from 1 to 61 do print(A077426(n)) ; od : # R. J. Mathar, Apr 25 2006
  • Mathematica
    fQ[n_] := !IntegerQ@ Sqrt@ n && OddQ@ Length@ ContinuedFraction[(Sqrt@ n + 1)/2][[2]]; Select[Range@ 500, fQ] (* Robert G. Wilson v, Nov 17 2012 *)

Extensions

Edited and extended by Max Alekseyev, Mar 03 2010
Edited by Max Alekseyev, Mar 05 2010

A078357 Minimal positive solution x of Pell equation y^2 - A077426(n)*x^2 = -4.

Original entry on oeis.org

1, 1, 2, 1, 2, 10, 1, 5, 2, 250, 1, 106, 1138, 2, 25, 146, 1, 298, 2, 5, 17, 1, 97, 10, 253970, 2, 1, 3034, 9148450, 2, 746, 10, 157, 126890, 1, 14341370, 5, 2, 110671282, 986, 7586, 1, 530, 130, 173, 2, 11068353370, 21685, 26, 694966754, 1, 17883410, 5528222698, 17, 87922, 2, 5, 41
Offset: 1

Views

Author

Wolfdieter Lang, Nov 29 2002

Keywords

Comments

The corresponding values y are given in A078356.
For the general solution of Pell equation y^2 - A077426(n)*x^2 = -4 see a comment in A078356.
For the conversion of the values given in Perron's table to sequences A078356 and A078357, see comments in A078356.

References

  • O. Perron, "Die Lehre von den Kettenbruechen, Bd.I", Teubner, 1954, 1957 (Sec. 30, Satz 3.35, p. 109 and table p. 108).

Programs

  • Mathematica
    $MaxExtraPrecision = 100; A077426 = Select[Range[ 600], ! IntegerQ[Sqrt[#]] && OddQ[ Length[ ContinuedFraction[(Sqrt[#] + 1)/2] // Last]] &]; a[n_] := {y, x} /. {ToRules[ Reduce[y > 0 && x > 0 && y^2 - A077426[[n]]*x^2 == -4, {y, x}, Integers] /. C[1] -> 0]} // Sort // First // Last; Table[a[n], {n, 1, 60}] (* Jean-François Alcover, Jun 21 2013 *)

Extensions

Edited and extended by Max Alekseyev, Mar 03 2010

A077057 Minimal positive solution a(n) of Diophantine equation a(n)^2 - a(n)*b(n) - G(n)*b(n)^2 = +1 or -1 with G(n) := A078358(n). The companion sequence is b(n)=A077058(n).

Original entry on oeis.org

1, 2, 5, 3, 3, 27, 7, 37, 4, 4, 171, 22, 9, 14, 1193, 5, 5, 553, 16, 6173, 11, 45, 143, 849, 6, 6, 18339, 94, 1893, 103, 13, 33, 2353, 115, 12703, 7, 7, 67115, 701, 73, 59, 1891117, 15, 551427, 23, 49771, 39, 4105015, 8, 8, 24673, 41, 75585293, 25, 9095891, 989, 17, 386, 6445, 87, 771, 1385
Offset: 1

Views

Author

Wolfdieter Lang, Nov 29 2002

Keywords

Comments

This equation can also be written as (2*a(n) - b(n))^2 - D(n)*b(n)^2 = +4 or -4 with D(n) := A077425(n) = 1 + 4*G(n).
This is from Perron's table (see reference p. 108, for n = 1..28) which gives the minimal x,y values which solve the above mentioned Diophantine equations.
For Pell equation x^2 - D*y^2 = +4, see A077428 and A078355. For Pell equation x^2 - D*y^2 = -4, see A078356 and A078357.

References

  • O. Perron, "Die Lehre von den Kettenbruechen, Bd.I", Teubner, 1954, 1957 (Sec. 30, Satz 3.35, p. 109 and table p. 108).

Crossrefs

Programs

  • Mathematica
    g[n_] := Ceiling[Sqrt[n]] + n - 1; r[n_] := Reduce[an > 0 && bn > 0 && (an ^2 - an*bn - g[n]*bn^2 == 1 || an^2 - an*bn - g[n]*bn^2 == - 1), {an, bn}, Integers] /. C -> c; ab[n_] := DeleteCases[ Flatten[ Table[{an, bn} /. {ToRules[r[n]]} // Simplify, {c[1], 0, 1}], 1], an | bn]; a[n_] := a[n] = Min[ab[n][[All, 1]]]; Table[Print[{n, a[n]}]; a[n], {n, 1, 62}] (* Jean-François Alcover, Oct 04 2012 *)

Formula

a(n) = (A078361(n) + A077058(n)) / 2. [Max Alekseyev, Feb 06 2010]

Extensions

More terms from Max Alekseyev, Feb 06 2010
a(9), a(33), a(54) corrected (after notice by Jean-François Alcover); a(58) through a(62) added. - Wolfdieter Lang, Oct 04 2012

A077058 Minimal positive solution a(n) of Diophantine equation b(n)^2 - b(n)*a(n) - G(n)*a(n)^2 = +1 or -1 with G(n) := A078358(n). The companion sequence is b(n)=A077057(n).

Original entry on oeis.org

1, 1, 2, 1, 1, 8, 2, 10, 1, 1, 40, 5, 2, 3, 250, 1, 1, 106, 3, 1138, 2, 8, 25, 146, 1, 1, 2968, 15, 298, 16, 2, 5, 352, 17, 1856, 1, 1, 9384, 97, 10, 8, 253970, 2, 72664, 3, 6440, 5, 521904, 1, 1, 3034, 5, 9148450, 3, 1084152, 117, 2, 45, 746, 10, 88, 157, 126890, 1, 1
Offset: 1

Views

Author

Wolfdieter Lang, Nov 29 2002

Keywords

Comments

This equation can also be written as (2*b(n)-a(n))^2 - D(n)*a(n)^2 = +4 or -4 with D(n) := A077425(n)=1+4*G(n).
This is from Perron's table (see reference p. 108, for n = 1..28) which gives the minimal x,y values which solve the above mentioned Diophantine equations.
For Pell equation x^2 - D*y^2 = +4, see A077428 and A078355. For Pell equation x^2 - D*y^2 = -4, see A078356 and A078357.

References

  • O. Perron, "Die Lehre von den Kettenbruechen, Bd.I", Teubner, 1954, 1957 (Sec. 30, Satz 3.35, p. 109 and table p. 108).

Programs

  • Mathematica
    g[n_] := Ceiling[ Sqrt[n] ] + n - 1; r[n_] := Reduce[an > 0 && (bn^2 - bn *an - g[n]*an^2 == 1 || bn^2 - bn *an - g[n]*an^2 == - 1), {an, bn}, Integers] /. C -> c; ab[n_] := DeleteCases[ Flatten[ Table[{an, bn} /. {ToRules[r[n]]} // Simplify, {c[1], 0, 1}] , 1] , an | bn]; a[n_] := a[n] = Min[ ab[n][[All, 1]] ]; Table[ Print[{n, a[n]}]; a[n], {n, 1, 65}] (* Jean-François Alcover, Oct 03 2012 *)
  • PARI
    forstep(D=1,1000,4, if(issquare(D),next); u=bnfinit(x^2-D).fu[1]; k=1; while( denominator(t=polcoeff(lift(u^k),1)*2)>1, k++); print1(abs(t),", "); ) \\ Max Alekseyev, Feb 06 2010

Extensions

More terms from Max Alekseyev, Feb 06 2010

A078361 Minimal positive solution a(n) of Pell equation a(n)^2 - D(n)*b(n)^2 = +4 or -4 with D(n)=A077425(n). The companion sequence is b(n)=A077058(n).

Original entry on oeis.org

1, 3, 8, 5, 5, 46, 12, 64, 7, 7, 302, 39, 16, 25, 2136, 9, 9, 1000, 29, 11208, 20, 82, 261, 1552, 11, 11, 33710, 173, 3488, 190, 24, 61, 4354, 213, 23550, 13, 13, 124846, 1305, 136, 110, 3528264, 28, 1030190, 43, 93102, 73, 7688126, 15, 15, 46312, 77
Offset: 1

Views

Author

Wolfdieter Lang, Nov 29 2002

Keywords

Comments

Computed from Perron's table (see reference p. 108, for n = 1..28) which gives the minimal x,y values for the Diophantine eq. x^2 - x*y - ((D(n)-1)/4)*y^2= +1, resp., -1 if D(n)=A077425(n), resp, D(n)=A077425(n) and D(n) also in A077426 (this second case excludes in Perron's table the D values with a 'Teilnenner' in brackets).
The conversion from the x,y values of Perron's table to the minimal a=a(n) and b=b(n) solutions is a(n)=2*x(n)-y(n) and b(n)=y(n). If D(n)=A077425(n) is not in A077426 then the equation with -4 has no solution and a(n) and b(n) are the minimal solutions of the a(n)^2 - D(n)*b(n)^2 = +4 equation. If D(n)=A077425(n) is in A077426 then the a(n) and b(n) values are the minimal solution of the a(n)^2 - D(n)*b(n)^2 = -4 equation. In this case a(+,n)= a(n)^2+2 and b(+,n)=a(n)*b(n) are the minimal solution of a^2 - D(n)*b^2 = +4.
For Pell equation a^2 - D*b^2 = +4, see A077428 and A078355. For Pell equation a^2 - D*b^2 = -4, see A078356 and A078357.

Examples

			29=D(5)=A077425(5) is A077426(4), hence a(5)=5 and b(5)=A077058(5)=1 solve a^2 - 29*b^2=-4 minimally and a(+,5)=a(5)^2+2=27 with b(+,5)=a(5)*b(5)=5*1=5 solve a^2 - 29*b^2=+4 minimally. See also A077428 with companion A078355.
21=D(4)=A077425(4) is not in A077426, hence a(4)=5 and b(4)=A077058(4)=1 give the solution with minimal positive b of a^2 - 21*b^2=+4.
		

References

  • O. Perron, "Die Lehre von den Kettenbruechen, Bd.I", Teubner, 1954, 1957 (Sec. 30, Satz 3.35, p. 109 and table p. 108).

Extensions

More terms from Matthew Conroy, Apr 20 2003
Showing 1-6 of 6 results.