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”).

a(n) = A004001(A004001(n-1)) AND A004001(n-A004001(n-1)), a(1) = a(2) = 0.
6

%I #12 Mar 19 2017 01:09:04

%S 0,0,1,1,0,2,2,2,2,3,0,0,4,4,4,4,4,5,4,5,5,6,0,0,0,0,0,8,8,8,8,8,8,9,

%T 8,9,8,8,8,8,10,10,10,11,11,12,12,12,13,0,0,0,0,0,0,0,0,0,16,16,16,16,

%U 16,16,16,17,16,17,16,17,17,16,18,18,16,16,16,17,18,18,16,16,16,17,17,17,18,20,20,20,21,22,22,24,24,24,24

%N a(n) = A004001(A004001(n-1)) AND A004001(n-A004001(n-1)), a(1) = a(2) = 0.

%H Antti Karttunen, <a href="/A283472/b283472.txt">Table of n, a(n) for n = 1..16384</a>

%F a(1) = a(2) = 0; for n > 2, a(n) = A004001(A004001(n-1)) AND A004001(A080677(n-1)), where AND is bitwise-and (A004198).

%F Other identities. For all n >= 1:

%F a(n) = A283469(n) - A283470(n).

%F A004001(n) = A283469(n) + a(n) = A283470(n) + 2*a(n).

%t a[n_] := a[n] = If[n <= 2, 1, a[a[n - 1]] + a[n - a[n - 1]]]; Table[BitAnd[a[#], a[n - #]] &@ a[n - 1] - Boole[n <= 2], {n, 97}] (* _Michael De Vlieger_, Mar 18 2017, after _Robert G. Wilson v_ at A004001 *)

%o (Scheme) (define (A283472 n) (if (<= n 2) 0 (A004198bi (A004001 (A004001 (- n 1))) (A004001 (- n (A004001 (- n 1)))))))

%o ;; A004198bi implements bitwise-AND (see A004198). Code for A004001 given under that entry.

%Y Cf. A004001, A004198, A283469, A283470, A283473 (positions of zeros).

%K nonn

%O 1,6

%A _Antti Karttunen_, Mar 18 2017