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

A123167 Continued fraction for c=sqrt(2)*(exp(sqrt(2))+1)/(exp(sqrt(2))-1). a(2*n-1) = 8*n-6, a(2*n) = 4*n-1.

Original entry on oeis.org

2, 3, 10, 7, 18, 11, 26, 15, 34, 19, 42, 23, 50, 27, 58, 31, 66, 35, 74, 39, 82, 43, 90, 47, 98, 51, 106, 55, 114, 59, 122, 63, 130, 67, 138, 71, 146, 75, 154, 79, 162, 83, 170, 87, 178, 91, 186, 95, 194, 99, 202, 103, 210, 107, 218, 111, 226, 115, 234, 119, 242, 123
Offset: 1

Views

Author

Benoit Cloitre, Oct 02 2006

Keywords

Comments

This continued fraction shows exp(sqrt(2)) is irrational.
If a(0)=-1 and offset 0: a(6*n) - a(6*n+1) + a(6*n+2) = 0, a(6*n +3) - 4*a(6*n+4) + a(6*n+5) = 0.
Conjecture: Numerator of 4/n - 2/n^2. - Wesley Ivan Hurt, Jul 11 2016

Examples

			c = 2.3227261394604270...
		

References

  • J. Borwein and D. Bailey, Mathematics by experiment, plausible reasoning in the 21st Century, A. K. Peters, p. 77
  • J. Borwein and K. Devlin, The computer as crucible: an introduction to experimental mathematics, A. K. Peters 2009, p. 91.

Crossrefs

Cf. A123168.

Programs

  • GAP
    a := [2,3,10,7];; for n in [5..10^3] do a[n] := 2*a[n-2] - a[n-4]; od; a; # Muniru A Asiru, Jan 28 2018
  • Magma
    [(2*n-1)*2^(n mod 2): n in [1..50]]; // G. C. Greubel, Jan 27 2018
    
  • Maple
    A123167 := proc(n)
        if type(n,'even') then
            2*n-1 ;
        else
            4*n-2 ;
        end if;
    end proc: # R. J. Mathar, Jul 25 2013
  • Mathematica
    a[ n_] := (2 n - 1) 2^Mod[n, 2]; (* Michael Somos, Apr 25 2015 *)
  • PARI
    {a(n) = (2*n - 1) * 2^(n%2)}; \\ Michael Somos, Feb 04 2012
    

Formula

a(n) = - A123168(2 - n) for all n in Z unless n = 1. - Michael Somos, Feb 24 2012
From Colin Barker, Feb 08 2012: (Start)
Empirical g.f.: x*(2+3*x+6*x^2+x^3)/(1-2*x^2+x^4).
Empirical a(n) = 2*a(n-2) - a(n-4). (End)

A062828 a(n) = gcd(2n, n(n+1)/2).

Original entry on oeis.org

1, 1, 6, 2, 5, 3, 14, 4, 9, 5, 22, 6, 13, 7, 30, 8, 17, 9, 38, 10, 21, 11, 46, 12, 25, 13, 54, 14, 29, 15, 62, 16, 33, 17, 70, 18, 37, 19, 78, 20, 41, 21, 86, 22, 45, 23, 94, 24, 49, 25, 102, 26, 53, 27, 110, 28, 57, 29, 118, 30, 61, 31, 126, 32, 65, 33, 134, 34, 69, 35, 142
Offset: 1

Views

Author

Jason Earls, Jul 20 2001

Keywords

Comments

Same as A123168 (without the initial 0) interleaved with the natural numbers. - Wesley Ivan Hurt, Apr 01 2022

Crossrefs

Cf. A123168.

