login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A283470 a(n) = A004001(A004001(n-1)) XOR A004001(n-A004001(n-1)), a(1) = a(2) = 1. 8

%I #22 Feb 24 2018 07:49:13

%S 1,1,0,0,3,0,0,0,1,0,7,7,0,0,0,0,1,0,3,2,2,1,14,14,15,15,15,0,0,0,0,0,

%T 1,0,3,2,5,5,6,7,4,4,5,4,4,3,3,3,2,29,29,30,30,30,31,31,31,31,0,0,0,0,

%U 0,0,1,0,3,2,5,4,4,7,4,5,10,10,11,10,9,9,14,15,15,14,14,14,13,10,11,11,10,9,9,6,6,6,7,6,6,5,5,5,4,4,4,4,3

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

%H Antti Karttunen, <a href="/A283470/b283470.txt">Table of n, a(n) for n = 1..32768</a>

%F a(n) = A004001(A004001(n-1)) XOR A004001(A080677(n-1)), where XOR is bitwise-xor (A003987)

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

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

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

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

%o (Scheme)

%o (define (A283470 n) (if (<= n 2) 1 (A003987bi (A004001 (A004001 (- n 1))) (A004001 (- n (A004001 (- n 1)))))))

%o ;; A003987bi implements bitwise-XOR (see A003987). Code for A004001 given under that entry.

%Y Cf. A003987, A080677, A283468, A283469, A283472, A283471 (positions of zeros), A283473 (positions where coincides with A004001).

%Y Cf. also A283677.

%K nonn

%O 1,5

%A _Antti Karttunen_, Mar 18 2017

%E Erroneous b-file replaced by a correct one - _Antti Karttunen_, Feb 24 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 16 07:34 EDT 2024. Contains 375959 sequences. (Running on oeis4.)