####################### ## A100982 Musings ## ####################### A100982 is the sequence of the counts of admissible sequences per . That is the hammingweight of each admissible sequence, when binary encoded. This binary encoding is the common T(x) parity sequence, when traveling the (3x+1)/2 trajectory from x to its drop. A100982(0) = 1: {0} A100982(1) = 1: {10} A100982(2) = 1: {1100} A100982(3) = 2: {11010,11100} A100982(4) = 3: {1101100,1110100,1111000} ... PARI/GP code: a_iter(N) = { my( a= List([[0, 0, 2, 1, 1, 0]]), p0=#a, p1=#a ); for(p3=0, N-1 , my( p2=logint(3^p3,2)+1, m=if(logint(3^(p3+1), 2)>p2, 2, 1) ); for(p=p0, p1 , my( s= a[p][1] ); for(i=0, if(s, valuation(s, 2)-1, 0) , my( t= [(a[p][1]+(1<: v2 + i*2^p2 --> v3 + i*3^p3 ===-------==----===-------==- 2 + i*2^ 1 -> 1 + i*3^ 0 1 + i*2^ 2 -> 1 + i*3^ 1 3 + i*2^ 4 -> 2 + i*3^ 2 11 + i*2^ 5 -> 10 + i*3^ 3 23 + i*2^ 5 -> 20 + i*3^ 3 59 + i*2^ 7 -> 38 + i*3^ 4 7 + i*2^ 7 -> 5 + i*3^ 4 15 + i*2^ 7 -> 10 + i*3^ 4 123 + i*2^ 8 -> 118 + i*3^ 5 219 + i*2^ 8 -> 209 + i*3^ 5 199 + i*2^ 8 -> 190 + i*3^ 5 39 + i*2^ 8 -> 38 + i*3^ 5 79 + i*2^ 8 -> 76 + i*3^ 5 175 + i*2^ 8 -> 167 + i*3^ 5 95 + i*2^ 8 -> 91 + i*3^ 5 ===-------==----===-------==- CROSSREFS A079946, A014682, A070939, A119733, A126241, A177789, A243115. [Graph code] var url = "https://library.fridoverweij.com/codelab/math_editors/code_your_math_picture.html" function f (x) { return x * (ln(3)/ln(2) - 1) } var fstr = f.toString().replace(/\s+/g," "); fstr = fstr.match(/(?<=[{]).*(?=[}])/).toString(); fstr = fstr.replace(/\s*return\s+/,""); fstr = fstr.replace(/\bln[(]/g,"log("); fstr = "y = " + fstr var w = 8, h = 5 initPicture(-0.9,w+.6,-0.9,h+.4) axes(1, 1, true) gridstroke = "lightgrey" grid() text([0,0], "0", "belowleft") fontsize = "12" text([-0.5,-0.5], url, "belowright") strokewidth = "1" stroke = "tomato" line([0,0],[w+.5,f(w+.5)]) fontstroke = stroke fontfill = fontstroke fontsize = "18" text([0.1,h+.1], fstr, "right") stroke = "blue" fontstroke = stroke fontfill = fontstroke fontsize = "14" line([0,0],[w+.5,0]) var v = ["0", "(1)/2²", "(5)/2⁴", "(23,19)/2⁵", "(85,73,65)/2⁷", "(319,287,283,251,259,227,211)/2⁸"]; fontstroke = "purple" fontfill = fontstroke pointsize = 3 var x0 = 0, y0 = 1 for (x=x0; x<=w; x++) { var y = floor(f(x))+1 line([x,0],[x,y]) if (y0 < y) { line([x,y0],[w+.5,y0]) } y0 = y point([x,y], "open") text([x-0.05-((x>0)*0.1),y+(x>3?0.1:0.15)], v[x], x>3?20:0) } text([-0.2,0.1], 0) text([-0.22,0.5], "/2") text([0.1,0.1], "*3/2+1/2") stroke = "purple" strokewidth = 2 path([[0,0.2],[0,0.8]],"arrow") path([[0.2,0],[0.8,0]],"arrow") [/Graph code]