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-10 of 28 results. Next

A073089 a(n) = (1/2)*(4n - 3 - Sum_{k=1..n} A007400(k)).

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Aug 18 2002

Keywords

Comments

From Joerg Arndt, Oct 28 2013: (Start)
Sequence is (essentially) obtained by complementing every other term of A014577.
Turns (by 90 degrees) of a curve similar to the Heighway dragon which can be rendered as follows: [Init] Set n=0 and direction=0. [Draw] Draw a unit line (in the current direction). Turn left/right if a(n) is zero/nonzero respectively. [Next] Set n=n+1 and goto (draw).
See the linked pdf files for two renderings of the curve. (End)

Examples

			From _Paul D. Hanna_, Oct 19 2012: (Start)
Let F(x) = x + 1/x + 1/x^3 + 1/x^7 + 1/x^15 + 1/x^31 +...+ 1/x^(2^n-1) +...
then F(x) = x + 1/(x + 1/(-x + 1/(-x + 1/(-x + 1/(x + 1/(x + 1/(-x + 1/(-x + 1/(x + 1/(-x + 1/(-x + 1/(x + 1/(x + 1/(x + 1/(-x + 1/(-x + 1/(x + 1/(-x + 1/(-x + 1/(-x + 1/(x +...+ 1/((-1)^a(n)*x +...)))))))))))))))))))))),
a continued fraction in which the partial quotients equal (-1)^a(n)*x.  (End)
		

Crossrefs

Cf. A007400, A073088 (the sum part here), A123725.

Programs

  • PARI
    a(n)=if(n<2,0,if(n%8==1,a((n+1)/2),[1,-1,0,1,1,1,0,0,1,-1,0,1,1,0,0,0][(n%16)+1])) \\ Ralf Stephan
    
  • PARI
    /* Using the Continued Fraction, Print 2^N terms of this sequence: */
    {N=10;CF=contfrac(x+sum(n=1,N,1/x^(2^n-1)),2^N);for(n=1,2^N,print1((1-CF[n]/x)/2,", "))} \\ Paul D. Hanna, Oct 19 2012
    
  • PARI
    a(n) = { if ( n<=1, return(0)); n-=1; my(v=2^valuation(n,2) ); return( (0==bitand(n, v<<1)) != (v%2) ); } \\ Joerg Arndt, Oct 28 2013

Formula

Recurrence: a(1) = a(4n+2) = a(8n+7) = a(16n+13) = 0, a(4n) = a(8n+3) = a(16n+5) = 1, a(8n+1) = a(4n+1).
G.f.: The following series has a simple continued fraction expansion:
x + Sum_{n>=1} 1/x^(2^n-1) = [x; x, -x, -x, -x, x, ..., (-1)^a(n)*x, ...]. - Paul D. Hanna, Oct 19 2012
a(n) = A014577(n-2) + A056594(n). Conjecture: a(n) = (1 + (-1)^A057661(n - 1))/2 for all n > 1. - Velin Yanev, Feb 01 2021

A073097 Let x(n) denote the number of 4's among the n first elements of the continued fraction for sum k>=0 1/2^(2^k) (A007400), y(n) the number of 6's and z(n) the number of 2's. Then a(n)=x(n)-y(n)-z(n)-1.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Aug 18 2002

Keywords

Comments

The positive sequence has a(n) = mod(A000120(A047849(n)),2) = mod(A000120(A078008(2n)),2) - Paul Barry, Jan 13 2005
Cosh(1) in 'reflected factorial' base is 1.10101010101010101010101010101010101010101010... - see A091337 for Sinh(1) (from Robert G. Wilson v, May 04 2005)

Crossrefs

