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.

A263267 Breadth-first traversal of the tree defined by the edge-relation A049820(child) = parent.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 5, 8, 9, 10, 12, 7, 11, 14, 18, 13, 15, 16, 20, 22, 17, 24, 25, 26, 28, 30, 19, 21, 32, 34, 23, 40, 38, 42, 27, 44, 48, 46, 29, 36, 50, 56, 60, 49, 52, 54, 31, 33, 72, 58, 35, 84, 62, 66, 37, 39, 96, 68, 70, 41, 45, 104, 108, 74, 76, 78, 80, 43, 47, 120, 81, 82, 90, 88, 51, 128, 132, 83, 85, 86, 94, 53, 55, 136, 140, 87, 92, 102
Offset: 0

Views

Author

Antti Karttunen, Nov 27 2015

Keywords

Comments

It is conjectured that the terms of A259934 trace the only infinite path in this tree.
After the root (0), the tree narrows next time to the width of just one node at level A262508(1) = 9236, with vertex 119143.

Examples

			Rows 0 - 21 of the table. The lines show the nodes of the tree connected by the edge-relation A049820(child) = parent:
0;
| \
1, 2;
| \  \
3, 4, 6;____
|  |  | \   \
5, 8, 9, 10, 12;
|     |   |   |
7, _ 11, 14, 18;
  /  | \   \   \
13, 15, 16, 20, 22;____
     |  |      / | \   \
    17, 24, 25, 26, 28, 30;
     | \         |      |
    19, 21,     32,     34;
         |       |      | \
        23,     40,    38, 42;____
         |              | \       \
        27,            44, 48,     46;____
         | \            |   | \    |  \   \
        29, 36,        50, 56, 60, 49, 52, 54;
         | \                   |           |
        31, 33,                72,         58;
         |                     |           |  \
        35,                    84,         62, 66;
         | \                   |           |  \
        37, 39,                96,         68, 70;_______
            |  \               |  \           / |  \     \
            41, 45,           104, 108,     74, 76, 78,   80;
            |   |              |                |   |  \    \
            43, 47,           120,             _81, 82, 90, 88;
                |              |  \           / |   |   |
                51,           128, 132,     83, 85, 86, 94;
                 | \            | \          |       |   |
                53, 55        136, 140      87,     92, 102;______
                 |                           | \     |    |  \    \
                57,_                        89, 91, 98, 106,  110, 112;
               / |  \                       /   / \       |     |
             59, 63, 64,                  93, 95, 100,   114,   116;
              |                            |   |          |  \
             61,                          99, 97,       _118, 126;
              |                            |   |       /  |  \
             65,                         101, 105,  121, 122, 124;
