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 14 results. Next

A095725 Where records occur in numerators of Kepler's tree of harmonic fractions (A093873).

Original entry on oeis.org

1, 5, 9, 17, 21, 37, 45, 69, 73, 77, 85, 93, 141, 149, 157, 173, 189, 277, 285, 297, 301, 317, 349, 381, 557, 573, 597, 605, 637, 701, 765, 1117, 1149, 1197, 1213, 1277, 1405, 1533, 2237, 2301, 2389, 2397, 2429, 2557, 2813, 3069, 4477, 4605, 4797, 4861, 5117
Offset: 1

Views

Author

John W. Layman, Jun 04 2004

Keywords

Comments

See A095726 for location of records in denominators of Kepler's tree.

Crossrefs

A011782 Coefficients of expansion of (1-x)/(1-2*x) in powers of x.

Original entry on oeis.org

1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592
Offset: 0

Views

Author

Lee D. Killough (killough(AT)wagner.convex.com)

Keywords

Comments

Apart from initial term, same as A000079 (powers of 2).
Number of compositions (ordered partitions) of n. - Toby Bartels, Aug 27 2003
Number of ways of putting n unlabeled items into (any number of) labeled boxes where every box contains at least one item. Also "unimodal permutations of n items", i.e., those which rise then fall. (E.g., for three items: ABC, ACB, BCA and CBA are unimodal.) - Henry Bottomley, Jan 17 2001
Number of permutations in S_n avoiding the patterns 213 and 312. - Tuwani Albert Tshifhumulo, Apr 20 2001. More generally (see Simion and Schmidt), the number of permutations in S_n avoiding (i) the 123 and 132 patterns; (ii) the 123 and 213 patterns; (iii) the 132 and 213 patterns; (iv) the 132 and 231 patterns; (v) the 132 and 312 patterns; (vi) the 213 and 231 patterns; (vii) the 213 and 312 patterns; (viii) the 231 and 312 patterns; (ix) the 231 and 321 patterns; (x) the 312 and 321 patterns.
a(n+2) is the number of distinct Boolean functions of n variables under action of symmetric group.
Number of unlabeled (1+2)-free posets. - Detlef Pauly, May 25 2003
Image of the central binomial coefficients A000984 under the Riordan array ((1-x), x*(1-x)). - Paul Barry, Mar 18 2005
Binomial transform of (1, 0, 1, 0, 1, 0, 1, 0, 1, 0, ...); inverse binomial transform of A007051. - Philippe Deléham, Jul 04 2005
Also, number of rationals in [0, 1) whose binary expansions terminate after n bits. - Brad Chalfan, May 29 2006
Equals row sums of triangle A144157. - Gary W. Adamson, Sep 12 2008
Prepend A089067 with a 1, getting (1, 1, 3, 5, 13, 23, 51, ...) as polcoeff A(x); then (1, 1, 2, 4, 8, 16, ...) = A(x)/A(x^2). - Gary W. Adamson, Feb 18 2010
An elephant sequence, see A175655. For the central square four A[5] vectors, with decimal values 2, 8, 32 and 128, lead to this sequence. For the corner squares these vectors lead to the companion sequence A094373. - Johannes W. Meijer, Aug 15 2010
From Paul Curtz, Jul 20 2011: (Start)
Array T(m,n) = 2*T(m,n-1) + T(m-1,n):
1, 1, 2, 4, 8, 16, ... = a(n)
1, 3, 8, 20, 48, 112, ... = A001792,
1, 5, 18, 56, 160, 432, ... = A001793,
1, 7, 32, 120, 400, 1232, ... = A001794,
1, 9, 50, 220, 840, 2912, ... = A006974, followed with A006975, A006976, gives nonzero coefficients of Chebyshev polynomials of first kind A039991 =
1,
1, 0,
2, 0, -1,
4, 0, -3, 0,
8, 0, -8, 0, 1.
T(m,n) third vertical: 2*n^2, n positive (A001105).
Fourth vertical appears in Janet table even rows, last vertical (A168342 array, A138509, rank 3, 13, = A166911)). (End)
A131577(n) and differences are:
0, 1, 2, 4, 8, 16,
1, 1, 2, 4, 8, 16, = a(n),
0, 1, 2, 4, 8, 16,
1, 1, 2, 4, 8, 16.
Number of 2-color necklaces of length 2n equal to their complemented reversal. For length 2n+1, the number is 0. - David W. Wilson, Jan 01 2012
Edges and also central terms of triangle A198069: a(0) = A198069(0,0) and for n > 0: a(n) = A198069(n,0) = A198069(n,2^n) = A198069(n,2^(n-1)). - Reinhard Zumkeller, May 26 2013
These could be called the composition numbers (see the second comment) since the equivalent sequence for partitions is A000041, the partition numbers. - Omar E. Pol, Aug 28 2013
Number of self conjugate integer partitions with exactly n parts for n>=1. - David Christopher, Aug 18 2014
The sequence is the INVERT transform of (1, 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ...). - Gary W. Adamson, Jul 16 2015
Number of threshold graphs on n nodes [Hougardy]. - Falk Hüffner, Dec 03 2015
Number of ternary words of length n in which binary subwords appear in the form 10...0. - Milan Janjic, Jan 25 2017
a(n) is the number of words of length n over an alphabet of two letters, of which one letter appears an even number of times (the empty word of length 0 is included). See the analogous odd number case in A131577, and the Balakrishnan reference in A006516 (the 4-letter odd case), pp. 68-69, problems 2.66, 2.67 and 2.68. - Wolfdieter Lang, Jul 17 2017
Number of D-equivalence classes of Łukasiewicz paths. Łukasiewicz paths are D-equivalent iff the positions of pattern D are identical in these paths. - Sergey Kirgizov, Apr 08 2018
Number of color patterns (set partitions) for an oriented row of length n using two or fewer colors (subsets). Two color patterns are equivalent if we permute the colors. For a(4)=8, the 4 achiral patterns are AAAA, AABB, ABAB, and ABBA; the 4 chiral patterns are the 2 pairs AAAB-ABBB and AABA-ABAA. - Robert A. Russell, Oct 30 2018
The determinant of the symmetric n X n matrix M defined by M(i,j) = (-1)^max(i,j) for 1 <= i,j <= n is equal to a(n) * (-1)^(n*(n+1)/2). - Bernard Schott, Dec 29 2018
For n>=1, a(n) is the number of permutations of length n whose cyclic representations can be written in such a way that when the cycle parentheses are removed what remains is 1 through n in natural order. For example, a(4)=8 since there are exactly 8 permutations of this form, namely, (1 2 3 4), (1)(2 3 4), (1 2)(3 4), (1 2 3)(4), (1)(2)(3 4), (1)(2 3)(4), (1 2)(3)(4), and (1)(2)(3)(4). Our result follows readily by conditioning on k, the number of parentheses pairs of the form ")(" in the cyclic representation. Since there are C(n-1,k) ways to insert these in the cyclic representation and since k runs from 0 to n-1, we obtain a(n) = Sum_{k=0..n-1} C(n-1,k) = 2^(n-1). - Dennis P. Walsh, May 23 2020
Maximum number of preimages that a permutation of length n + 1 can have under the consecutive-231-avoiding stack-sorting map. - Colin Defant, Aug 28 2020
a(n) is the number of occurrences of the empty set {} in the von Neumann ordinals from 0 up to n. Each ordinal k is defined as the set of all smaller ordinals: 0 = {}, 1 = {0}, 2 = {0,1}, etc. Since {} is the foundational element of all ordinals, the total number of times it appears grows as powers of 2. - Kyle Wyonch, Mar 30 2025

