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

A041008 Numerators of continued fraction convergents to sqrt(7).

Original entry on oeis.org

2, 3, 5, 8, 37, 45, 82, 127, 590, 717, 1307, 2024, 9403, 11427, 20830, 32257, 149858, 182115, 331973, 514088, 2388325, 2902413, 5290738, 8193151, 38063342, 46256493, 84319835, 130576328, 606625147, 737201475, 1343826622, 2081028097, 9667939010, 11748967107, 21416906117
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A010465, A041009 (denominators), A266698 (quadrisection), A001081 (quadrisection).
Analog for other sqrt(m): A001333 (m=2), A002531 (m=3), A001077 (m=5), A041006 (m=6), A041010 (m=8), A005667 (m=10), A041014 (m=11), A041016 (m=12), ..., A042934 (m=999), A042936 (m=1000).

Programs

  • Mathematica
    Table[Numerator[FromContinuedFraction[ContinuedFraction[Sqrt[7],n]]],{n,1,50}] (* Vladimir Joseph Stephan Orlovsky, Mar 16 2011 *)
    Numerator[Convergents[Sqrt[7], 30]] (* Vincenzo Librandi, Oct 28 2013 *)
    LinearRecurrence[{0,0,0,16,0,0,0,-1},{2,3,5,8,37,45,82,127},40] (* Harvey P. Dale, Jul 23 2021 *)
  • PARI
    A041008=contfracpnqn(c=contfrac(sqrt(7)),#c)[1,][^-1] \\ Discard possibly incorrect last element. NB: a(n)=A041008[n+1]! For more terms use:
    A041008(n)={n<#A041008|| A041008=extend(A041008, [4, 16; 8, -1], n\.8); A041008[n+1]}
    extend(A,c,N)={for(n=#A+1, #A=Vec(A, N), A[n]=[A[n-i]|i<-c[,1]]*c[,2]); A} \\ (End)

Formula

G.f.: (2 + 3*x + 5*x^2 + 8*x^3 + 5*x^4 - 3*x^5 + 2*x^6 - x^7)/(1 - 16*x^4 + x^8).

A159678 The general form of the recurrences are the a(j), b(j) and n(j) solutions of the 2-equation problem 7*n(j) + 1 = a(j)*a(j) and 9*n(j) + 1 = b(j)*b(j) with positive integer numbers.

Original entry on oeis.org

1, 17, 271, 4319, 68833, 1097009, 17483311, 278635967, 4440692161, 70772438609, 1127918325583, 17975920770719, 286486814005921, 4565813103324017, 72766522839178351, 1159698552323529599, 18482410314337295233, 294558866477073194129, 4694459453318833810831
Offset: 1

Views

Author

Paul Weisenhorn, Apr 19 2009

Keywords

Comments

The sequence a(j) is A157456, the sequence n(j) is A159679, the sequence b(j) the sequence given here.
Numbers k such that 7*k^2 + 2 is a square. - Colin Barker, Mar 17 2014

Crossrefs

Programs

  • Magma
    [n le 2 select 17^(n-1) else 16*Self(n-1) - Self(n-2): n in [1..30]]; // G. C. Greubel, Jun 03 2018
  • Maple
    for a from 1 by 2 to 100000 do b:=sqrt((9*a*a-2)/7): if (trunc(b)=b) then
    n:=(a*a-1)/7: La:=[op(La),a]:Lb:=[op(Lb),b]:Ln:=[op(Ln),n]: end if: end do:
    # Second program
    seq(simplify(ChebyshevU(n-1,8) + ChebyshevU(n-2,8)), n=1..30); # G. C. Greubel, Sep 27 2022
  • Mathematica
    Rest[CoefficientList[Series[x (1+x)/(1-16x+x^2),{x,0,30}],x]] (* or *) LinearRecurrence[{16,-1},{1,17},30] (* Harvey P. Dale, Dec 25 2011 *)
  • PARI
    Vec(x*(1+x)/(1-16*x+x^2) + O(x^30)) \\ Michel Marcus, Jan 03 2016
    
  • PARI
    a(n) = round((-(8-3*sqrt(7))^n*(3+sqrt(7))-(-3+sqrt(7))*(8+3*sqrt(7))^n)/(2*sqrt(7))) \\ Colin Barker, Jul 25 2016
    
  • Sage
    [(lucas_number2(n,16,1)-lucas_number2(n-1,16,1))/14 for n in range(1, 20)] # Zerinvary Lajos, Nov 10 2009
    

Formula

The b(j) recurrence (this sequence) is b(1)=1, b(2)=17, b(t+2) = 16*b(t+1) - b(t).
From R. J. Mathar, Oct 31 2011: (Start)
G.f.: x*(1+x) / ( 1-16*x+x^2 ).
a(n) = A077412(n-1) + A077412(n-2). (End)
a(n) = 16*a(n-1) - a(n-2), with a(1)=1, a(2)=17. - Harvey P. Dale, Dec 25 2011
a(n) = ( (3-sqrt(7))*(8+3*sqrt(7))^n - (3+sqrt(7))*(8-3*sqrt(7))^n )/(2*sqrt(7)). - Colin Barker, Jul 25 2016

Extensions

More terms from Zerinvary Lajos, Nov 10 2009
Showing 1-2 of 2 results.