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

A119813 Partial quotients of the continued fraction of the constant A119812 defined by binary sums involving Beatty sequences: c = Sum_{n>=1} A049472(n)/2^n = Sum_{n>=1} 1/2^A001951(n).

Original entry on oeis.org

0, 1, 6, 18, 1032, 16777344, 288230376151842816, 1393796574908163946345982392042721617379328
Offset: 1

Views

Author

Paul D. Hanna, May 26 2006

Keywords

Comments

Convergents begin: [0/1, 1/1, 6/7, 109/127, 112494/131071,...], where the denominators of the convergents are equal to [2^A001333(n-1)-1], where A001333 are numerators of continued fraction convergents to sqrt(2). The number of digits in these partial quotients are (beginning at n=2): [1,1,2,4,8,18,43,102,246,594,1432,3457,8345,20146,48636,117417,...].

Examples

			c = 0.858267656461002055792260308433375148664905190083506778667684867..
The partial quotients start:
a(1) = 0; a(2) = 1; a(3) = 4^1 + 2^1; a(4) = 4^2 + 2^1;
a(5) = 4^5 + 2^3; a(6) = 4^12 + 2^7; a(7) = 4^29 + 2^17;
and continue as a(n) = 4^A000129(n-2) + 2^A001333(n-3) where
A000129(n) = ( (1+sqrt(2))^n - (1-sqrt(2))^n )/(2*sqrt(2));
A001333(n) = ( (1+sqrt(2))^n + (1-sqrt(2))^n )/2.
		

Crossrefs

Cf. A119812 (constant), A119814 (convergents); A119809 (dual constant).

Programs

  • PARI
    {a(n)=if(n==1,0,if(n==2,1, 4^round(((1+sqrt(2))^(n-2)+(1-sqrt(2))^(n-2))/(2*sqrt(2))) +if(n==3,2,2^round(((1+sqrt(2))^(n-3)-(1-sqrt(2))^(n-3))/2))))}

Formula

a(n) = 4^A000129(n-2) + 2^A001333(n-3) for n>2, with a(1)=0, a(2)=1.

A119814 Numerators of the convergents to the continued fraction for the constant A119812 defined by binary sums involving Beatty sequences: c = Sum_{n>=1} A049472(n)/2^n = Sum_{n>=1} 1/2^A001951(n).

Original entry on oeis.org

0, 1, 6, 109, 112494, 1887350536045, 543991754934632523092182415214, 758213844806172103575972149363453352380811718063209070444420739586832237
Offset: 1

Views

Author

Paul D. Hanna, May 26 2006

Keywords

Comments

The number of digits in these numerators are (beginning at n=2): [1,1,3,6,13,30,72,174,420,1013,2444,5901,14245,34391,83027,...].

Examples

			c = 0.858267656461002055792260308433375148664905190083506778667684867..
Convergents begin:
[0/1, 1/1, 6/7, 109/127, 112494/131071, 1887350536045/2199023255551,..]
where the denominators of the convergents equal [2^A001333(n-1)-1]:
[1,1,7,127,131071,2199023255551,633825300114114700748351602687,...]
and A001333 is numerators of continued fraction convergents to sqrt(2).
		

Crossrefs

Cf. A119812 (constant), A119813 (continued fraction), A001333; A119809 (dual constant).

Programs

  • PARI
    {a(n)=local(M=contfracpnqn(vector(n,k,if(k==1,0,if(k==2,1, 4^round(((1+sqrt(2))^(k-2)+(1-sqrt(2))^(k-2))/(2*sqrt(2))) +if(k==3,2,2^round(((1+sqrt(2))^(k-3)-(1-sqrt(2))^(k-3))/2))))))); return(M[1,1])}

A080764 First differences of A049472, floor(n/sqrt(2)).

Original entry on oeis.org

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

Views

Author

Matthew Vandermast, Mar 25 2003

Keywords

Comments

