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

A109169 Decimal expansion of constant x such that the continued fraction expansion of 2*x (A109170) yields the continued fraction expansion of x (A109168) interleaved with positive even numbers.

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, Jun 21 2005

Keywords

Examples

			x=1.408494279228906985748474279080697991613998955782051281466263817524862977...
The continued fraction expansion of x = A109168:
[1; 2, 2, 4, 3, 4, 4, 8, 5, 6, 6, 8, 7, 8, 8, 16, ...];
the continued fraction expansion of 2*x = A109170:
[2;1, 4,2, 6,2, 8,4, 10,3, 12,4, 14,4, 16,8, 18,5, ...]
which equals the continued fraction of x interleaved with even numbers.
		

Crossrefs

Cf. A109168 (continued fraction of x), A109170 (continued fraction of 2*x), A109171 (digits of 2*x).

Programs

  • PARI
    {PQ(n)=if(n%2==1,(n+1)/2,2*PQ(n/2))}
    {CFM=contfracpnqn(vector(500,n,PQ(n))); CFM[1,1]/CFM[2,1]*1.0}

A109171 Decimal expansion of 2*x, where constant x (A109169) satisfies the condition that the continued fraction expansion of 2*x (A109170) is equal to the continued fraction expansion of x (A109168) interleaved with positive even numbers.

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, Jun 21 2005

Keywords

Examples

			2*x=2.8169885584578139714969485581613959832279979115641025629325276350497259...
The continued fraction expansion of x = A109168:
[1; 2, 2, 4, 3, 4, 4, 8, 5, 6, 6, 8, 7, 8, 8, 16, ...];
the continued fraction expansion of 2*x = A109170:
[2;1, 4,2, 6,2, 8,4, 10,3, 12,4, 14,4, 16,8, 18,5, ...]
which equals the continued fraction of x interleaved with even numbers.
		

Crossrefs

Cf. A109168 (continued fraction of x), A109169 (digits of x), A109170 (continued fraction of 2*x).

Programs

  • PARI
    {PQ(n)=if(n%2==1,(n+1)/2,2*PQ(n/2))}
    {CFM=contfracpnqn(vector(500,n,PQ(n))); x2=CFM[1,1]/CFM[2,1]*2.0}

A109168 Continued fraction expansion of the constant x (A109169) such that the continued fraction of 2*x yields the continued fraction of x interleaved with the positive even numbers.

Original entry on oeis.org

1, 2, 2, 4, 3, 4, 4, 8, 5, 6, 6, 8, 7, 8, 8, 16, 9, 10, 10, 12, 11, 12, 12, 16, 13, 14, 14, 16, 15, 16, 16, 32, 17, 18, 18, 20, 19, 20, 20, 24, 21, 22, 22, 24, 23, 24, 24, 32, 25, 26, 26, 28, 27, 28, 28, 32, 29, 30, 30, 32, 31, 32, 32, 64, 33, 34, 34, 36, 35, 36, 36, 40, 37, 38, 38
Offset: 1

Views

Author

Paul D. Hanna, Jun 21 2005

Keywords

Comments

Compare with continued fraction A100338.
The sequence is equal to the sequence of positive integers (1, 2, 3, 4, ...) interleaved with the sequence multiplied by two, 2*(1, 2, 2, 4, 3, ...) = (2, 4, 4, 8, 6, ...): see the first formula. - M. F. Hasler, Oct 19 2019

Examples

			x=1.408494279228906985748474279080697991613998955782051281466263817524862977...
The continued fraction expansion of 2*x = A109170:
[2;1, 4,2, 6,2, 8,4, 10,3, 12,4, 14,4, 16,8, 18,5, ...]
which equals the continued fraction of x interleaved with the even numbers.
		

Crossrefs

Cf. A109169 (digits of x), A109170 (continued fraction of 2*x), A109171 (digits of 2*x).
Cf. A006519 and A129760. [Johannes W. Meijer, Jun 22 2011]
Half the terms of A285326.

Programs

  • Maple
    nmax:=75; pmax:= ceil(log(nmax)/log(2)); for p from 0 to pmax do for n from 1 to nmax do a((2*n-1)*2^p):= n*2^p: od: od: seq(a(n), n=1..nmax); # Johannes W. Meijer, Jun 22 2011
  • PARI
    a(n)=if(n%2==1,(n+1)/2,2*a(n/2))
    
  • PARI
    A109168(n)=(n+bitand(n,-n))\2 \\ M. F. Hasler, Oct 19 2019
  • Scheme
    ;; With memoization-macro definec
    (definec (A109168 n) (if (zero? n) n (if (odd? n) (/ (+ 1 n) 2) (* 2 (A109168 (/ n 2))))))
    ;; Antti Karttunen, Apr 19 2017
    

Formula

a(2*n-1) = n, a(2*n) = 2*a(n) for all n >= 1.
a((2*n-1)*2^p) = n * 2^p, p >= 0. - Johannes W. Meijer, Jun 22 2011
a(n) = n - (n AND n-1)/2. - Gary Detlefs, Jul 10 2014
a(n) = A285326(n)/2. - Antti Karttunen, Apr 19 2017
a(n) = A140472(n). - M. F. Hasler, Oct 19 2019
Showing 1-3 of 3 results.