[go: up one dir, main page]

login
Search: a264971 -id:a264971
     Sort: relevance | references | number | modified | created      Format: long | short | data
Square array A(row,col): A(row,0) = row and for col >= 1, if A262686(row) is 0, then A(row,col) = 0, otherwise A(row,col) = A(A262686(row),col-1).
+10
4
0, 2, 1, 6, 4, 2, 12, 8, 6, 3, 18, 0, 12, 5, 4, 22, 0, 18, 7, 8, 5, 30, 0, 22, 0, 0, 7, 6, 34, 0, 30, 0, 0, 0, 12, 7, 42, 0, 34, 0, 0, 0, 18, 0, 8, 46, 0, 42, 0, 0, 0, 22, 0, 0, 9, 54, 0, 46, 0, 0, 0, 30, 0, 0, 11, 10, 58, 0, 54, 0, 0, 0, 34, 0, 0, 16, 14, 11
OFFSET
0,2
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 n and always chooses the largest possible child of it (A262686), and then the largest 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.
FORMULA
A(row,0) = row and for col >= 1, if A262686(row) is 0, then A(row,col) = 0, otherwise A(row,col) = A(A262686(row),col-1).
A(0,0) = 0, A(0,1) = 2; 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) = A262686(A(row,col-1)). [Another, perhaps more intuitive recurrence for this array.] - Antti Karttunen, Dec 21 2015
EXAMPLE
The top left corner of the array:
0, 2, 6, 12, 18, 22, 30, 34, 42, 46, 54, 58, 66, 0, 0, 0, 0
1, 4, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
2, 6, 12, 18, 22, 30, 34, 42, 46, 54, 58, 66, 0, 0, 0, 0, 0
3, 5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
4, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
5, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
6, 12, 18, 22, 30, 34, 42, 46, 54, 58, 66, 0, 0, 0, 0, 0, 0
7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
9, 11, 16, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
10, 14, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
11, 16, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
12, 18, 22, 30, 34, 42, 46, 54, 58, 66, 0, 0, 0, 0, 0, 0, 0
13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
14, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
15, 17, 21, 23, 27, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
...
PROG
(Scheme)
(define (A263271 n) (A263271bi (A002262 n) (A025581 n)))
(define (A263271bi row col) (cond ((zero? col) row) ((A262686 row) => (lambda (lad) (if (zero? lad) lad (A263271bi lad (- col 1)))))))
;; An alternative implementation, reflecting the new recurrence:
(define (A263271bi row col) (cond ((zero? col) row) ((and (zero? row) (= 1 col)) 2) ((zero? (A263271bi row (- col 1))) 0) (else (A262686 (A263271bi row (- col 1))))))
CROSSREFS
Column 0: A001477, Column 1: A262686.
Cf. A264971 (number of significant terms on each row, position where the first trailing zero-term occurs).
Cf. A264970.
Cf. also A000005, A045765, A263267.
See also array A265751 constructed in the same way, but obtained by following always the smallest child A082284, instead of the largest child A262686.
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, Nov 29 2015
STATUS
approved
If A262686(n) = 0, a(n) = 0, 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).
+10
4
12, 2, 11, 2, 1, 1, 10, 0, 0, 3, 2, 2, 9, 0, 1, 5, 1, 4, 8, 0, 0, 3, 7, 2, 0, 0, 2, 1, 0, 1, 6, 6, 1, 0, 5, 5, 0, 0, 6, 4, 0, 1, 4, 0, 1, 3, 3, 2, 5, 0, 0, 1, 0, 2, 2, 0, 0, 1, 1, 4, 4, 3, 3, 0, 0, 2, 0, 0, 0, 1, 2, 3, 3, 2, 0, 0, 2, 1, 4, 0, 1, 1, 3, 3, 2, 0, 2, 2, 0, 4, 3, 1, 1, 3, 2, 5, 1, 4, 0, 2, 0
OFFSET
0,1
COMMENTS
a(n) = number of iterations of A262686 needed before zero is reached. In the context of tree (A263267) defined by edge-relation A049820(child) = parent, this is the number of hops we make before reaching one of the leaves (A045765), when we start from n and always select the largest child at each iteration.
LINKS
FORMULA
If A060990(n) = 0, a(n) = 0, otherwise a(n) = 1 + a(A262686(n)).
Other identities. For all n >= 0:
a(n) = A264971(n) - 1.
PROG
(Scheme, with memoization-macro definec)
(definec (A264970 n) (cond ((A262686 n) => (lambda (lad) (if (zero? lad) 0 (+ 1 (A264970 lad)))))))
CROSSREFS
Cf. A045765 (positions of zeros).
One less than A264971.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Nov 29 2015
STATUS
approved
If A082284(n) = 0, a(n) = 1, otherwise a(n) = 1 + a(A082284(n)), where A082284(n) = smallest 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).
+10
3
5, 4, 5, 3, 2, 2, 4, 1, 1, 3, 3, 2, 4, 1, 2, 3, 2, 2, 3, 1, 1, 7, 2, 6, 1, 1, 3, 5, 1, 4, 5, 3, 2, 1, 4, 2, 1, 1, 3, 3, 1, 2, 3, 1, 2, 9, 2, 8, 2, 1, 1, 7, 1, 6, 4, 1, 1, 5, 3, 4, 8, 3, 2, 1, 1, 2, 1, 1, 1, 5, 2, 4, 7, 3, 1, 1, 9, 2, 5, 1, 2, 8, 4, 7, 6, 1, 3, 6, 1, 5, 13, 6, 2, 4, 12, 5, 5, 4, 1, 3, 1, 2, 11, 1, 4, 3, 10, 2, 1, 1, 2, 2, 1, 1, 9, 3, 1, 1, 8, 2, 3, 7
OFFSET
0,1
LINKS
FORMULA
If A060990(n) = 0, a(n) = 1, otherwise a(n) = 1 + a(A082284(n)).
Other identities. For all n >= 0:
a(n) = 1 + A266110(n).
EXAMPLE
Starting from n = 21, we get the following chain: 21 -> 23 -> 27 -> 29 -> 31 -> 35 -> 37, with A082284 iterated 6 times before the final term 37 (for which A060990(37) = A082284(37) = 0) is encountered. Here we count the terms (not steps) in whole chain, thus a(21) = 7.
PROG
(Scheme, with memoization-macro definec)
(definec (A266111 n) (cond ((A082284 n) => (lambda (lad) (if (zero? lad) 1 (+ 1 (A266111 lad)))))))
CROSSREFS
One more than A266110.
Number of significant terms on row n of A265751 (without its trailing zeros).
Cf. tree A263267 (and its illustration).
Cf. also A264971.
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 21 2015
STATUS
approved

Search completed in 0.007 seconds