Programs

  • Maple
    A062828 := proc(n)
        igcd(2*n,n*(n+1)/2) ;
    end proc: # R. J. Mathar, Jul 25 2013
  • Mathematica
    Table[GCD[2n,(n(n+1))/2],{n,120}] (* or *) LinearRecurrence[ {0,0,0,2,0,0,0,-1},{1,1,6,2,5,3,14,4},120] (* Harvey P. Dale, Apr 09 2018 *)
  • PARI
    j=[]; for(n=1,150,j=concat(j,gcd(2*n,n*(n+1)/2))); j
    
  • PARI
    a(n)=if(n%2,n*if(n%4>2,2,1),n/2) \\ Charles R Greathouse IV, Jul 07 2013

Formula

a(4n+1) = 4n+1, a(4n+2) = 2n+1, a(4n+3) = 8n+6, a(4n+4) = 2n+2. - Ralf Stephan, Jun 10 2005
G.f.: x*(1 + x + 6*x^2 + 2*x^3 + 3*x^4 + x^5 + 2*x^6) / ( (x-1)^2*(1+x)^2*(x^2+1)^2 ). - R. J. Mathar, Jul 25 2013
From Wesley Ivan Hurt, Apr 01 2022: (Start)
a(n) = n*(2-(-1)^n-sin(n*Pi/2))/2.
a(n) = 2*a(n-4) - a(n-8). (End)

A123251 Continued fraction for sqrt(2)*tan(1/sqrt(2)).

Original entry on oeis.org

1, 4, 1, 3, 1, 12, 1, 7, 1, 20, 1, 11, 1, 28, 1, 15, 1, 36, 1, 19, 1, 44, 1, 23, 1, 52, 1, 27, 1, 60, 1, 31, 1, 68, 1, 35, 1, 76, 1, 39, 1, 84, 1, 43, 1, 92, 1, 47, 1, 100, 1, 51, 1, 108, 1, 55, 1, 116, 1, 59, 1, 124, 1, 63, 1, 132, 1, 67, 1, 140, 1, 71, 1, 148, 1, 75, 1, 156, 1, 79, 1
Offset: 1

Views

Author

Benoit Cloitre, Oct 08 2006

Keywords

Comments

This continued fraction allows us to see that tan(1/sqrt(2)), sin(1/sqrt(2)), cos(1/sqrt(2)) are irrational. More generally, for any fixed positive integer m, the continued fraction for sqrt(m)*tan(1/sqrt(m)) is given by a(12*n-11) = a(12*n-9) = a(12*n-7) = a(12*n-5) = a(12*n-3) = a(12*n-1) = 1; a(12*n-10) = 12*m*n - 9*m - 2; a(12*n-8) = 12*n-9; a(12*n-6) = 12*m*n - 5*m - 2; a(12*n-4) = 12*n-5; a(12*n-2) = 12*m*n - m - 2; a(12*n) = 12*n-1.
From Peter Bala, Oct 02 2023: (Start)
Further to the above, the simple continued fraction expansion for sqrt(2)*tan(sqrt(2)/2) may be derived by setting z = sqrt(2)/2 in Lambert's continued fraction tan(z) = z/(1 - z^2/(3 - z^2/(5 - ... ))) and, after using an equivalence transformation, making repeated use of the identity 1/(n - 1/m) = 1/((n - 1) + 1/(1 + 1/(m - 1))) together with further equivalence transformations.
The same approach can be used to find the simple continued fraction expansions for the numbers sqrt(N)*tan(sqrt(N)/(k*N)) and (sqrt(N)/N)*tan(sqrt(N)/(k*N)) for k >= 1. An example is given below. (End)

Examples

			From _Peter Bala_ Oct 03 2023: (Start)
For k > 1, the simple continued fraction expansion of sqrt(2)*tan(sqrt(2)/(2*k)) is [0; k - 1, 1, 2*3*k - 2, 1, 5*k - 2, 1, 2*7*k - 2, 1, 9*k - 2, 1, 2*11*k - 2, 1, 13*k - 2,  1, 2*15*k - 2, 1, ...], and the simple continued fraction expansion of (sqrt(2)/2)*tan(sqrt(2)/(2*k)) is [0; 2*k - 1, 1, 3*k - 2, 1, 2*5*k - 2, 1, 7*k - 2, 1, 2*9*k - 2, 1, 11*k - 2, 1, 2*13*k - 2, 1, 15*k - 2, 1, ...]. (End)
		