Programs

  • PARI
    up_to = 65537;
    A007400(n) = if(n<3, [0, 1, 4][n+1], if(n%8==1, A007400((n+1)/2), if(n%8==2, A007400((n+2)/2), [2, 0, 0, 2, 4, 4, 6, 4, 2, 0, 0, 2, 4, 6, 4, 4][(n%16)+1]))); \\ From A007400
    A073097list(up_to) = { my(v=vector(up_to), x4=0, y6=0, z2=0, k); for(n=1, up_to, k=A007400(n); if(2==k,z2++,if(4==k,x4++,if(6==k,y6++))); v[n] = (x4-y6-z2-1)); (v); };
    v073097 = A073097list(up_to);
    A073097(n) = if(!n,-1,v073097[n]); \\ Antti Karttunen, Jan 12 2019

Formula

It seems that a(2k+1) = 0 for k>=1.
The positive sequence (assuming the pattern continues) has g.f. (1+x-x^2)/((1-x)(1-x^2)), with a(n)=(1-(1)^n)/2+0^n = mod((1+A001045(n+1))/2, 2) = mod(A005578, 2). The partial sums are A008619(n+1). - Paul Barry, Apr 28 2004

A073088 Sum of first n terms of the simple continued fraction of Sum_{k>=0} 1/2^(2^k) (cf. A007400).

Original entry on oeis.org

0, 1, 5, 7, 11, 15, 21, 25, 27, 31, 37, 39, 43, 49, 53, 57, 59, 63, 69, 71, 75, 79, 85, 89, 91, 97, 101, 103, 107, 113, 117, 121, 123, 127, 133, 135, 139, 143, 149, 153, 155, 159, 165, 167, 171, 177, 181, 185, 187, 193, 197, 199, 203, 207, 213, 217, 219, 225, 229
Offset: 1

Views

Author

Benoit Cloitre, Aug 18 2002

Keywords

Examples

			The first 9 terms are 0, 1, 4, 2, 4, 4, 6, 4, 2, hence a(9)= 0 + 1 + 4 + 2 + 4 + 4 + 6 + 4 + 2 = 27.
		

Crossrefs

Cf. A007400.

Formula

a(n) ~ 4n and a(n) < 4n.

A003285 Period of continued fraction for square root of n (or 0 if n is a square).

Original entry on oeis.org

0, 1, 2, 0, 1, 2, 4, 2, 0, 1, 2, 2, 5, 4, 2, 0, 1, 2, 6, 2, 6, 6, 4, 2, 0, 1, 2, 4, 5, 2, 8, 4, 4, 4, 2, 0, 1, 2, 2, 2, 3, 2, 10, 8, 6, 12, 4, 2, 0, 1, 2, 6, 5, 6, 4, 2, 6, 7, 6, 4, 11, 4, 2, 0, 1, 2, 10, 2, 8, 6, 8, 2, 7, 5, 4, 12, 6, 4, 4, 2, 0, 1, 2, 2, 5, 10, 2, 6, 5, 2, 8, 8, 10, 16, 4, 4, 11, 4, 2, 0, 1, 2, 12
Offset: 1

Views

Author

Keywords

Comments

Any string of five consecutive terms m^2 - 2 through m^2 + 2 for m > 2 in the sequence has the corresponding periods 4,2,0,1,2. - Lekraj Beedassy, Jul 17 2001
For m > 1, a(m^2+m) = 2 and the continued fraction is m, 2, 2*m, 2, 2*m, 2, 2*m, ... - Arran Fernandez, Aug 14 2011
Apparently the generating function of the sequence for the denominators of continued fraction convergents to sqrt(n) is always rational and of form p(x)/[1 - C*x^m + (-1)^m * x^(2m)], or equivalently, the denominators satisfy the linear recurrence b(n+2m) = C*b(n+m) - (-1)^m * b(n), where a(n) is equal to m for each nonsquare n, or 0. See A006702 for the conjecture regarding C. The same conjectures apply to the sequences of the numerators of continued fraction convergents to sqrt(n). - Ralf Stephan, Dec 12 2013
If a(n)=1, n is of form k^2+1 (A002522 except the initial term 1). See A013642 for a(n)=2, A013643 for a(n)=3, A013644 for a(n)=4, A010337 for a(n)=5, A020347 for a(n)=6, A010338 for a(n)=7, A020348 for a(n)=8, A010339 for a(n)=9, and furthermore A020349-A020439. - Ralf Stephan, Dec 12 2013
From William Krier, Dec 12 2024: (Start)
a(m^2-4) = 4 for even m>=6 since sqrt(m^2-4) = [m-1; 1, (m-4)/2, 1, 2*(m-1)].
a(m^2-4) = 6 for odd m>=5 since sqrt(m^2-4) = [m-1; 1, (m-3)/2, 2, (m-3)/2, 1, 2*(m-1)].
a(m^2+4) = 2 for even m>=2 since sqrt(m^2+4) = [m; m/2, 2*m].
a(m^2+4) = 5 for odd m>=3 since sqrt(m^2+4) = [m; (m-1)/2, 1, 1, (m-1)/2, 2*m]. (End)

