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.

A273317 Irregular table read by rows: T(0,0) = 2 and T(n,2k) = T(n-1,k)+1, T(n,2k+1) = T(n-1,k)*(T(n-1,k)+1) for 0 <= k < 2^(n-1).

Original entry on oeis.org

2, 3, 6, 4, 12, 7, 42, 5, 20, 13, 156, 8, 56, 43, 1806, 6, 30, 21, 420, 14, 182, 157, 24492, 9, 72, 57, 3192, 44, 1892, 1807, 3263442, 7, 42, 31, 930, 22, 462, 421, 176820, 15, 210, 183, 33306, 158, 24806, 24493, 599882556, 10, 90, 73, 5256, 58, 3306, 3193, 10192056
Offset: 0

Views

Author

Tom Edgar, May 19 2016

Keywords

Comments

The first entry in row n is n+2.
The second entry in row n (n>0) is the A002378(n+2).
No number appears twice in the same row, so row n has 2^n distinct terms.
Row n and row n+1 have no elements in common.
There are infinitely many mutually disjoint rows; this fact can be used to show that the harmonic series diverges since the sum of reciprocals of entries in every row equals 1/2. This also allows a proof that every positive rational number is the sum of a finite number of distinct Egyptian fractions.
Let S(0) = {2} and for n>=1 define S(n) = {a | a = c+1 or a = c*(c+1) for some c in S(n-1)}; then row n contains the elements of S(n).

Examples

			The table begins:
2,
3, 6,
4, 12, 7, 42,
5, 20, 13, 156, 8, 56, 43, 1806,
6, 30, 21, 420, 14, 182, 157, 24492, 9, 72, 57, 3192, 44, 1892, 1807, 3263442,
		

Crossrefs

Programs

  • Maple
    A273317 := proc(n,j)
        if n = 0 then
            2 ;
        elif type(j,'even') then
            1+procname(n-1,j/2) ;
        else
            procname(n-1,floor(j/2)) ;
            %*(%+1) ;
        end if;
    end proc: # R. J. Mathar, May 20 2016
  • Sage
    def T(n,j):
        if n==0:
            return 2
        if j%2==0:
            return T(n-1,floor(j/2))+1
        else:
            t=T(n-1,floor(j/2))
            return t*(t+1)
    S=[[T(n,k) for k in [0..2^n-1]] for n in [0..10]]
    [x for sublist in S for x in sublist]

Formula

T(0,0) = 2, and T(n,2k) = T(n-1,k)+1, T(n,2k+1) = T(n-1,k)*(T(n-1,k)+1) for 0 <= k < 2^(n-1).
Sum_{a in row(n)} 1/a = 1/2 for all n.