cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A372360 Array read by upward antidiagonals: A(n, k) = A000120(A372361(n, k)), n,k >= 1; Binary weights of terms of arrays A372359 and A372361.

This page as a plain text file.
%I A372360 #18 Jun 23 2024 16:13:43
%S A372360 0,0,0,0,0,0,0,0,0,1,0,0,0,2,1,0,0,0,1,1,2,0,0,0,0,2,1,0,0,0,0,0,1,0,
%T A372360 0,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,3,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,
%U A372360 0,0,0,0,0,0,0,2,0,1,0,0,0,0,0,0,0,0,0,1,0,3,2,0,0,0,0,0,0,0,0,0,0,0,0,2,3
%N A372360 Array read by upward antidiagonals: A(n, k) = A000120(A372361(n, k)), n,k >= 1; Binary weights of terms of arrays A372359 and A372361.
%C A372360 Entry A(n, k) at row n and column k tells how many bits needs to be flipped in the binary expansion of the (n-1)-th iterate of Reduced Collatz function R, when started from 2*k-1, to obtain the unique term of A086893 with the same binary length as that (n-1)-th iterate. That is, A(n, k) gives the Hamming distance between A372283(n, k) and A086893(1+A000523(A372283(n, k))).
%C A372360 Zeros occur in the same locations as where they occur in A372359, etc.
%F A372360 A(n, k) = A000120(A372361(n, k)) = A000120(A372358(A372283(n, k))).
%F A372360 A(n, k) = A000120(A372359(n, k)) = A000120(A372358(A372282(n, k))).
%e A372360 Array begins:
%e A372360 n\k| 1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
%e A372360 ---+-------------------------------------------------------------------------
%e A372360 1  | 0, 0, 0, 1, 1, 2, 0, 1, 1, 2, 0, 1, 2, 3, 1, 2, 2, 3, 1, 2, 3, 4, 2, 3,
%e A372360 2  | 0, 0, 0, 2, 1, 1, 0, 1, 0, 1, 0, 3, 2, 3, 2, 3, 2, 0, 1, 3, 2, 2, 1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, 0, 0, 0, 0, 3, 0, 2, 0, 0, 0, 0, 6, 0, 0, 4,
%e A372360 16 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 4, 0, 0, 0, 0, 2, 0, 0, 4,
%e A372360 17 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 0, 0, 0, 0, 4, 0, 0, 4,
%e A372360 18 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 4, 0, 0, 3,
%e A372360 19 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 3, 0, 0, 0, 0, 4, 0, 0, 4,
%e A372360 20 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 0, 0, 0, 0, 3, 0, 0, 6,
%e A372360 21 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 6, 0, 0, 0, 0, 4, 0, 0, 4,
%e A372360 We have A372283(5, 14) = 71, and when we compare the binary expansion of 71 = 1000111_2 with the term of A086893 that has a binary expansion of the same length, which in this case is 85 = 1010101_2, we see that only the bits at positions 1 and 4 (indexed from the right hand end, with 0 being the least significant bit position at right) need to be toggled to obtain the 71 from 85 or vice versa, therefore A(5, 14) = 2.
%e A372360 We have A372283(6, 14) = 107 = 1101011_2, and when xored with A086893(7) = 85 = 1010101_2, we obtain A372361(6, 14) = 62 = 111110_2, with five 1-bits, therefore A(6, 14) = 5. I.e., five bits (all except the least and the most significant bit) need to be flipped to change 85 to 107 or vice versa.
%o A372360 (PARI)
%o A372360 up_to = 105;
%o A372360 R(n) = { n = 1+3*n; n>>valuation(n, 2); };
%o A372360 A372283sq(n,k) = if(1==n,2*k-1,R(A372283sq(n-1,k)));
%o A372360 A000523(n) = logint(n,2);
%o A372360 A086893(n) = (if(n%2, 2^(n+1), 2^(n+1)+2^(n-1))\3);
%o A372360 A372358(n) = bitxor(A086893(1+A000523(n)),n);
%o A372360 A372361sq(n,k) = A372358(A372283sq(n,k));
%o A372360 A372361list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A372361sq((a-(col-1)),col))); (v); };
%o A372360 v372361 = A372361list(up_to);
%o A372360 A372361(n) = v372361[n];
%Y A372360 Cf. A000120, A003987, A086893, A372282, A372283, A372287, A372354, A372358, A372360.
%Y A372360 Binary weights of A372359 and A372361.
%Y A372360 Cf. also A372288.
%K A372360 nonn,tabl
%O A372360 1,14
%A A372360 _Antti Karttunen_, May 01 2024