OFFSET
1,2
COMMENTS
Restricted growth sequence transform of the ordered pair [A007814(A109812(n)), A046523(A005940(1+A109812(n)))].
LINKS
EXAMPLE
(# of trailing 0's) 1-runs (allotted #)
-----+----------------------------------------------------------------------
1 : 1 [1], 0 [1] 1
2 : 2 [10], 1 [1] 2
3 : 4 [100], 2 [1] 3
4 : 3 [11], 0 [2] 4
5 : 8 [1000], 3 [1] 5
6 : 5 [101], 0 [1,1] 6
7 : 10 [1010], 1 [1,1] 7
8 : 16 [10000], 4 [1] 8
9 : 6 [110], 1 [2] 9
10 : 9 [1001], 0 [1,1] 6
11 : 18 [10010], 1 [1,1] 7
Because the combinations of the multiset of 1-runs in the binary expansion of A109812(n) and the number of trailing zeros in it (A351964) are unique for n = 1 .. 9, a unique increasing number (starting from 1) is allotted for each, and a(n) = n for n <= 9. On the other hand, at n=10, the binary expansion is [1001], for which these two measures are equal to that of binary expansion [101] found first time at n=6, therefore the rgs-transform allots for 10 the same number as for 6, and a(10) = a(6) = 6. At n=11, the binary expansion is [10010], where these two measures coincide with that of [1010] found first time at n=7, therefore a(10) = a(7) = 7.
PROG
(PARI)
rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om, invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om, invec[i], i); outvec[i] = u; u++ )); outvec; };
v109812 = readvec("b109812_to10e5.txt"); \\ Prepared from b-file data with gawk ' { print $2 } '
up_to = #v109812;
A109812(n) = v109812[n];
A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
A007814(n) = valuation(n, 2);
A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
A351578(n) = v351578[n];
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Apr 07 2022
STATUS
approved