login
Characteristic function for A266114 (numbers that are least siblings in A263267-tree).
4

%I #10 Dec 23 2015 14:11:15

%S 1,0,1,0,1,1,1,1,1,0,1,0,1,1,0,0,1,1,1,1,0,1,1,1,1,0,1,0,1,0,1,1,0,1,

%T 1,0,1,1,0,1,1,0,1,1,0,1,1,0,1,1,1,0,1,0,0,1,1,1,1,0,1,1,0,0,1,0,1,1,

%U 0,0,1,1,1,1,0,0,1,0,1,0,1,1,1,1,0,1,1,1,1,0,0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0,1,0,0,0,1,1,0,1,0,1,1,1,1,0,1,0,1,0,1,1

%N Characteristic function for A266114 (numbers that are least siblings in A263267-tree).

%C a(n) = 1 if there doesn't exist any k < n such that k - tau(k) = n - tau(n), and 0 otherwise. Here tau(n) = A000005(n), the number of divisors of n.

%C Also the characteristic function for the range of A082284 (with zero excluded).

%H Antti Karttunen, <a href="/A266112/b266112.txt">Table of n, a(n) for n = 1..131072</a>

%o (Scheme)

%o (define (A266112 n) (let ((parent (- n (A000005 n)))) (let loop ((k (- n 1))) (cond ((<= k parent) 1) ((= (- k (A000005 k)) parent) 0) (else (loop (- k 1)))))))

%Y Cf. A000005, A082284, A263267, A266114, A266115.

%Y Cf. A266113 (partial sums).

%K nonn

%O 1

%A _Antti Karttunen_, Dec 21 2015