(See also _Michael De Vlieger_'s poster in the Links section.)
		

Crossrefs

Inverse permutation: A263268.
Cf. A262507 (number of terms on row/level n), A263260 (total number of terms in levels 0 .. n).
Cf. A264988 (the left edge), this differs from A261089 (the least term on each level) for the first time at level 69.
Cf. A263269 (the right edge).
Cf. A262686 (maximum term on the level n).
Cf. A045765 (the leaves of the tree).
Cf. also permutations A263265 (obtained from this table by sorting each row into ascending order), A263266.
Cf. also arrays A265751 and A263271.
Differs from A263265 for the first time at n=31, where a(31) = 40, while A263265(31) = 38.
Cf. also A088975.

Programs

  • PARI
    uplim = 125753; \\ = A263260(10001).
    checklimit = 1440; \\ Hard limit 1440 good for at least up to A002182(67) = 1102701600 as A002183(67) = 1440.
    v263267 = vector(uplim);
    A263267 = n -> if(!n,n,v263267[n]);
    z = 0; for(n=0, uplim, t = A263267(n); write("b263267.txt", n, " ", t); for(k=t+1, t+checklimit, if((k-numdiv(k)) == t, z++; if(z <= uplim, v263267[z] = k))));
    
  • Sage
    # After David Eppstein's Python-code for A088975.
    def A263267():
      '''Breadth-first reading of irregular tree defined by the edge-relation A049820(child) = parent'''
      yield 0
      for x in A263267():
        for k in [x+1 .. 2*(x+1)]:
          if ((k - sloane.A000005(k)) == x): yield k
    def take(n,g):
      '''Returns a list composed of the next n elements returned by generator g.'''
      return [next(g) for _ in range(n)]
    take(120, A263267())
    
  • Scheme
    ;; This version creates the list of terms incrementally, using append! function that physically modifies the list at the same time as it is traversed. Otherwise the idea is essentially the same as with Python/Sage-program above:
    (define (A263267list_up_to_n_terms_at_least n) (let ((terms-produced (list 0))) (let loop ((startp terms-produced) (endp terms-produced) (k (- n 1))) (cond ((<= k 0) terms-produced) (else (let ((children (children-of-n-in-A049820-tree (car startp)))) (cond ((null? children) (loop (cdr startp) endp k)) (else (begin (append! endp children) (loop (cdr startp) children (- k (length children))))))))))))
    (define (children-of-n-in-A049820-tree n) (let loop ((k (A262686 n)) (children (list))) (cond ((<= k n) children) ((= (A049820 k) n) (loop (- k 1) (cons k children))) (else (loop (- k 1) children)))))

A265751 Square array A(row,col): A(row,0) = row and for col >= 1, if A082284(row) is 0, then A(row,col) = 0, otherwise A(row,col) = A(A082284(row),col-1).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 21 2015

Keywords

Comments

The square array A(row>=0, col>=0) is read by downwards antidiagonals as: A(0,0), A(0,1), A(1,0), A(0,2), A(1,1), A(2,0), A(0,3), A(1,2), A(2,1), A(3,0), ...
Each row n lists all the nodes in A263267-tree that one encounters when one starts from node with number n and always chooses the smallest possible child of it [given by A082284(n)], and then the smallest possible child of that child, etc, until a leaf-child (one of the terms of A045765) is encountered, after which the rest of the row contains only zeros.

Examples

			The top left corner of the array:
   0,  1,  3,  5,  7,  0,  0,  0,  0
   1,  3,  5,  7,  0,  0,  0,  0,  0
   2,  6,  9, 11, 13,  0,  0,  0,  0
   3,  5,  7,  0,  0,  0,  0,  0,  0
   4,  8,  0,  0,  0,  0,  0,  0,  0
   5,  7,  0,  0,  0,  0,  0,  0,  0
   6,  9, 11, 13,  0,  0,  0,  0,  0
   7,  0,  0,  0,  0,  0,  0,  0,  0
   8,  0,  0,  0,  0,  0,  0,  0,  0
   9, 11, 13,  0,  0,  0,  0,  0,  0
  10, 14, 20,  0,  0,  0,  0,  0,  0
  11, 13,  0,  0,  0,  0,  0,  0,  0
  12, 18, 22, 25,  0,  0,  0,  0,  0
  13,  0,  0,  0,  0,  0,  0,  0,  0
  14, 20,  0,  0,  0,  0,  0,  0,  0
  15, 17, 19,  0,  0,  0,  0,  0,  0
  16, 24,  0,  0,  0,  0,  0,  0,  0
  17, 19,  0,  0,  0,  0,  0,  0,  0
  18, 22, 25,  0,  0,  0,  0,  0,  0
  19,  0,  0,  0,  0,  0,  0,  0,  0
  20,  0,  0,  0,  0,  0,  0,  0,  0
  21, 23, 27, 29, 31, 35, 37,  0,  0
  22, 25,  0,  0,  0,  0,  0,  0,  0
  23, 27, 29, 31, 35, 37,  0,  0,  0
  ...
Starting from n = 21, we get the following chain: 21 -> 23 -> 27 -> 29 -> 31 -> 35 -> 37, with A082284 iterated 6 times before the final nonzero term 37 (for which A060990(37) = A082284(37) = 0) is encountered. Thus the row 21 of array contains terms 21, 23, 27, 29, 31, 35, 37, followed by an infinite number of zeros.
		

Crossrefs

Cf. also A000005, A045765, A060990.
Column 0: A001477, Column 1: A082284.
Cf. A266111 (number of significant terms on each row, without the trailing zeros).
Cf. A266116 (the rightmost term before trailing zeros).
See also array A263271 constructed in the same way, but obtained by following always the largest child A262686, instead of the smallest child A082284.
Cf. also tree A263267 (and its illustration).

Programs

  • Scheme
    (define (A265751 n) (A265751bi (A002262 n) (A025581 n)))
    (define (A265751bi row col) (cond ((zero? col) row) ((A082284 row) => (lambda (lad) (if (zero? lad) lad (A265751bi lad (- col 1)))))))
    ;; Alternatively:
    (define (A265751bi row col) (cond ((zero? col) row) ((and (zero? row) (= 1 col)) 1) ((zero? (A265751bi row (- col 1))) 0) (else (A082284 (A265751bi row (- col 1))))))

Formula

A(row,0) = row and for col >= 1, if A082284(row) is 0, then A(row,col) = 0, otherwise A(row,col) = A(A082284(row),col-1).
A(0,0) = 0, A(0,1) = 1; if col = 0, A(row,0) = row; and for col > 0, if A(row,col-1) = 0, then A(row,col) = 0, otherwise A(row,col) = A082284(A(row,col-1)).

A264971 If A262686(n) = 0, a(n) = 1, otherwise a(n) = 1 + a(A262686(n)), where A262686(n) = largest number k such that k - d(k) = n, or 0 if no such number exists, and d(n) = the number of divisors of n (A000005).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 29 2015

Keywords

Comments

See comments at A264970.

Crossrefs

One more than A264970.
Number of significant terms on row n of A263271.

Formula

If A060990(n) = 0, a(n) = 1, otherwise a(n) = 1 + a(A262686(n)).
Other identities. For all n >= 0:
a(n) = 1 + A264970(n).
Showing 1-3 of 3 results.