References

  • A. Brousseau, Number Theory Tables. Fibonacci Association, San Jose, CA, 1973, p. 197.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Maple
    f:= n ->  if issqr(n) then 0
       else nops(numtheory:-cfrac(sqrt(n),'periodic','quotients')[2]) fi:
    map(f, [$1..100]); # Robert Israel, Sep 02 2015
  • Mathematica
    a[n_] := ContinuedFraction[Sqrt[n]] // If[Length[ # ] == 1, 0, Length[Last[ # ]]]&
    pcf[n_]:=Module[{s=Sqrt[n]},If[IntegerQ[s],0,Length[ContinuedFraction[s][[2]]]]]; Array[pcf,110] (* Harvey P. Dale, Jul 15 2017 *)
  • PARI
    a(n)=if(issquare(n),return(0));my(s=sqrt(n),x=s,f=floor(s),P=[0],Q=[1],k);while(1,k=#P;P=concat(P,f*Q[k]-P[k]);Q=concat(Q,(n-P[k+1]^2)/Q[k]);k++;for(i=1,k-1,if(P[i]==P[k]&&Q[i]==Q[k],return(k-i)));x=(P[k]+s)/Q[k];f=floor(x)) \\ Charles R Greathouse IV, Jul 31 2011
    
  • PARI
    isok(n, p) = {localprec(p); my(cf = contfrac(sqrt(n))); setsearch(Set(cf), 2*cf[1]);}
    a(n) = {if (issquare(n), 0, my(p=100); while (! isok(n, p), p+=100); localprec(p); my(cf = contfrac(sqrt(n))); for (k=2, #cf, if (cf[k] == 2*cf[1], return (k-1))););} \\ Michel Marcus, Jul 07 2021
    
  • Python
    from sympy.ntheory.continued_fraction import continued_fraction_periodic
    def a(n):
        cfp = continued_fraction_periodic(0, 1, d=n)
        return 0 if len(cfp) == 1 else len(cfp[1])
    print([a(n) for n in range(1, 104)]) # Michael S. Branicky, Aug 22 2021

A007404 Decimal expansion of Sum_{n>=0} 1/2^(2^n).

Original entry on oeis.org

8, 1, 6, 4, 2, 1, 5, 0, 9, 0, 2, 1, 8, 9, 3, 1, 4, 3, 7, 0, 8, 0, 7, 9, 7, 3, 7, 5, 3, 0, 5, 2, 5, 2, 2, 1, 7, 0, 3, 3, 1, 1, 3, 7, 5, 9, 2, 0, 5, 5, 2, 8, 0, 4, 3, 4, 1, 2, 1, 0, 9, 0, 3, 8, 4, 3, 0, 5, 5, 6, 1, 4, 1, 9, 4, 5, 5, 5, 3, 0, 0, 0, 6, 0, 4, 8, 5, 3, 1, 3, 2, 4, 8, 3, 9, 7, 2, 6, 5, 6, 1, 7, 5, 5, 8
Offset: 0

Views

Author

Keywords

Comments

Kempner shows that numbers of a general form (which includes this constant) are transcendental. - Charles R Greathouse IV, Nov 07 2017

Examples

			0.81642150902189314370....
		

References

  • M. J. Knight, An "oceans of zeros" proof that a certain non-Liouville number is transcendental, The American Mathematical Monthly, Vol. 98, No. 10 (1991), pp. 947-949.

Crossrefs

Programs

  • Mathematica
    RealDigits[ N[ Sum[1/2^(2^n), {n, 0, Infinity}], 110]] [[1]]
  • PARI
    default(realprecision, 20080); x=suminf(n=0, 1/2^(2^n)); x*=10; for (n=0, 20000, d=floor(x); x=(x-d)*10; write("b007404.txt", n, " ", d)); \\ Harry J. Smith, May 07 2009
    
  • PARI
    suminf(k = 0, 1/(2^(2^k))) \\ Michel Marcus, Mar 26 2017
    
  • PARI
    suminf(k=0,1.>>2^k) \\ Charles R Greathouse IV, Nov 07 2017

Formula

Equals -Sum_{k>=1} mu(2*k)/(2^k - 1) = Sum_{k>=1, k odd} mu(k)/(2^k - 1). - Amiram Eldar, Jun 22 2020

Extensions

Edited by Robert G. Wilson v, Dec 11 2002
Deleted old PARI program Harry J. Smith, May 20 2009

A004200 Continued fraction for Sum_{k>=0} 1/3^(2^k).

Original entry on oeis.org

0, 2, 5, 3, 3, 1, 3, 5, 3, 1, 5, 3, 1, 3, 3, 5, 3, 1, 5, 3, 3, 1, 3, 5, 1, 3, 5, 3, 1, 3, 3, 5, 3, 1, 5, 3, 3, 1, 3, 5, 3, 1, 5, 3, 1, 3, 3, 5, 1, 3, 5, 3, 3, 1, 3, 5, 1, 3, 5, 3, 1, 3, 3, 5, 3, 1, 5, 3, 3, 1, 3, 5, 3, 1, 5, 3, 1, 3, 3, 5, 3, 1, 5, 3, 3, 1, 3, 5, 1, 3, 5, 3, 1, 3, 3, 5, 1, 3, 5, 3, 3, 1, 3, 5, 3
Offset: 0

Views

Author

Keywords

Examples

			0.456942562477639661115491826... = 0 + 1/(2 + 1/(5 + 1/(3 + 1/(3 + ...)))).
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A007400, A078885 (decimal expansion).

Programs

  • Maple
    u := 3: v := 7: Buv := [u,1,[0,u-1,u+1]]: for k from 2 to v do n := nops(Buv[3]): Buv := [u,Buv[2]+1,[seq(Buv[3][i],i=1..n-1),Buv[3][n]+1,Buv[3][n]-1,seq(Buv[3][n-i],i=1..n-2)]] od: seq(Buv[3][i],i=1..2^v);# first 2^v terms of A004200 # Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Dec 02 2002
  • Mathematica
    ContinuedFraction[ NSum[1/3^(2^n), {n, 0, Infinity}, WorkingPrecision -> 105], 105] (* Jean-François Alcover, Jul 18 2011 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 20000); x=suminf(n=0, 1/3^(2^n)); x=contfrac(x); for (n=1, 20001, write("b004200.txt", n-1, " ", x[n])); } \\ Harry J. Smith, May 10 2009

Formula

Recurrence: a(0)=0, a(1)=2, a(2)=5, a(16n+5)=a(16n+12)=a(32n+9)=a(32n+24)=1, a(8n+3)=a(8n+6)=a(16n+4)=a(16n+13)=a(32n+8)=a(32n+25)=3, a(8n+2)=a(8n+7)=5, a(16n)=a(8n), a(16n+1)=a(8n+1). - Ralf Stephan, May 17 2005

Extensions

Better description and more terms from Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Jun 19 2001

A088431 Half of the (n+1)-st component of the continued fraction expansion of Sum_{k>=0} 1/2^(2^k).

Original entry on oeis.org

2, 1, 2, 2, 3, 2, 1, 2, 3, 1, 2, 3, 2, 2, 1, 2, 3, 1, 2, 2, 3, 2, 1, 3, 2, 1, 2, 3, 2, 2, 1, 2, 3, 1, 2, 2, 3, 2, 1, 2, 3, 1, 2, 3, 2, 2, 1, 3, 2, 1, 2, 2, 3, 2, 1, 3, 2, 1, 2, 3, 2, 2, 1, 2, 3, 1, 2, 2, 3, 2, 1, 2, 3, 1, 2, 3, 2, 2, 1, 2, 3, 1, 2, 2, 3, 2, 1, 3, 2, 1, 2, 3, 2, 2, 1, 3, 2, 1, 2, 2, 3, 2, 1, 2, 3
Offset: 1

Views

Author

Benoit Cloitre, Nov 08 2003

Keywords

Comments

To construct the sequence use the rule: a(1)=2, then a(a(1) + a(2) + ... + a(n) + 1) = 2 and fill in any undefined places with the sequence 1,3,1,3,1,3,1,3,1,3,1,3,....
This sequence appears to be the sequence of run lengths of the regular paperfolding sequence A014577, i.e., the latter starts as follows: 2 zeros, 1 one, 2 zeros, 2 ones, etc. - Dimitri Hendriks, May 06 2010
Hendriks' conjecture is proved in Bunder, Bates, and Arnold (2024). Also see Shallit (2024). - Jeffrey Shallit, Mar 10 2025

Examples

			Example to illustrate the comment: a(a(1)+1)=a(3)=2 and a(2) is undefined. The rule requires a(2)=1. Next, a(a(1)+a(2)+1)=a(4)=2, a(a(1)+a(2)+a(3)+1)=a(6)=2 and a(5) is undefined. The rule now requires a(5)=3.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = Which[n < 3, {0, 1, 4}[[n + 1]], Mod[n, 8] == 1, a[(n + 1)/2], Mod[n, 8] == 2, a[(n + 2)/2], True, {2, 0, 0, 2, 4, 4, 6, 4, 2, 0, 0, 2, 4, 6, 4, 4}[[Mod[n, 16] + 1]]]; Array[a[# + 1]/2 &, 98] (* after Jean-François Alcover at A007400 *)
  • Scheme
    (define (A088431 n) (* 1/2 (A007400 (+ 1 n)))) ;; Code for A007400 given under that entry. - Antti Karttunen, Aug 12 2017

Formula

a(n) = (1/2)*A007400(n+1); a(a(1) + a(2) + ... + a(n) + 1) = 2.

A010145 Continued fraction for sqrt(61).

Original entry on oeis.org

7, 1, 4, 3, 1, 2, 2, 1, 3, 4, 1, 14, 1, 4, 3, 1, 2, 2, 1, 3, 4, 1, 14, 1, 4, 3, 1, 2, 2, 1, 3, 4, 1, 14, 1, 4, 3, 1, 2, 2, 1, 3, 4, 1, 14, 1, 4, 3, 1, 2, 2, 1, 3, 4, 1, 14, 1, 4, 3, 1, 2, 2, 1, 3, 4, 1, 14, 1, 4, 3, 1, 2, 2, 1, 3, 4, 1, 14
Offset: 0

Views

Author

Keywords

Examples

			7.810249675906654394129722735... = 7 + 1/(1 + 1/(4 + 1/(3 + 1/(1 + ...)))). - _Harry J. Smith_, Jun 07 2009
		

Crossrefs

Cf. A010514 Decimal expansion. - Harry J. Smith, Jun 07 2009

Programs

  • Mathematica
    ContinuedFraction[Sqrt[61],300] (* Vladimir Joseph Stephan Orlovsky, Mar 08 2011 *)
    PadRight[{7},120,{14,1,4,3,1,2,2,1,3,4,1}] (* Harvey P. Dale, Mar 27 2013 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 18000); x=contfrac(sqrt(61)); for (n=0, 20000, write("b010145.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 07 2009

A056469 Number of elements in the continued fraction for Sum_{k=0..n} 1/2^2^k.

Original entry on oeis.org

2, 3, 4, 6, 10, 18, 34, 66, 130, 258, 514, 1026, 2050, 4098, 8194, 16386, 32770, 65538, 131074, 262146, 524290, 1048578, 2097154, 4194306, 8388610, 16777218, 33554434, 67108866, 134217730, 268435458, 536870914, 1073741826, 2147483650
Offset: 0

Views

Author

Benoit Cloitre, Dec 07 2002

Keywords

Comments

Let f_1(x) := 1 - sqrt(1 - x^2) = 2*x^2 + 2*x^4 + 4*x^6 + ... and for n>1 let f_n(x) := f_{n-1}(f_1(x)) = x^(2^n)*(2 + 2^n*x^2 + 2^n*a(n-1)*x^4 + ...). - Michael Somos, Jun 29 2023

Examples

			G.f. = 2 + 3*x + 4*x^2 + 6*x^3 + 10*x^4 + 18*x^5 + 34*x^6 + ... - _Michael Somos_, Jun 29 2023
		

Crossrefs

Cf. A007400. Apart from initial term, same as A052548. See also A089985.

Programs

  • Magma
    [Floor(2^(n-1)+2): n in [0..60]]; // Vincenzo Librandi, Sep 21 2011
    
  • Mathematica
    LinearRecurrence[{3,-2},{2,3,4},40] (* Harvey P. Dale, Apr 23 2015 *)
    a[ n_] := If[n < 0, 0, Floor[2^n/2] + 2]; (* Michael Somos, Jun 29 2023 *)
  • PARI
    {a(n) = if(n<0, 0, 2^n\2 + 2)}; /* Michael Somos, Jun 29 2023 */
  • Sage
    [floor(gaussian_binomial(n,1,2)+3) for n in range(-1,32)] # Zerinvary Lajos, May 31 2009
    

Formula

a(0)=2; for n > 0, a(n) = 2^(n-1) + 2 = A052548(n-1) + 2.
a(n) = floor(2^(n-1) + 2). - Vincenzo Librandi, Sep 21 2011
From Colin Barker, Mar 22 2013: (Start)
a(n) = 3*a(n-1) - 2*a(n-2) for n > 2.
G.f.: -(x^2+3*x-2) / ((x-1)*(2*x-1)). (End)
E.g.f.: exp(x)*(2 + sinh(x)). - Stefano Spezia, Oct 19 2023

A010124 Continued fraction for sqrt(19).

Original entry on oeis.org

4, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1, 3, 1, 2, 8, 2, 1
Offset: 0

Views

Author

Keywords

Examples

			4.358898943540673552236981983... = 4 + 1/(2 + 1/(1 + 1/(3 + 1/(1 + ...)))). - _Harry J. Smith_, Jun 03 2009
		

References

  • James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 1999, page 276.

Crossrefs

Cf. A041028/A041029 (convergents).
Cf. A010475 (decimal expansion).

Programs

  • Mathematica
    ContinuedFraction[Sqrt[19],300] (* Vladimir Joseph Stephan Orlovsky, Mar 05 2011 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 17000); x=contfrac(sqrt(19)); for (n=0, 20000, write("b010124.txt", n, " ", x[n+1])); } \\ Harry J. Smith, Jun 03 2009

Formula

G.f.: (4 + 2*x + x^2 + 3*x^3 + x^4 + 2*x^5 + 4*x^6)/(1 - x^6). - Stefano Spezia, Jul 26 2025
Showing 1-10 of 28 results. Next