login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A262904
If n = A259934(k) then a(n) = k, otherwise largest k such that A259934(k) is an ancestor of n in a tree generated by edge-relation A049820(child) = parent.
8
0, 0, 1, 0, 0, 0, 2, 0, 0, 2, 2, 2, 3, 2, 2, 2, 2, 2, 4, 2, 2, 2, 5, 2, 2, 5, 5, 2, 5, 2, 6, 2, 5, 2, 7, 2, 2, 2, 7, 2, 5, 2, 8, 2, 7, 2, 9, 2, 7, 9, 7, 2, 9, 2, 10, 2, 7, 2, 11, 2, 7, 2, 12, 2, 2, 2, 11, 2, 12, 2, 13, 2, 7, 2, 13, 2, 13, 2, 14, 2, 13, 13, 14, 13, 7, 13, 14, 13, 13, 13, 15, 13, 14, 13, 16, 13, 7, 13, 14, 13, 13, 13, 17, 13, 7, 13, 18, 13, 7, 13, 17, 13, 17, 13, 19, 13, 17, 13, 20, 13, 7, 21
OFFSET
0,7
LINKS
FORMULA
If A262693(n) = 1 then a(n) = A262694(n) [i.e., when n = A259934(k), a(n) = k], otherwise a(n) = a(A049820(n)).
a(n) = A262694(A262679(n)).
Other identities. For all n >= 0:
a(A262896(n)) = n. [This sequence works as a left inverse for injection A262896.]
PROG
(Scheme, two variants)
(definec (A262904 n) (cond ((= 1 (A262693 n)) (A262694 n)) (else (A262904 (A049820 n)))))
(define (A262904 n) (A262694 (A262679 n)))
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 07 2015
STATUS
approved