Fixed point of the morphism 0->1, 1->110. - Benoit Cloitre, May 31 2004
As binary constant 0.1101101110110... = 0.85826765646... (A119812), see Fxtbook link. - Joerg Arndt, May 15 2011
Characteristic word with slope 1/sqrt(2) [see J. L. Ramirez et al.]. - R. J. Mathar, Jul 09 2013
From Peter Bala, Nov 22 2013: (Start)
Sturmian word: equals the limit word S(infinity) where S(0) = 0, S(1) = 1 and for n >= 1, S(n+1) = S(n)S(n)S(n-1).
More generally, for k = 0,1,2,..., we can define a sequence of words S_k(n) by S_k(0) = 0, S_k(1) = 0...01 (k 0's) and for n >= 1, S_k(n+1) = S_k(n)S_k(n)S_k(n-1). Then the limit word S_k(infinity) is a Sturmian word whose terms are given by a(n) = floor((n + 2)/(k + sqrt(2))) - floor((n + 1)/(k + sqrt(2))).
This sequence corresponds to the case k = 0. See A159684 (case k = 1) and A171588 (case k = 2). Compare with the Fibonacci words A005614, A221150, A221151 and A221152. See also A230901. (End)
For n > 0: a(A001951(n)) = 1, a(A001952(n)) = 0. - Reinhard Zumkeller, Jul 03 2015
Binary complement of the Pell word A171588. - Michel Dekking, Feb 22 2018

Examples

			From _Peter Bala_, Nov 22 2013: (Start)
The first few Sturmian words S(n) are
S(0) = 0
S(1) = 1
S(2) = 110
S(3) = 110 110 1
S(4) = 1101101 1101101 110
S(5) = 11011011101101110 11011011101101110 1101101
The lengths of the words are [1, 1, 3, 7, 17, 41, ...] = A001333.  (End)
		

Crossrefs

Programs

  • Haskell
    a080764 n = a080764_list !! n
    a080764_list = tail $ zipWith (-) (tail a049472_list) a049472_list
    -- Reinhard Zumkeller, Jul 03 2015
    
  • Maple
    A080764 := proc(n)
        alpha := 1/sqrt(2) ;
        floor((n+2)*alpha)-floor((n+1)*alpha) ;
    end proc: # R. J. Mathar, Jul 09 2013
  • Mathematica
    Nest[ Flatten[ # /. {0 -> 1, 1 -> {1, 1, 0}}] &, {1}, 7] (* Robert G. Wilson v, Apr 16 2005 *)
    NestList[ Flatten[ # /. {0 -> {1}, 1 -> {1, 0, 1}}] &, {1}, 5] // Flatten (* or *)
    t = Table[Floor[n/Sqrt[2]], {n, 111}]; Drop[t, 1] - Drop[t, -1] (* Robert G. Wilson v, Nov 03 2005 *)
    a[ n_] := With[{m = n + 1}, Floor[(m + 1) / Sqrt[2]] - Floor[m / Sqrt[2]]]; (* Michael Somos, Aug 19 2018 *)
  • PARI
    {a(n) = n++; my(k = sqrtint(n*n\2)); n*(n+2) > 2*k*(k+2)}; /* Michael Somos, Aug 19 2018 */
    
  • Python
    from math import isqrt
    def A080764(n): return (isqrt((m:=(n+2)**2)<<1)>>1)-(isqrt(m-(n<<1)-3<<1)>>1) # Chai Wah Wu, May 19 2025

Formula

a(n) = floor((n+2)*sqrt(2)/2) - floor((n+1)*sqrt(2)/2).
a(n) = A188295(n+2) for all n in Z. - Michael Somos, Aug 19 2018

A159684 Sturmian word: limit S(infinity) where S(0) = 0, S(1) = 0,1 and for n>=1, S(n+1) = S(n)S(n)S(n-1).

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Apr 19 2009

Keywords

Comments

Fixed point of morphism 0 -> 0,1; 1 -> 0,1,0.
This sequence corresponds to the case k = 1 of the Sturmian word S_k(infinity) as defined in A080764. See A171588 for the case k = 2. - Peter Bala, Nov 22 2013
This sequence is the {1->01}-transform of the Sturmian word A080764. - Clark Kimberling, May 17 2017
Also, sequence (1 if x/sqrt(2) is integer, 0 else) as x runs over the elements of N U N*sqrt(2) in increasing order, N = {0, 1, 2, ...}. See A144612 for the sqrt(3) analog. - M. F. Hasler, Feb 06 2025

Examples

			0 -> 0,1 -> 0,1,0,1,0 -> 0,1,0,1,0,0,1,0,1,0,0,1 ->...
		

Crossrefs

See A188037 for another version of this sequence. - N. J. A. Sloane, Mar 22 2011
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A003151 as the parent: A003151, A001951, A001952, A003152, A006337, A080763, A082844 (conjectured), A097509, A159684, A188037, A245219 (conjectured), A276862. - N. J. A. Sloane, Mar 09 2021

Programs

  • Haskell
    a159684 n = a159684_list !! n
    a159684_list = 0 : concat (iterate (concatMap s) [1])
       where s 0 = [0,1]; s 1 = [0,1,0]
    -- Reinhard Zumkeller, Oct 26 2013
    
  • Mathematica
    Nest[ Flatten[ # /. {0 -> {0, 1}, 1 -> {0, 1, 0}}] &, {1}, 6] (* Robert G. Wilson v, May 02 2009 *)
    SubstitutionSystem[{0->{0,1},1->{0,1,0}},{1},{6}][[1]] (* Harvey P. Dale, Dec 25 2021 *)
  • Python
    def aupto(nn):
        Snm1, Sn = [0], [0, 1]
        while len(Sn) < nn+1: Snm1, Sn = Sn, Sn + Sn + Snm1
        return Sn[:nn+1]
    print(aupto(104)) # Michael S. Branicky, Jul 23 2022
    
  • Python
    from math import isqrt
    def A159684(n): return -isqrt(m:=(n+1)**2<<1)+isqrt(m+(n<<2)+6)-1 # Chai Wah Wu, Aug 03 2022

Formula

From Peter Bala, Nov 22 2013: (Start)
a(n) = floor((n + 2)*(sqrt(2) - 1)) - floor((n + 1)*(sqrt(2) - 1)).
If we read the sequence as the decimal constant C = 0.01010 01010 01010 10010 10010 ... then C = sum {n >= 1} 1/10^floor(n*(1 + sqrt(2))).
The real number 9*C has the simple continued fraction expansion [0; 11, 1010, 10000100, 100000000000100000, 100000000000000000000000000001000000000000, ...], the partial quotients having the form 10^Pell(n)*(1 + 10^Pell(n+1)) = 10^A001333(n+1) + 10^A000129(n) (see Adams and Davison).
A rapidly converging series for C is C = 9*sum {n >= 1} 10^Pell(2*n-1)*(1 + 10^Pell(2*n))/( (10^Pell(2*n-1) - 1)*(10^Pell(2*n+1) - 1) ): for example, the first 10 terms of the series give a rational approximation to C accurate to more than 130 million decimal places. Compare with the Fibonacci words A005614 and A221150. (End)

Extensions

More terms from Robert G. Wilson v, May 02 2009

A014565 Decimal expansion of rabbit constant.

Original entry on oeis.org

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

Views

Author

Eric W. Weisstein, Dec 11 1999

Keywords

Comments

Davison shows that the continued fraction is (essentially) A000301 and proves that this constant is transcendental. - Charles R Greathouse IV, Jul 22 2013
Using Davison's result we can find an alternating series representation for the rabbit constant r as r = 1 - sum {n >= 1} (-1)^(n+1)*(1 + 2^Fibonacci(3*n+1))/( (2^(Fibonacci(3*n - 1)) - 1)*(2^(Fibonacci(3*n + 2)) - 1) ). The series converges rapidly: for example, the first 10 terms of the series give a value for r accurate to more than 1.7 million decimal places. See A005614. - Peter Bala, Nov 11 2013
The rabbit constant is the number having the infinite Fibonacci word A005614 as binary expansion; its continued fraction expansion is A000301 = 2^A000045 (after a leading zero, depending on convention). - M. F. Hasler, Nov 10 2018

Examples

			0.709803442861291314641787399444575597012502205767...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, p. 439.
  • M. Schroeder, Fractals, Chaos, Power Laws: Minutes from an Infinite Paradise, New York: W. H. Freeman, 1991.

Crossrefs

Programs

  • Mathematica
    Take[ RealDigits[ Sum[N[1/2^Floor[k*GoldenRatio], 120], {k, 0, 300}]-1][[1]], 103] (* Jean-François Alcover, Jul 28 2011, after Benoit Cloitre *)
    RealDigits[ FromDigits[{Nest[Flatten[# /. {0 -> {1}, 1 -> {1, 0}}] &, {1}, 12], 0}, 2], 10, 111][[1]] (* Robert G. Wilson v, Mar 13 2014 *)
    digits = 103; dm = 10; Clear[xi]; xi[b_, m_] := xi[b, m] = RealDigits[ ContinuedFractionK[1, b^Fibonacci[k], {k, 0, m}], 10, digits] // First; xi[2, dm]; xi[2, m = 2 dm]; While[xi[2, m] != xi[2, m - dm], m = m + dm]; xi[2, m] (* Jean-François Alcover, Mar 04 2015, update for versions 7 and up, after advice from Oleg Marichev *)
  • PARI
    /* fast divisionless routine from fxtbook */
    fa(y, N=17)=
    { my(t, yl, yr, L, R, Lp, Rp);
    /* as powerseries correct up to order fib(N+2)-1 */
      L=0; R=1; yl=1; yr=y;
      for(k=1, N, t=yr; yr*=yl; yl=t; Lp=R; Rp=R+yr*L; L=Lp; R=Rp; );
      return( R )
    }
    a=0.5*fa(0.5) /* Joerg Arndt, Apr 15 2010 */
    
  • PARI
    my(r=1,p=(3-sqrt(5))/2,n=1);while(r>r-=1.>>(n\p),n++);A014565=r \\ M. F. Hasler, Nov 10 2018
    
  • PARI
    my(f(n)=1.<A098317 (=> 298, 1259, 5331, ... digits). - M. F. Hasler, Nov 10 2018

Formula

Equals Sum_{n>=1} 1/2^b(n) where b(n) = floor(n*phi) = A000201(n).
Equals -1 + A073115.
From Peter Bala, Nov 04 2013: (Start)
The results of Adams and Davison 1977 can be used to find a variety of alternative series representations for the rabbit constant r. Here are several examples (phi denotes the golden ratio (1/2)*(1 + sqrt(5))).
r = Sum_{n >= 2} ( floor((n+1)*phi) - floor(n*phi) )/2^n = (1/2)*Sum_{n >= 1} A014675(n)/2^n.
r = Sum_{n >= 1} floor(n/phi)/2^n = Sum_{n >= 1} A005206(n-1)/2^n.
r = ( Sum_{n >= 1} 1/2^floor(n/phi) ) - 2 and r = ( Sum_{n >= 1} floor(n*phi)/2^n ) - 2 = ( Sum_{n >= 1} A000201(n)/2^n ) - 2.
More generally, for integer N >= -1, r = ( Sum_{n >= 1} 1/2^floor(n/(phi + N)) ) - (2*N + 2) and for all integer N, r = ( Sum_{n >= 1} floor(n*(phi + N))/2^n ) - (2*N + 2).
Also r = 1 - Sum_{n >= 1} 1/2^floor(n*phi^2) = 1 - Sum_{n >= 1} 1/2^A001950(n) and r = 1 - Sum_{n >= 1} floor(n*(2 - phi))/2^n = 1 - Sum_{n >= 1} A060144(n)/2^n. (End)

Extensions

More terms from Simon Plouffe, Dec 11 1999

A119809 Decimal expansion of the constant defined by binary sums involving Beatty sequences: c = Sum_{n>=1} 1/2^A049472(n) = Sum_{n>=1} A001951(n)/2^n.

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, May 26 2006

Keywords

Comments

Dual constant: A119812 = Sum_{n>=1} A049472(n)/2^n = Sum_{n>=1} 1/2^A001951(n). Since this constant c = 2 + Sum_{n>=1} 1/2^A003151(n), where A003151(n) = n + floor(n*sqrt(2)), then the binary expansion of the fractional part of c has 1's only at positions given by Beatty sequence A003151(n) and zeros elsewhere. Plouffe's Inverter describes approximations to the fractional part of c as "polylogarithms type of series with the floor function [ ]."

Examples

			c = 2.32258852258806773012144068278798408011950250800432925665718...
Continued fraction (A119810):
c = [2;3,10,132,131104,2199023259648,633825300114114700748888473600,..]
where partial quotients are given by:
PQ(n) = 2^A001333(n-1) + 2^A000129(n-2) (n>1), with PQ(1)=2.
The following are equivalent expressions for the constant:
(1) Sum_{n>=1} 1/2^A049472(n); A049472(n)=[n/sqrt(2)];
(2) Sum_{n>=1} A001951(n)/2^n; A001951(n)=[n*sqrt(2)];
(3) Sum_{n>=1} 1/2^A003151(n) + 2; A003151(n)=[n*sqrt(2)]+n;
(4) Sum_{n>=1} 1/2^A097508(n) - 2; A097508(n)=[n*sqrt(2)]-n;
(5) Sum_{n>=1} A006337(n)/2^n + 1; A006337(n)=[(n+1)*sqrt(2)]-[n*sqrt(2)];
where [x] = floor(x).
These series illustrate the above expressions:
(1) c = 1/2^0 + 1/2^1 + 1/2^2 + 1/2^2 + 1/2^3 + 1/2^4 + 1/2^4 +...
(2) c = 1/2^1 + 2/2^2 + 4/2^3 + 5/2^4 + 7/2^5 + 8/2^6 + 9/2^7 +...
(3) c = 2 + 1/2^2 + 1/2^4 + 1/2^7 + 1/2^9 + 1/2^12 + 1/2^14 +...
(4) c =-2 + 1/2^0 + 1/2^0 + 1/2^1 + 1/2^1 + 1/2^2 + 1/2^2 + 1/2^2 +...
(5) c = 1 + 1/2^1 + 2/2^2 + 1/2^3 + 2/2^4 + 1/2^5 + 1/2^6 + 2/2^7 +...
		

Crossrefs

Cf. A119810 (continued fraction), A119811 (convergents); A119812 (dual constant); A000129 (Pell), A001333; Beatty sequences: A049472, A001951, A003151, A097508, A006337; variants: A014565 (rabbit constant), A073115.

Programs

  • PARI
    {a(n)=local(t=sqrt(2),x=sum(m=1,10*n,floor(m*t)/2^m));floor(10^n*x)%10}

Formula

Equals Sum(1/(2^q-1)) with the summation extending over all pairs of integers gcd(p,q) = 1, 0 < p/q < sqrt(2) (O'Bryant, 2002). - Amiram Eldar, May 25 2023

A119811 Numerators of the convergents to the continued fraction for the constant A119809 defined by binary sums involving Beatty sequences: c = Sum_{n>=1} 1/2^A049472(n) = Sum_{n>=1} A001951(n)/2^n.

Original entry on oeis.org

2, 7, 72, 9511, 1246930216, 2742028548141904733479, 1737967067447512977484869808775151193351704374584616
Offset: 1

Views

Author

Paul D. Hanna, May 26 2006

Keywords

Comments

The number of digits in these numerators are (beginning at n=1): [1,1,2,4,10,22,52,124,297,717,1729,4173,10074,24319,58709,141735,..].

Examples

			c = 2.32258852258806773012144068278798408011950250800432925665718...
Convergents begin:
[2/1, 7/3, 72/31, 9511/4095, 1246930216/536870911,...]
where the denominators of the convergents equal [2^A000129(n-1)-1]:
[1,3,31,4095,536870911,1180591620717411303423,...],
and A000129 is the Pell numbers.
		

Crossrefs

Cf. A119809 (constant), A119811 (continued fraction), A000129; A119812 (dual constant).

Programs

  • PARI
    {a(n)=local(M=contfracpnqn(vector(n,k,if(k==1,2, 2^round(((1+sqrt(2))^(k-1)+(1-sqrt(2))^(k-1))/2) +2^round(((1+sqrt(2))^(k-2)-(1-sqrt(2))^(k-2))/(2*sqrt(2))))))); return(M[1,1])}

A119810 Partial quotients of the continued fraction of the constant defined by binary sums involving Beatty sequences: c = Sum_{n>=1} 1/2^A049472(n) = Sum_{n>=1} A001951(n)/2^n.

Original entry on oeis.org

2, 3, 10, 132, 131104, 2199023259648, 633825300114114700748888473600, 883423532389192164791648750371459257913741948437810659652423818057613312
Offset: 1

Views

Author

Paul D. Hanna, May 26 2006

Keywords

Comments

Convergents A119811: [2/1,7/3,72/31,9511/4095,1246930216/536870911,...], where the denominators of the convergents are equal to [2^A000129(n-1)-1] and A000129 is the Pell numbers. The number of digits in these partial quotients are (beginning at n=1): [1,1,2,3,6,13,30,72,174,420,1013,2445,5901,14246,34391,83027,...].

Examples

			c = 2.32258852258806773012144068278798408011950250800432925665718...
The partial quotients start:
a(1) = 2^1; a(2) = 2^1 + 2^0; a(3) = 2^3 + 2^1;
a(4) = 2^7 + 2^2; a(5) = 2^17 + 2^5; a(6) = 2^41 + 2^12;
and continue as a(n) = 2^A001333(n-1) + 2^A000129(n-2) where
A001333(n) = ( (1+sqrt(2))^n + (1-sqrt(2))^n )/2;
A000129(n) = ( (1+sqrt(2))^n - (1-sqrt(2))^n )/(2*sqrt(2)).
		

Crossrefs

Cf. A119809 (decimal expansion), A119811 (convergents); A119812 (dual constant).

Programs

  • Mathematica
    (* b = A001333 *) b[0] = 1; b[1] = 1; b[n_] := b[n] = 2 b[n-1] + b[n-2]; a[1] = 2; a[n_] := 2^b[n-1] + 2^Fibonacci[n-2, 2]; Array[a, 10] (* Jean-François Alcover, May 04 2017 *)
  • PARI
    {a(n)=if(n==1,2,2^round(((1+sqrt(2))^(n-1)+(1-sqrt(2))^(n-1))/2) +2^round(((1+sqrt(2))^(n-2)-(1-sqrt(2))^(n-2))/(2*sqrt(2))))}

Formula

a(n) = 2^A001333(n-1) + 2^A000129(n-2) for n>1, with a(1)=2.
Showing 1-8 of 8 results.