%I #14 Aug 02 2018 11:54:02
%S 0,1,1,2,3,2,2,3,2,5,5,5,9,6,6,5,2,4,3,3,8,8,8,8,5,8,7,9,6,5,4,6,5,5,
%T 7,11,8,7,8,7,13,10,15,16,16,18,14,9,15,15,11,14,11,12,13,14,12,17,16,
%U 18,18,14,16,15,18,14,17,14,16,17,15,17,18,17,18
%N a(n) = number of k with 1 <= k <= n1 such that a(k) AND a(nk) = a(k) (where AND denotes the bitwise AND operator).
%C This sequence was inspired by A055224.
%C See also A317419, A317441, A317443 and A317585 for similar sequences; these sequences can be defined as a(n) = Sum_{k=1..n1} [P(a(k), a(nk))] for some predicate P in two variables (where [] is an Iverson bracket).
%H Rémy Sigrist, <a href="/A317420/b317420.txt">Table of n, a(n) for n = 1..10000</a>
%e For n = 4:
%e  a(1) AND a(3) = 0 AND 1 = 0 = a(1),
%e  a(2) AND a(2) = 1 AND 1 = 1 = a(2),
%e  a(3) AND a(1) = 1 AND 0 = 0 <> a(3),
%e  hence a(4) = 2.
%o (PARI) a = vector(75); for (n=1, #a, a[n] = sum(k=1, n1, bitand(a[k], a[nk])==a[k]); print1 (a[n] ", "))
%Y Cf. A055224, A317419, A317441, A317443, A317585.
%K nonn,base
%O 1,4
%A _Rémy Sigrist_, Jul 27 2018