Crossrefs

Cf. A123168.

Programs

  • Magma
    continuedFraction(Sqrt(2)*Tan(1/Sqrt(2))); // G. C. Greubel, Oct 12 2018
  • Maple
    cfrac(sqrt(2)*tan(1/sqrt(2)),81,'quotients'); # Muniru A Asiru, Oct 13 2018
  • Mathematica
    ContinuedFraction[Sqrt[2]*Tan[1/Sqrt[2]], 100] (* G. C. Greubel, Oct 12 2018 *)
  • PARI
    contfrac(sqrt(2)*tan(1/sqrt(2))) \\ G. C. Greubel, Oct 12 2018
    

Formula

For n >= 1 we have a(12*n-11) = a(12*n-9) = a(12*n-7) = a(12*n-5) = a(12*n-3) = a(12*n-1) = 1; a(12*n-10) = 24*n-20; a(12*n-8) = 12*n-9; a(12*n-6) = 24*n-12; a(12*n-4) = 12*n-5; a(12*n-2) = 24*n-4; a(12*n) = 12*n-1.
Empirical g.f.: x*(x^7 - x^6 + 4*x^5 - x^4 + 3*x^3 + x^2 + 4*x + 1) / ((x-1)^2*(x+1)^2*(x^2+1)^2). - Colin Barker, Jun 28 2013
a(2*n-1) = 1, a(4*n) = 4*n-1 and a(4*n-2) = 8*n-4 for n >= 1. - Peter Bala, Oct 02 2023

A123169 Continued fraction for sqrt(1/2)*(exp(sqrt(1/2))-1)/(exp(sqrt(1/2))+1).

Original entry on oeis.org

0, 4, 6, 20, 14, 36, 22, 52, 30, 68, 38, 84, 46, 100, 54, 116, 62, 132, 70, 148, 78, 164, 86, 180, 94, 196, 102, 212, 110, 228, 118, 244, 126, 260, 134, 276, 142, 292, 150, 308, 158, 324, 166, 340, 174, 356, 182, 372, 190, 388, 198, 404, 206, 420, 214, 436, 222, 452
Offset: 1

Views

Author

Benoit Cloitre, Oct 02 2006

Keywords

Comments

This continued fraction shows exp(sqrt(1/2)) is irrational.

References

  • J. Borwein and D. Bailey, Mathematics by experiment, plausible reasoning in the 21st Century, A. K. Peters, p. 77

Crossrefs

Cf. A123168.

Programs

  • Magma
    [n eq 1 select 0 else (3 + (-1)^n)*(2*n-3): n in [1..100]]; // G. C. Greubel, Jul 19 2023
    
  • Maple
    A123169:=n->(3+(-1)^n)*(-3+2*n): 0,seq(A123169(n), n=2..100); # Wesley Ivan Hurt, Apr 27 2017
  • Mathematica
    LinearRecurrence[{0,2,0,-1}, {0,4,6,20,14}, 100] (* G. C. Greubel, Jul 19 2023 *)
  • PARI
    a(n)=if(n%2,max(4*n-6,0),8*n-12) \\ Charles R Greathouse IV, Jun 28 2013
    
  • SageMath
    [(3+(-1)^n)*(2*n-3) + 2*int(n==1) for n in range(1,101)] # G. C. Greubel, Jul 19 2023

Formula

a(1) = 0, for n >= 1, a(2*n) = 16*n - 12, a(2*n+1) = 8*n - 2.
From Colin Barker, Jun 28 2013: (Start)
a(n) = (3 + (-1)^n)*(-3 + 2*n) for n > 1.
a(n) = 2*a(n-2) - a(n-4) for n > 5.
G.f.: 2*x^2*(2+3*x+6*x^2+x^3)/((1-x)^2*(1+x)^2). (End)
Showing 1-4 of 4 results.