login
Square array A(n, k), n, k >= 0, read by antidiagonals upwards; A(n, k) = Sum_{ i >= 0 } b_i * 2^(k*i) where n = Sum_{ i >= 0 } b_i * 2^i.
3

%I #15 Mar 01 2022 14:51:56

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

%T 17,32,1,0,1,7,20,65,256,33,64,1,0,2,8,21,72,257,1024,65,128,1,0,2,9,

%U 64,73,272,1025,4096,129,256,1,0,3,10,65,512,273,1056,4097,16384,257,512,1,0

%N Square array A(n, k), n, k >= 0, read by antidiagonals upwards; A(n, k) = Sum_{ i >= 0 } b_i * 2^(k*i) where n = Sum_{ i >= 0 } b_i * 2^i.

%C In other words, in binary expansion of n, replace 2^i by 2^(k*i).

%H Rémy Sigrist, <a href="/A351995/b351995.txt">Table of n, a(n) for n = 0..10010</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%F A(A(n, k), k') = A(n, k*k') for k, k' > 0.

%F A(n, 0) = A000120(n).

%F A(n, 1) = n.

%F A(n, 2) = A000695(n).

%F A(n, 3) = A033045(n).

%F A(n, 4) = A033052(n).

%F A(0, k) = 0.

%F A(1, k) = 1.

%F A(2, k) = 2^k.

%F A(3, k) = 2^k + 1.

%e Square array A(n, k) begins:

%e n\k| 0 1 2 3 4 5 6 7 8 9 10

%e ------------------------------------------------------------------

%e 0| 0 0 0 0 0 0 0 0 0 0 0

%e 1| 1 1 1 1 1 1 1 1 1 1 1

%e 2| 1 2 4 8 16 32 64 128 256 512 1024

%e 3| 2 3 5 9 17 33 65 129 257 513 1025

%e 4| 1 4 16 64 256 1024 4096 16384 65536 262144 1048576

%e 5| 2 5 17 65 257 1025 4097 16385 65537 262145 1048577

%e 6| 2 6 20 72 272 1056 4160 16512 65792 262656 1049600

%e 7| 3 7 21 73 273 1057 4161 16513 65793 262657 1049601

%o (PARI) A(n,k) = { my (v=0, e); while (n, n-=2^e=valuation(n, 2); v+=2^(k*e)); v }

%Y Cf. A000120, A000695, A033045, A033052, A352001.

%K nonn,base,tabl

%O 0,7

%A _Rémy Sigrist_, Feb 27 2022