Displaying 1-3 of 3 results found.
page
1
Table of binary string substitutions: a(i,j) is obtained by substituting i for each 1-bit in j.
+10
4
1, 2, 2, 3, 4, 3, 4, 6, 10, 4, 5, 8, 15, 8, 5, 6, 10, 36, 12, 18, 6, 7, 12, 45, 16, 27, 20, 7, 8, 14, 54, 20, 68, 30, 42, 8, 9, 16, 63, 24, 85, 72, 63, 16, 9, 10, 18, 136, 28, 102, 90, 292, 24, 34, 10, 11, 20, 153, 32, 119, 108, 365, 32, 51, 36, 11, 12, 22, 170, 36, 264, 126, 438, 40, 132, 54, 74, 12
FORMULA
Table origin is a(1,1).
a(1,n) = a(n,1) = n.
a(0,n) = a(n,0) = 0.
EXAMPLE
a(3,5): 5 = 101_2 -> (3)0(3) = (11)0(11)_2 = 11011_2 = 27.
a(5,3): 3 = 11_2 -> (5)(5) = (101)(101)_2 = 101101_2 = 45.
PROG
(PARI) T(n, k) = my(bk=binary(k), sn=Str(fromdigits(binary(n))), s=""); for (i=1, #bk, if (bk[i] == 1, s=concat(s, sn), s=concat(s, "0"))); fromdigits(apply(eval, Vec(s)), 2); \\ Michel Marcus, Feb 11 2023
Binary string self-substitutions: a(n) is obtained by substituting the binary expansion of n for each 1-bit in the binary expansion of n.
+10
4
0, 1, 4, 15, 16, 85, 108, 511, 64, 585, 660, 5819, 816, 7085, 7644, 65535, 256, 4369, 4644, 78451, 5200, 87381, 91564, 1531639, 6336, 105625, 109876, 1825659, 118384, 1961821, 2029500, 33554431, 1024, 33825, 34884, 1149155, 37008, 1217189, 1250124, 41056743
FORMULA
a(0) = 0. a(2^n) = 4^n. a(4n+2) = (4n+2)*(1+a(4n+1)/(4n+1)).
a(n) =z(n, n) with z(u, v) = if u=0 then 0 else if u mod 2 = 0 then z(u/2, v)*2 else z([u/2], v)* A062383(v)+v. - Reinhard Zumkeller, Feb 15 2004
EXAMPLE
a(5): 5 = 101 -> (101)0(101) = 1010101 = 85.
MATHEMATICA
bss[n_]:=Module[{idn2=IntegerDigits[n, 2]}, FromDigits[Flatten[idn2/.{1-> idn2}], 2]]; Array[bss, 40, 0] (* Harvey P. Dale, Aug 15 2017 *)
PROG
(Python)
def a(n): b = bin(n)[2:]; return int(b.replace("1", b), 2)
Table of reduced binary string substitutions: a(i,j) is obtained by substituting i for each 1-bit in j, then dividing by i.
+10
3
1, 1, 2, 1, 2, 3, 1, 2, 5, 4, 1, 2, 5, 4, 5, 1, 2, 9, 4, 9, 6, 1, 2, 9, 4, 9, 10, 7, 1, 2, 9, 4, 17, 10, 21, 8, 1, 2, 9, 4, 17, 18, 21, 8, 9, 1, 2, 17, 4, 17, 18, 73, 8, 17, 10, 1, 2, 17, 4, 17, 18, 73, 8, 17, 18, 11, 1, 2, 17, 4, 33, 18, 73, 8, 33, 18, 37, 12, 1, 2, 17, 4, 33, 34, 73, 8, 33
COMMENTS
Table origin is a(1,1). a(1,n)=n. a(n,1)=1. By convention a(0,n)=a(n,0)=0. a(i,j)= A065157(i,j)/i. a(n,n)= A065160(n)= A065159(n)/n.
EXAMPLE
a(3,5): 5=101->(3)0(3)=(11)0(11)=11011=27; 27/3=9. a(5,3): 3=11->(5)(5)=(101)(101)=101101=45; 45/5=9
Search completed in 0.007 seconds
|