Examples

			G.f. = 1 + x + 2*x^2 + 4*x^3 + 8*x^4 + 16*x^5 + 32*x^6 + 64*x^7 + 128*x^8 + ...
    ( -1   1  -1)
det (  1   1   1)  = 4
    ( -1  -1  -1)
		

References

  • Mohammad K. Azarian, A Generalization of the Climbing Stairs Problem, Mathematics and Computer Education Journal, Vol. 31, No. 1, pp. 24-28, Winter 1997.
  • S. Kitaev, Patterns in Permutations and Words, Springer-Verlag, 2011. see p. 399 Table A.7
  • Xavier Merlin, Methodix Algèbre, Ellipses, 1995, p. 153.

Crossrefs

Sequences with g.f.'s of the form ((1-x)/(1-2*x))^k: this sequence (k=1), A045623 (k=2), A058396 (k=3), A062109 (k=4), A169792 (k=5), A169793 (k=6), A169794 (k=7), A169795 (k=8), A169796 (k=9), A169797 (k=10).
Cf. A005418 (unoriented), A122746(n-3) (chiral), A016116 (achiral).
Row sums of triangle A100257.
A row of A160232.
Row 2 of A278984.

Programs

  • Haskell
    a011782 n = a011782_list !! n
    a011782_list = 1 : scanl1 (+) a011782_list
    -- Reinhard Zumkeller, Jul 21 2013
    
  • Magma
    [Floor((1+2^n)/2): n in [0..35]]; // Vincenzo Librandi, Aug 21 2011
    
  • Maple
    A011782:= n-> ceil(2^(n-1)): seq(A011782(n), n=0..50); # Wesley Ivan Hurt, Feb 21 2015
    with(PolynomialTools):  A011782:=seq(coeftayl((1-x)/(1-2*x), x = 0, k),k=0..10^2); # Muniru A Asiru, Sep 26 2017
  • Mathematica
    f[s_] := Append[s, Ceiling[Plus @@ s]]; Nest[f, {1}, 32] (* Robert G. Wilson v, Jul 07 2006 *)
    CoefficientList[ Series[(1-x)/(1-2x), {x, 0, 32}], x] (* Robert G. Wilson v, Jul 07 2006 *)
    Table[Sum[StirlingS2[n, k], {k,0,2}], {n, 0, 30}] (* Robert A. Russell, Apr 25 2018 *)
    Join[{1},NestList[2#&,1,40]] (* Harvey P. Dale, Dec 06 2018 *)
  • PARI
    {a(n) = if( n<1, n==0, 2^(n-1))};
    
  • PARI
    Vec((1-x)/(1-2*x) + O(x^30)) \\ Altug Alkan, Oct 31 2015
    
  • Python
    def A011782(n): return 1 if n == 0 else 2**(n-1) # Chai Wah Wu, May 11 2022
  • Sage
    [sum(stirling_number2(n,j) for j in (0..2)) for n in (0..35)] # G. C. Greubel, Jun 02 2020
    

Formula

a(0) = 1, a(n) = 2^(n-1).
G.f.: (1 - x) / (1 - 2*x) = 1 / (1 - x / (1 - x)). - Michael Somos, Apr 18 2012
E.g.f.: cosh(z)*exp(z) = (exp(2*z) + 1)/2.
a(0) = 1 and for n>0, a(n) = sum of all previous terms.
a(n) = Sum_{k=0..n} binomial(n, 2*k). - Paul Barry, Feb 25 2003
a(n) = Sum_{k=0..n} binomial(n,k)*(1+(-1)^k)/2. - Paul Barry, May 27 2003
a(n) = floor((1+2^n)/2). - Toby Bartels (toby+sloane(AT)math.ucr.edu), Aug 27 2003
G.f.: Sum_{i>=0} x^i/(1-x)^i. - Jon Perry, Jul 10 2004
a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(k+1, n-k)*binomial(2*k, k). - Paul Barry, Mar 18 2005
a(n) = Sum_{k=0..floor(n/2)} A055830(n-k, k). - Philippe Deléham, Oct 22 2006
a(n) = Sum_{k=0..n} A098158(n,k). - Philippe Deléham, Dec 04 2006
G.f.: 1/(1 - (x + x^2 + x^3 + ...)). - Geoffrey Critzer, Aug 30 2008
a(n) = A000079(n) - A131577(n).
a(n) = A173921(A000079(n)). - Reinhard Zumkeller, Mar 04 2010
a(n) = Sum_{k=2^n..2^(n+1)-1} A093873(k)/A093875(k), sums of rows of the full tree of Kepler's harmonic fractions. - Reinhard Zumkeller, Oct 17 2010
E.g.f.: (exp(2*x)+1)/2 = (G(0) + 1)/2; G(k) = 1 + 2*x/(2*k+1 - x*(2*k+1)/(x + (k+1)/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Dec 03 2011
A051049(n) = p(n+1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. - Michael Somos, Apr 18 2012
A008619(n) = p(-1) where p(x) is the unique degree-n polynomial such that p(k) = a(k) for k = 0, 1, ..., n. - Michael Somos, Apr 18 2012
INVERT transform is A122367. MOBIUS transform is A123707. EULER transform of A059966. PSUM transform is A000079. PSUMSIGN transform is A078008. BINOMIAL transform is A007051. REVERT transform is A105523. A002866(n) = a(n)*n!. - Michael Somos, Apr 18 2012
G.f.: U(0), where U(k) = 1 + x*(k+3) - x*(k+2)/U(k+1); (continued fraction, 1-step). - Sergei N. Gladkovskii, Oct 10 2012
a(n) = A000041(n) + A056823(n). - Omar E. Pol, Aug 31 2013
E.g.f.: E(0), where E(k) = 1 + x/( 2*k+1 - x/E(k+1) ); (continued fraction). - Sergei N. Gladkovskii, Dec 25 2013
G.f.: 1 + x/(1 + x)*( 1 + 3*x/(1 + 3*x)*( 1 + 5*x/(1 + 5*x)*( 1 + 7*x/(1 + 7*x)*( 1 + ... )))). - Peter Bala, May 27 2017
a(n) = Sum_{k=0..2} stirling2(n, k).
G.f.: Sum_{j=0..k} A248925(k,j)*x^j / Product_{j=1..k} 1-j*x with k=2. - Robert A. Russell, Apr 25 2018
a(n) = A053120(n, n), n >= 0, (main diagonal of triangle of Chebyshev's T polynomials). - Wolfdieter Lang, Nov 26 2019

Extensions

Additional comments from Emeric Deutsch, May 14 2001
Typo corrected by Philippe Deléham, Oct 25 2008

A029744 Numbers of the form 2^n or 3*2^n.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576, 32768, 49152, 65536, 98304, 131072, 196608, 262144, 393216, 524288, 786432, 1048576, 1572864, 2097152, 3145728, 4194304
Offset: 1

Views

Author

Keywords

Comments

This entry is a list, and so has offset 1. WARNING: However, in this entry several comments, formulas and programs seem to refer to the original version of this sequence which had offset 0. - M. F. Hasler, Oct 06 2014
Number of necklaces with n-1 beads and two colors that are the same when turned over and hence have reflection symmetry. [edited by Herbert Kociemba, Nov 24 2016]
The subset {a(1),...,a(2k)} contains all proper divisors of 3*2^k. - Ralf Stephan, Jun 02 2003
Let k = any nonnegative integer and j = 0 or 1. Then n+1 = 2k + 3j and a(n) = 2^k*3^j. - Andras Erszegi (erszegi.andras(AT)chello.hu), Jul 30 2005
Smallest number having no fewer prime factors than any predecessor, a(0)=1; A110654(n) = A001222(a(n)); complement of A116451. - Reinhard Zumkeller, Feb 16 2006
A093873(a(n)) = 1. - Reinhard Zumkeller, Oct 13 2006
a(n) = a(n-1) + a(n-2) - gcd(a(n-1), a(n-2)), n >= 3, a(1)=2, a(2)=3. - Ctibor O. Zizka, Jun 06 2009
Where records occur in A048985: A193652(n) = A048985(a(n)) and A193652(n) < A048985(m) for m < a(n). - Reinhard Zumkeller, Aug 08 2011
A002348(a(n)) = A000079(n-3) for n > 2. - Reinhard Zumkeller, Mar 18 2012
Without initial 1, third row in array A228405. - Richard R. Forberg, Sep 06 2013
Also positions of records in A048673. A246360 gives the record values. - Antti Karttunen, Sep 23 2014
Known in numerical mathematics as "Bulirsch sequence", used in various extrapolation methods for step size control. - Peter Luschny, Oct 30 2019
For n > 1, squares of the terms can be expressed as the sum of two powers of two: 2^x + 2^y. - Karl-Heinz Hofmann, Sep 08 2022

Crossrefs

Cf. A056493, A038754, A063759. Union of A000079 and A007283.
First differences are in A016116(n-1).
Row sums of the triangle in sequence A119963. - John P. McSorley, Aug 31 2010
The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A029744 = {s(n), n>=1}, the numbers 2^k and 3*2^k, as the parent. There may be minor differences from (s(n)) at the start, and a shift of indices. A029744 (s(n)); A052955 (s(n)-1), A027383 (s(n)-2), A354788 (s(n)-3), A060482 (s(n)-3); A136252 (s(n)-3); A347789 (s(n)-4), A209721 (s(n)+1), A209722 (s(n)+2), A343177 (s(n)+3), A209723 (s(n)+4); A354785 (3*s(n)), A061776 (3*s(n)-6); A354789 (3*s(n)-7). The first differences of A029744 are 1,1,1,2,2,4,4,8,8,... which essentially matches eight sequences: A016116, A060546, A117575, A131572, A152166, A158780, A163403, A320770. The bisections of A029744 are A000079 and A007283. - N. J. A. Sloane, Jul 14 2022

Programs

  • Haskell
    a029744 n = a029744_list !! (n-1)
    a029744_list = 1 : iterate
       (\x -> if x `mod` 3 == 0 then 4 * x `div` 3 else 3 * x `div` 2) 2
    -- Reinhard Zumkeller, Mar 18 2012
    
  • Maple
    1,seq(op([2^i,3*2^(i-1)]),i=1..100); # Robert Israel, Sep 23 2014
  • Mathematica
    CoefficientList[Series[(-x^2 - 2*x - 1)/(2*x^2 - 1), {x, 0, 200}], x] (* Vladimir Joseph Stephan Orlovsky, Jun 10 2011 *)
    Function[w, DeleteCases[Union@ Flatten@ w, k_ /; k > Max@ First@ w]]@ TensorProduct[{1, 3}, 2^Range[0, 22]] (* Michael De Vlieger, Nov 24 2016 *)
    LinearRecurrence[{0,2},{1,2,3},50] (* Harvey P. Dale, Jul 04 2017 *)
  • PARI
    a(n)=if(n%2,3/2,2)<<((n-1)\2)\1
    
  • Python
    def A029744(n):
        if n == 1: return 1
        elif n % 2 == 0: return 2**(n//2)
        else: return 3 * 2**((n-3)//2) # Karl-Heinz Hofmann, Sep 08 2022
  • Scheme
    (define (A029744 n) (cond ((<= n 1) n) ((even? n) (expt 2 (/ n 2))) (else (* 3 (expt 2 (/ (- n 3) 2)))))) ;; Antti Karttunen, Sep 23 2014
    

Formula

a(n) = 2*A000029(n) - A000031(n).
For n > 2, a(n) = 2*a(n - 2); for n > 3, a(n) = a(n - 1)*a(n - 2)/a(n - 3). G.f.: (1 + x)^2/(1 - 2*x^2). - Henry Bottomley, Jul 15 2001, corrected May 04 2007
a(0)=1, a(1)=1 and a(n) = a(n-2) * ( floor(a(n-1)/a(n-2)) + 1 ). - Benoit Cloitre, Aug 13 2002
(3/4 + sqrt(1/2))*sqrt(2)^n + (3/4 - sqrt(1/2))*(-sqrt(2))^n. a(0)=1, a(2n) = a(n-1)*a(n), a(2n+1) = a(n) + 2^floor((n-1)/2). - Ralf Stephan, Apr 16 2003 [Seems to refer to the original version with offset=0. - M. F. Hasler, Oct 06 2014]
Binomial transform is A048739. - Paul Barry, Apr 23 2004
E.g.f.: (cosh(x/sqrt(2)) + sqrt(2)sinh(x/sqrt(2)))^2.
a(1) = 1; a(n+1) = a(n) + A000010(a(n)). - Stefan Steinerberger, Dec 20 2007
u(2)=1, v(2)=1, u(n)=2*v(n-1), v(n)=u(n-1), a(n)=u(n)+v(n). - Jaume Oliver Lafont, May 21 2008
For n => 3, a(n) = sqrt(2*a(n-1)^2 + (-2)^(n-3)). - Richard R. Forberg, Aug 20 2013
a(n) = A064216(A246360(n)). - Antti Karttunen, Sep 23 2014
a(n) = sqrt((17 - (-1)^n)*2^(n-4)) for n >= 2. - Anton Zakharov, Jul 24 2016
Sum_{n>=1} 1/a(n) = 8/3. - Amiram Eldar, Nov 12 2020
a(n) = 2^(n/2) if n is even. a(n) = 3 * 2^((n-3)/2) if n is odd and for n>1. - Karl-Heinz Hofmann, Sep 08 2022

Extensions

Corrected and extended by Joe Keane (jgk(AT)jgk.org), Feb 20 2000

A020651 Denominators in recursive bijection from positive integers to positive rationals (the bijection is f(1) = 1, f(2n) = f(n)+1, f(2n+1) = 1/(f(n)+1)).

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 4, 2, 5, 3, 5, 1, 5, 4, 5, 3, 7, 4, 7, 2, 7, 5, 7, 3, 8, 5, 8, 1, 6, 5, 6, 4, 9, 5, 9, 3, 10, 7, 10, 4, 11, 7, 11, 2, 9, 7, 9, 5, 12, 7, 12, 3, 11, 8, 11, 5, 13, 8, 13, 1, 7, 6, 7, 5, 11, 6, 11, 4, 13, 9, 13, 5, 14, 9, 14, 3, 13, 10, 13, 7, 17, 10, 17, 4, 15, 11, 15, 7, 18, 11
Offset: 1

Views

Author

Keywords

Comments

If we insert an initial 1, this is the sequence of numerators in left-hand half of Kepler's tree of fractions. Form a tree of fractions by beginning with 1/1 and then giving every node i/j two descendants labeled i/(i+j) and j/(i+j). See A086592 for denominators. See A294442 for the Kepler tree itself.
Level n of the tree consists of 2^n nodes: 1/2; 1/3, 2/3; 1/4, 3/4, 2/5, 3/5; 1 /5, 4/5, 3/7, 4/7, 2/7, 5/7, 3/8, 5/8; ... Fibonacci numbers occur at the right edge this tree, i.e., a(A000225(n)) = A000045(n+1). The fractions are given in their reduced form, thus gcd(A020650(n), A020651(n)) = 1 and gcd(A020651(n), A086592(n)) = 1 for all n. - Antti Karttunen, May 26 2004
A generalization which includes the "rabbit tree" (A226080) and "all rationals tree" (A226130) follows. Suppose that a,b,c,d,e,f,g,h are complex numbers. Let S be the set of numbers defined by these rules: (1) 1 is in S; (2) if x is in S and cx+d is not 0, then U(x) = (ax+b)/(cx+d) is in S; (3) if x is in S and gx+h is not 0, then D(x) = (ex+f)/(gx+h) is in S. If an infinite path in the resulting tree has convergent nodes, then there is some node after which the path is "updown zigzag" ((UoD)o(UoD)o ...) or "downup zigzag" (DoU)o(DoU)o ...). If ag+ch is not 0, then the updown zigzag limit is invariant of x and equals [ae + cf - bg - dh + sqrt(X)]/(2(ag + ch)), where X = (ae + cf - bg - dh)^2 + 4(be + df + ag + ch). If ce + dg is not 0, then the downup zigzag limit is invariant of x and equals [ae + bg - cf - dh + sqrt(Y)]/(2(ce + dg)), where Y = (ae + bg - cf - dh)^2 + 4(af + bh)(ce + dg)) = X. Thus, for the tree A020651, the updown zigzag limit is -1 + sqrt(2) and the downup zigzag limit, sqrt(2). - Clark Kimberling, Nov 10 2013
From Yosu Yurramendi, Jul 13 2014: (Start)
If the terms (n > 0) are written as an array (left-aligned fashion) with rows of length 2^m, m = 0,1,2,3,...
1,
1,2,
1,3,2,3,
1,4,3,4,2,5,3,5,
1,5,4,5,3,7,4,7,2, 7,5, 7,3, 8,5, 8,
1,6,5,6,4,9,5,9,3,10,7,10,4,11,7,11,2,9,7,9,5,12,7,12,3,11,8,11,5,13,8,13,
then the sum of the m-th row is 3^m (m = 0,1,2,), and each column is an arithmetic sequence. The differences of the arithmetic sequences, except the first on the left, give the sequence A093873 (Numerators in Kepler's tree of harmonic fractions) (a(2^(m+1)-1-k) - a(2^m-1-k) = A093873(k), m = 0,1,2,..., k = 0,1,2,...,2^m-1).
If the rows are written in a right-aligned fashion:
1,
1, 2,
1, 3,2, 3,
1, 4,3, 4,2, 5,3, 5,
1,5,4,5,3, 7,4, 7,2, 7,5, 7,3, 8,5, 8,
1,6,5,6,4,9,5,9,3,10,7,10,4,11,7,11,2,9,7,9,5,12,7,12,3,11,8,11,5,13,8,13,
then each column k is a Fibonacci sequence. (End)
For m >= 0, a(2^m) = 1 and a(3*2^m) = 2. For n >= 0, a(A070875(n)) = 3 (for m >= 0, a(5*2^m) = 3 and a(7*2^m) = 3). - Yosu Yurramendi, Jun 02 2016

Examples

			1, 2, 1/2, 3, 1/3, 3/2, 2/3, 4, 1/4, 4/3, ...
		

Crossrefs

See A294442 and A093873/A093875 for two different versions of the Kepler tree.

Programs

  • Haskell
    import Data.List (transpose); import Data.Ratio (denominator)
    a020651_list = map denominator ks where
       ks = 1 : concat (transpose [map (+ 1) ks, map (recip . (+ 1)) ks])
    -- Reinhard Zumkeller, Feb 22 2014
    
  • Maple
    A020651 := n -> `if`((n < 2),n,`if`(type(n,even), A020651(n/2), A020650(n-1)));
  • Mathematica
    f[1] = 1; f[n_?EvenQ] := f[n] = f[n/2]+1; f[n_?OddQ] := f[n] = 1/(f[(n-1)/2]+1); a[n_] := Denominator[f[n]]; Table[a[n], {n, 1, 94}] (* Jean-François Alcover, Nov 22 2011 *)
  • R
    N <- 25 # arbitrary
    a <- c(1,1,2)
    for(n in 1:N){
      a[4*n]   <- a[2*n]
      a[4*n+1] <- a[2*n] + a[2*n+1]
      a[4*n+2] <-          a[2*n+1]
      a[4*n+3] <- a[2*n] + a[2*n+1]
    }
    a
    # Yosu Yurramendi, Jul 13 2014

Formula

a(1) = 1, a(2n) = a(n), a(2n+1) = A020650(2n). - Antti Karttunen, May 26 2004
a(2n) = A020650(2n+1). - Yosu Yurramendi, Jul 17 2014
a(2^m + k) = A093873(2^(m+1) + k) = A093873(2^(m+1) + 2^m + k), m >= 0, 0 <= k < 2^m. - Yosu Yurramendi, May 18 2016
a(2^m + 2^r + k) = A093873(2^r + k)*(m-(r-1)) + A093873(k), m >= 0, r <= m-1, 0 <= k < 2^r. For k=0 A093873(0) = 0 is needed. - Yosu Yurramendi, Jul 30 2016
a((2n+1)*2^m) = A086592(n), m >= 0, n > 0. For n = 0 A086592(0) = 1 is needed. - Yosu Yurramendi, Feb 14 2017
a(4n+2) = a(4n+1) - a(4n) = a(2n+1) = a(4n+1) - a(n), n > 0. - Yosu Yurramendi, May 08 2018
a(1) = 1, a(n+1) = 2*floor(1/a(n))+1-1/a(n). - Jan Malý, Jul 30 2019
a(n) = A002487(A231551(n)), n > 0. - Yosu Yurramendi, Jul 15 2021

Extensions

Entry revised by N. J. A. Sloane, May 24 2004

A071585 Numerator of the continued fraction expansion whose terms are the first-order differences of exponents in the binary representation of 4*n, with the exponents of 2 being listed in descending order.

Original entry on oeis.org

1, 2, 3, 3, 4, 5, 4, 5, 5, 7, 7, 8, 5, 7, 7, 8, 6, 9, 10, 11, 9, 12, 11, 13, 6, 9, 10, 11, 9, 12, 11, 13, 7, 11, 13, 14, 13, 17, 15, 18, 11, 16, 17, 19, 14, 19, 18, 21, 7, 11, 13, 14, 13, 17, 15, 18, 11, 16, 17, 19, 14, 19, 18, 21, 8, 13, 16, 17, 17, 22, 19, 23, 16, 23, 24, 27, 19
Offset: 0

Views

Author

Paul D. Hanna, Jun 01 2002

Keywords

Comments

Thus a(n)/a(m) = d_1 + 1/(d_2 + 1/(d_3 + ... + 1/d_k)) where m = n - 2^floor(log_2(n)) + 1 and where d_j = b_j - b_(j+1) are the differences of the binary exponents b_j > b_(j+1) defined by: 4*n = 2^b_1 + 2^b_2 + 2^b_3 + ... 2^b_k.
All the rationals are uniquely represented by this sequence - compare Stern's diatomic sequence A002487.
This sequence lists the rationals >= 1 in order by the sum of the terms of their continued fraction expansions. For example, the numerators generated from partitions of 5 that do not end with 1 are listed together as 5, 7, 7, 8, 5, 7, 7, 8, since: 5/1 = [5]; 7/2 = [3;2]; 7/3 = [2;3]; 8/3 = [2;1,2]; 5/4 = [1;4]; 7/5 = [1;2,2]; 7/4 = [1;1,3]; 8/5 = [1;1,1,2].
From Yosu Yurramendi, Jun 23 2014: (Start)
If the terms (n>0) are written as an array:
1,
2,
3, 3,
4, 5, 4, 5,
5, 7, 7, 8, 5, 7, 7, 8,
6, 9,10,11, 9,12,11,13, 6, 9,10,11, 9,12,11,13,
7,11,13,14,13,17,15,18,11,16,17,19,14,19,18,21,7,11,13,14,13,17,15,18,11, ...
then the sum of the k-th row is 2*3^(k-2) for k>1, each column is an arithmetic progression. The differences of the arithmetic sequences give the sequence A071585 itself: a(2^(p+1)+k) - a(2^p+k) = a(k). A002487 and A007306 also have these properties. The first terms of columns, excluding a(0), give A086593.
If the rows (n>0) are written on right:
1;
2;
3, 3;
4, 5, 4, 5;
5, 7, 7, 8, 5, 7, 7, 8;
6, 9, 10, 11, 9, 12, 11, 13, 6, 9, 10, 11, 9, 12, 11, 13;
then each column is a Fibonacci sequence: a(2^(p+2)+k) = a(2^(p+1)+k) + a(2^p+k). The first terms of columns, excluding a(0), give A086593. (End)
n>1 occurs in this sequence phi(n) = A000010(n) times, as it occurs in A007306 (Franklin T. Adams-Watters's comment), that is the sequence obtained by adding numerator and denominator in the Calkin-Wilf enumeration system of positive rationals. A229742(n)/A071766(n) is also an enumeration system of all positive rationals (HCS system), and in each level m >= 0 (ranks between 2^m and 2^(m+1)-1) rationals are the same in both systems. Thus a(n) (A229742(n)+A071766(n)) has the same terms in each level as A007306. The same property occurs in all numerator+denominator sequences of enumeration systems of positive rationals, as, for example, A007306 (A007305+A047679), A086592 (A020650+A020651), and A268087 (A162909+A162910). - Yosu Yurramendi, Apr 06 2016
a(n) = A086592(A059893(n)), a(A059893(n)) = A086592(n), n > 0. - Yosu Yurramendi, May 30 2017

Examples

			a(37)=17 as it is the numerator of 17/5 = 3 + 1/(2 + 1/2), which is a continued fraction that can be derived from the binary expansion of 4*37 = 2^7 + 2^4 + 2^2; the binary exponents are {7, 4, 2}, thus the differences of these exponents are {3, 2, 2}; giving the continued fraction expansion of 17/5=[3,2,2].
Illustration of Sum_{m=0..2^(k-1)-1} a(2^k + m) = 3^k:
k=2: 3^2 = a(2^2) + a(2^2 + 1) = 4 + 5;
k=3: 3^3 = a(2^3) + a(2^3 + 1) + a(2^3 + 2) + a(2^3 + 3) = 5 + 7 + 7 + 8;
k=4: 3^4 = a(2^4) + a(2^4+1) + a(2^4+2) + a(2^4+3) + a(2^4+4) + a(2^4+5) + a(2^4+6) + a(2^4+7) = 6 + 9 + 10 + 11 + 9 + 12 + 11 + 13.
1, 2, 3, 3/2, 4, 5/2, 4/3, 5/3, 5, 7/2, 7/3, 8/3, 5/4, 7/5, 7/4, 8/5, 6, ...
From _Yosu Yurramendi_, Jun 27 2014: (Start)
a(0) =             = 1;
a(1) = a(0) + a(0) = 2;
a(2) = a(0) + a(1) = 3;
a(3) = a(1) + a(0) = 3;
a(4) = a(0) + a(2) = 4;
a(5) = a(1) + a(3) = 5;
a(6) = a(2) + a(0) = 4;
a(7) = a(3) + a(1) = 5;
a(8) = a(0) + a(4) = 5;
a(9) = a(1) + a(5) = 7;
a(10) = a(2) + a(6) = 7;
a(11) = a(3) + a(7) = 8;
a(12) = a(4) + a(0) = 5;
a(13) = a(5) + a(1) = 7;
a(14) = a(6) + a(2) = 7;
a(15) = a(7) + a(3) = 8. (End)
		

Crossrefs

Cf. A071766.

Programs

  • Mathematica
    ncf[n_]:=Module[{br=Reverse[Flatten[Position[Reverse[IntegerDigits[4 n,2]],1]-1]]}, Numerator[FromContinuedFraction[Flatten[Join[{Abs[ Differences[ br]],Last[br]}]]]]]; Join[{1},Array[ncf,80]] (* Harvey P. Dale, Jul 01 2012 *)
    {1}~Join~Table[Numerator@ FromContinuedFraction@ Append[Abs@ Differences@ #, Last@ #] &@ Log2[NumberExpand[4 n, 2] /. 0 -> Nothing], {n, 120}] (* Version 11, or *)
    {1}~Join~Table[Numerator@ FromContinuedFraction@ Append[Abs@ Differences@ #, Last@ #] &@ Log2@ DeleteCases[# Reverse[2^Range[0, Length@ # - 1]] &@ IntegerDigits[4 n, 2], k_ /; k == 0], {n, 120}] (* Michael De Vlieger, Aug 15 2016 *)
  • R
    blocklevel <- 7  # arbitrary
    a <- c(1,2)
    for(k in 1:blocklevel)
    a <- c(a, a + c(a[((length(a)/2)+1):length(a)],a[1:(length(a)/2)]))
    a
    # Yosu Yurramendi, Jun 26 2014
    
  • R
    blocklevel <- 7  # arbitrary
    a <- c(1,2)
    for(p in 0:blocklevel)
      for(k in 1:2^(p+1)){
        if (k <=  2^p) a[k + 2^(p+1)] = a[k] + a[k + 2^p]
        else           a[k + 2^(p+1)] = a[k] + a[k - 2^p]
    }
    a
    # Yosu Yurramendi, Jun 27 2014

Formula

a(2^k + 2^j + m) = (k-j)*a(2^j + m) + a(m) when 2^k > 2^j > m >= 0.
a(0) = 1, a(2^k) = k + 2,
a(2^k + 1) = 2*k + 1 (k>0),
a(2^k + 2) = 3*k - 2 (k>1),
a(2^k + 3) = 3*k - 1 (k>1),
a(2^k + 4) = 4*k - 7 (k>2).
a(2^k - 1) = Fibonacci(k+2) = A000045(k+2).
Sum_{m=0..2^(k-1)-1} a(2^k + m) = 3^k (k>0).
From Yosu Yurramendi, Jun 27 2014: (Start)
Write n = k + 2^(m+1), k = 0,1,2,...,2^(m+1)-1, m = 0,1,2,...
if 0 <= k < 2^m, a(k + 2^(m+1)) = a(k) + a(k + 2^m).
if 2^m <= k < 2^(m+1), a(k + 2^(m+1)) = a(k) + a(k - 2^m).
with a(0)=1, a(1)=2. (End)
a(n) = A059893(A086592(n)), n>0. - Yosu Yurramendi, Apr 09 2016
a(n) = A093873(n) + A093875(n), n > 0. - Yosu Yurramendi, Jul 22 2016
a(n) = A093873(2n) + A093873(2n+1), n > 0; a(n) = A093875(2n) = A093875(2n+1), n > 0. - Yosu Yurramendi, Jul 25 2016
a(n) = sqrt(A071766(2^(m+1)+n)*A229742(2^(m+1)+n) - A071766(2^m+n)*A229742(2^m+n)), for n > 0, where m = floor(log_2(n)+1). - Yosu Yurramendi, Jun 10 2019
a(n) = A007306(A059893(A233279(n))), n > 0. - Yosu Yurramendi, Aug 07 2021
a(n) = A007306(A059894(A006068(n))), n > 0. - Yosu Yurramendi, Sep 29 2021
Conjecture: a(n) = a(floor(n/2)) + Sum_{k=1..A000120(n)} a(b(n, k))*(-1)^(k-1) for n > 0 with a(0) = 1 where b(n, k) = A025480(b(n, k-1) - 1) for n > 0, k > 0 with b(n, 0) = n. - Mikhail Kurkov, Feb 20 2023

A294442 Kepler's tree of fractions, read across rows (the fraction i/j is represented as the pair i,j).

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 2, 3, 1, 4, 3, 4, 2, 5, 3, 5, 1, 5, 4, 5, 3, 7, 4, 7, 2, 7, 5, 7, 3, 8, 5, 8, 1, 6, 5, 6, 4, 9, 5, 9, 3, 10, 7, 10, 4, 11, 7, 11, 2, 9, 7, 9, 5, 12, 7, 12, 3, 11, 8, 11, 5, 13, 8, 13, 1, 7, 6, 7, 5, 11, 6, 11, 4, 13, 9, 13, 5, 14, 9, 14, 3, 13, 10, 13, 7, 17, 10, 17, 4, 15, 11, 15, 7, 18, 11
Offset: 0

Views

Author

N. J. A. Sloane, Nov 20 2017

Keywords

Comments

The first row contains the single fraction 1/1,
the second row contains the single fraction 1/2,
and thereafter below each fraction i/j we write two fractions i/(i+j), j/(i+j).
If we just look at the numerators we recover the same sequence, and if we just look at the denominators we get A086593 with the terms (after the first) repeated.
Sequence A020651 is almost the same as this, except that it lacks one of the initial 1's, and the definition focuses on single numbers rather than pairs of numbers or fractions. For that reason it seems to be best to have a separate entry (this sequence) for the actual tree.

Examples

			The tree begins as follows:
..............1/1
...............|
..............1/2
.........../.......\
......1/3.............2/3
...../....\........../...\
..1/4.....3/4.....2/5.....3/5
../..\..../..\..../..\..../..\
1/5.4/5.3/7.4/7.2/7.5/7.3/8.5/8
		

Crossrefs

A different version of the Kepler tree is described in A093873.
See A294446 for the tree of Farey fractions.

Programs

  • Maple
    # S[n] is the list of fractions, written as pairs [i,j], in row n of Kepler's triangle
    S[0]:=[[1,1]]; S[1]:=[[1,2]];
    for n from 2 to 10 do
    S[n]:=[];
    for k from 1 to nops(S[n-1]) do
    t1:=S[n-1][k];
    a:=[t1[1],t1[1]+t1[2]];
    b:=[t1[2],t1[1]+t1[2]];
    S[n]:=[op(S[n]),a,b];
    od:
    lprint(S[n]);
    od:
  • Mathematica
    Map[{Numerator@ #, Denominator@ #} &, #] &@ Flatten@ Nest[Append[#, Flatten@ Map[{#1/(#1 + #2), #2/(#1 + #2)} & @@ {Numerator@ #, Denominator@ #} &, Last@ #]] &, {{1/1}, {1/2}}, 5] // Flatten (* Michael De Vlieger, Apr 18 2018 *)

A070875 Binary expansion is 1x100...0 where x = 0 or 1.

Original entry on oeis.org

5, 7, 10, 14, 20, 28, 40, 56, 80, 112, 160, 224, 320, 448, 640, 896, 1280, 1792, 2560, 3584, 5120, 7168, 10240, 14336, 20480, 28672, 40960, 57344, 81920, 114688, 163840, 229376, 327680, 458752, 655360, 917504, 1310720, 1835008, 2621440
Offset: 0

Views

Author

N. J. A. Sloane, May 19 2002

Keywords

Comments

A 2-automatic sequence. - Charles R Greathouse IV, Sep 24 2012
Third row in array A228405. - Richard R. Forberg, Sep 06 2013
Conjecture: a(n) = -1 + positions of the ones in A309019(n+2) - A002487(n+2). - George Beck, Mar 26 2022
Consecutive integers for which the number of its proper nondivisors of the form 2^k (k > 0) is 2; proper nondivisors are defined in A173540 (5 has two such nondivisors: 2 and 4, 7 has 2 and 4, 10 has 4 and 8, 14 has 4 and 8, 20 has 8 and 16,...). - Lechoslaw Ratajczak, Dec 17 2024

Crossrefs

Programs

  • Magma
    [n le 2 select 2*n+3 else 2*Self(n-2): n in [1..39]]; // Bruno Berselli, Mar 01 2011
    
  • Mathematica
    Flatten@ NestList[ 2# &, {5, 7}, 19] (* Or *)
    CoefficientList[ Series[(5 + 7 x)/(1 - 2 x^2), {x, 0, 38}], x] (* Robert G. Wilson v, May 20 2002 *)
  • PARI
    a(n)=if(n%2,7,5)<<(n\2) \\ Charles R Greathouse IV, Sep 24 2012

Formula

A093873(a(n)) = 2. - Reinhard Zumkeller, Oct 13 2006
For n>1, a(n+1) = a(n) + A000010(a(n)). - Stefan Steinerberger, Dec 20 2007
From Bruno Berselli, Mar 01 2011: (Start)
G.f.: (5+7*x)/(1-2*x^2).
a(n) = (6-(-1)^n)*2^((2*n+(-1)^n-1)/4). Therefore: a(n) = 5*2^(n/2) for n even, otherwise a(n) = 7*2^((n-1)/2).
a(n) = 2*a(n-2) for n>1. (End)
a(n+1) = A063757(n) + 6. - Philippe Deléham, Apr 13 2013
a(n) = sqrt(2*a(n-1) - (-2)^(n-1)). - Richard R. Forberg, Sep 06 2013
a(n+3) = a(n+2)*a(n+1)/a(n). - Richard R. Forberg, Sep 06 2013
For n>1, a(n) = 2*phi(a(n)) + phi(phi(a(n))). - Ivan Neretin, Feb 28 2016
a(2n) = A020714(n), a(2n+1) = A005009(n); for n>0. - Yosu Yurramendi, Jun 01 2016
From Ilya Gutkovskiy, Jun 02 2016: (Start)
E.g.f.: 7*sinh(sqrt(2)*x)/sqrt(2) + 5*cosh(sqrt(2)*x).
a(n) = 2^((n-3)/2)*(5*sqrt(2)*(1 + (-1)^n) + 7*(1 - (-1)^n)). (End)
Sum_{n>=0} 1/a(n) = 24/35. - Amiram Eldar, Mar 28 2022

Extensions

Extended by Robert G. Wilson v, May 20 2002

A086592 Denominators in left-hand half of Kepler's tree of fractions.

Original entry on oeis.org

2, 3, 3, 4, 4, 5, 5, 5, 5, 7, 7, 7, 7, 8, 8, 6, 6, 9, 9, 10, 10, 11, 11, 9, 9, 12, 12, 11, 11, 13, 13, 7, 7, 11, 11, 13, 13, 14, 14, 13, 13, 17, 17, 15, 15, 18, 18, 11, 11, 16, 16, 17, 17, 19, 19, 14, 14, 19, 19, 18, 18, 21, 21, 8, 8, 13, 13, 16, 16, 17, 17, 17, 17, 22, 22, 19, 19, 23
Offset: 1

Views

Author

Antti Karttunen, Aug 28 2003

Keywords

Comments

Form a tree of fractions by beginning with 1/1 and then giving every node i/j two descendants labeled i/(i+j) and j/(i+j).
Level n of the left-hand half of the tree consists of 2^(n-1) nodes: 1/2; 1/3, 2/3; 1/4, 3/4, 2/5, 3/5; 1/5, 4/5, 3/7, 4/7, 2/7, 5/7, 3/8, 5/8; ... .
The right-hand half is identical to the left-hand half. - Michel Dekking, Oct 05 2017
n>1 occurs in this sequence phi(n) = A000010(n) times, as it occurs in A007306 (Franklin T. Adams-Watters' comment), that is the sequence obtained by adding numerator and denominator in the Calkin-Wilf enumeration system of positive rationals. A020650(n)/A020651(n) is also an enumeration system of all positive rationals (Yu-Ting system), and in each level m >= 0 (ranks between 2^m and 2^(m+1)-1) rationals are the same in both systems. Thus a(n) has the same terms in each level as A007306. The same property occurs in all numerator+denominator sequences of enumeration systems of positive rationals, as, for example, A007306 (A007305+A047679), A071585 (A229742+A071766), and A268087 (A162909+A162910). - Yosu Yurramendi, Apr 06 2016

References

  • Johannes Kepler, Mysterium cosmographicum, Tuebingen, 1596, 1621, Caput XII.
  • Johannes Kepler, Harmonice Mundi, Linz, 1619, Liber III, Caput II.
  • Johannes Kepler, The Harmony of the World [1619], trans. E. J. Aiton, A. M. Duncan and J. V. Field, American Philosophical Society, Philadelphia, 1997, p. 163.

Crossrefs

Bisection of A020650.
See A093873/A093875 for the full tree.
A020651 gives the numerators. Bisection: A086593. Cf. A002487, A004169.

Programs

  • Mathematica
    (* b = A020650 *) b[1] = 1; b[2] = 2; b[3] = 1; b[n_] := b[n] = Switch[ Mod[n, 4], 0, b[n/2 + 1] + b[n/2], 1, b[(n - 1)/2 + 1], 2, b[(n - 2)/2 + 1] + b[(n - 2)/2], 3, b[(n - 3)/2]]; a[n_] := b[2n]; Array[a, 100] (* Jean-François Alcover, Jan 22 2016 *)
  • R
    maxlevel <- 15
    d <- c(1,2)
    for(m in 0:maxlevel)
    for(k in 1:2^m) {
       d[2^(m+1)    +k] <- d[k] + d[2^m+k]
       d[2^(m+1)+2^m+k] <- d[2^(m+1)+k]
    }
    b <- vector()
    for(m in 0:maxlevel) for(k in 0:(2^m-1)) b[2^m+k] <- d[2^(m+1)+k]
    a <- vector()
    for(n in 1:2^maxlevel) {a[2*n-1] <- b[n]; a[2*n] <- b[n+1]}
    a[1:128]
    # Yosu Yurramendi, May 16 2018

Formula

a(n) = A020650(n) + A020651(n) = A020650(2n).
a(n) = A071585(A059893(n)), a(A059893(n)) = A071585(n), n > 0. - Yosu Yurramendi, May 30 2017
a(2*n-1) = A086593(n); a(2*n) = A086593(n+1), n > 0. - Yosu Yurramendi, May 16 2018
a(n) = A007306(A231551(n)), n > 0. - Yosu Yurramendi, Aug 07 2021

Extensions

Entry revised by N. J. A. Sloane, May 24 2004

A093875 Denominators in Kepler's tree of harmonic fractions.

Original entry on oeis.org

1, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 4, 4, 5, 5, 5, 5, 7, 7, 7, 7, 8, 8, 5, 5, 7, 7, 7, 7, 8, 8, 6, 6, 9, 9, 10, 10, 11, 11, 9, 9, 12, 12, 11, 11, 13, 13, 6, 6, 9, 9, 10, 10, 11, 11, 9, 9, 12, 12, 11, 11, 13, 13, 7, 7, 11, 11, 13, 13, 14, 14, 13, 13, 17, 17, 15, 15, 18, 18, 11, 11, 16, 16
Offset: 1

Views

Author

Keywords

Comments

Form a tree of fractions by beginning with 1/1 and then giving every node i/j two descendants labeled i/(i+j) and j/(i+j).
It appears that A071585 is a bisection of this sequence, which itself is a bisection of A093873. - Yosu Yurramendi, Jan 09 2016

Examples

			The first few fractions are:
1 1 1 1 2 1 2 1 3 2 3 1 3 2 3 1 4 3 4 2 5 3 5 1 4 3 4 2 5 3 5
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ...
1 2 2 3 3 3 3 4 4 5 5 4 4 5 5 5 5 7 7 7 7 8 8 5 5 7 7 7 7 8 8
		

Crossrefs

The numerators are in A093873. Usually one only considers the left-hand half of the tree, which gives the fractions A020651/A086592. See A086592 for more information, references to Kepler, etc.

Programs

  • Mathematica
    num[1] = num[2] = 1; den[1] = 1; den[2] = 2; num[n_?EvenQ] := num[n] = num[n/2]; den[n_?EvenQ] := den[n] = num[n/2] + den[n/2]; num[n_?OddQ] := num[n] = den[(n-1)/2]; den[n_?OddQ] := den[n] = num[(n-1)/2] + den[(n-1)/2]; A093875 = Table[den[n], {n, 1, 83}] (* Jean-François Alcover, Dec 16 2011 *)

Formula

a(n) = a([n/2]) + A093873([n/2]).
Conjecture of the comment in detail: a(2n+1) = a(2n), n > 0; a(2n+1) = A071585(n), n >= 0; a(2n) = A071585(n), n > 0. - Yosu Yurramendi, Jun 22 2016
a(2n) - A093873(2n) = a(n), n > 0; a(2n+1) - A093873(2n+1) = A093873(n), n > 0. - Yosu Yurramendi, Jul 23 2016
From Yosu Yurramendi, Jul 25 2016: (Start)
a(2^m) = m+1, m >= 0; a(2^m + 2) = 2m - 1, m >= 1; a(2^m - 1) = A000045(m+2), m >= 1.
a(2^(m+1) + k) - a(2^m + k) = a(k), m > 0, 0 <= k < 2^m. For k=0, a(0) = 1 is needed.
a(2^(m+2) - k - 1) = a(2^(m+1) - k - 1) + a(2^m - k - 1), m >= 0, 0 <= k < 2^m. (End)

A245328 Denominators in recursive bijection from positive integers to positive rationals (the bijection is f(1) = 1, f(2n) = 1/(f(n)+1), f(2n+1) = f(n)+1).

Original entry on oeis.org

1, 2, 1, 3, 2, 3, 1, 5, 3, 5, 2, 4, 3, 4, 1, 8, 5, 8, 3, 7, 5, 7, 2, 7, 4, 7, 3, 5, 4, 5, 1, 13, 8, 13, 5, 11, 8, 11, 3, 12, 7, 12, 5, 9, 7, 9, 2, 11, 7, 11, 4, 10, 7, 10, 3, 9, 5, 9, 4, 6, 5, 6, 1, 21, 13, 21, 8, 18, 13, 18, 5, 19, 11, 19, 8, 14, 11, 14, 3, 19, 12, 19, 7, 17, 12, 17, 5, 16, 9, 16, 7, 11, 9, 11, 2, 18, 11, 18, 7, 15
Offset: 1

Views

Author

Yosu Yurramendi, Jul 18 2014

Keywords

Comments

A245327(n)/a(n) enumerates all the reduced nonnegative rational numbers exactly once.
If the terms (n>0) are written as an array (left-aligned fashion) with rows of length 2^m, m = 0,1,2,3,...
1,
2,1,
3,2, 3,1,
5,3, 5,2, 4,3, 4,1,
8,5, 8,3, 7,5, 7,2, 7,4, 7,3,5,4,5,1,
13,8,13,5,11,8,11,3,12,7,12,5,9,7,9,2,11,7,11,4,10,7,10,3,9,5,9,4,6,5,6,1,
then the sum of the m-th row is 3^m (m = 0,1,2,), and each column k is a Fibonacci sequence.
If the rows are written in a right-aligned fashion:
1,
2,1,
3,2,3,1,
5,3,5,2,4,3,4,1,
8,5, 8,3, 7,5, 7,2,7,4,7,3,5,4,5,1,
13,8,13,5,11,8,11,3,12,7,12,5,9,7,9,2,11,7,11,4,10,7,10,3,9,5,9,4,6,5,6,1,
then each column is an arithmetic sequence. The differences of the arithmetic sequences, except the first on the right, give the sequence A093873 (Numerators in Kepler's tree of harmonic fractions) (a(2^(m+1)-1-k) - a(2^m-1-k) = A093873(k), m = 0,1,2,..., k = 0,1,2,...,2^m-1).
If the sequence is considered by blocks of length 2^m, m = 0,1,2,..., the blocks of this sequence are permutations of terms of blocks from A002487 (Stern's diatomic series or Stern-Brocot sequence), and, more precisely, the reverses of blocks of A020651 ( a(2^m+k) = A020651(2^(m+1)-1-k), m = 0,1,2,..., k = 0,1,2,...,2^m-1).
Moreover, each block is the bit-reversed permutation of the corresponding block of A245326.

Crossrefs

Programs

  • Mathematica
    f[n_] := Which[n == 1, 1, EvenQ@ n, 1/(f[n/2] + 1), True, f[(n - 1)/2] + 1]; Table[Denominator@ f@ k, {n, 7}, {k, 2^(n - 1), 2^n - 1}] // Flatten (* Michael De Vlieger, Mar 02 2017 *)
  • PARI
    a(n) = my(A=0); forstep(i=logint(n, 2), 0, -1, if(bittest(n, i), A++, A=1/(A+1))); denominator(A) \\ Mikhail Kurkov, Mar 12 2023
  • R
    N <- 25 # arbitrary
    a <- c(1,2,1)
    for(n in 1:N){
      a[4*n]   <- a[2*n] + a[2*n+1]
      a[4*n+1] <- a[2*n]
      a[4*n+2] <- a[2*n] + a[2*n+1]
      a[4*n+3] <-          a[2*n+1]
    }
    a
    

Formula

a(2n) = A245327(2n+1) , a(2n+1) = A245328(2n) , n=1,2,3,...
a((2*n+1)*2^m - 1) = A273493(n), n > 0, m >= 0. For n = 0 A273493(0) = 1 is needed. - Yosu Yurramendi, Mar 02 2017
a(n) = A002487(1+A284459(n)). - Yosu Yurramendi, Aug 23 2021
Showing 1-10 of 14 results. Next