# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a351578 Showing 1-1 of 1 %I A351578 #18 Apr 07 2022 12:14:19 %S A351578 1,2,3,4,5,6,7,8,9,6,7,10,6,11,12,13,14,6,15,16,15,16,17,18,7,16,19, %T A351578 20,21,22,18,7,16,22,6,22,18,17,23,24,25,15,16,26,16,27,28,23,29,30, %U A351578 23,22,6,31,16,7,32,33,15,33,18,22,18,27,33,16,22,34,23,17,25,27,16,35,36,37,38,32,28,32,39,18,40,16 %N A351578 Lexicographically earliest infinite sequence such that a(i) = a(j) => A007814(f(i)) = A007814(f(j)) and A278222(f(i)) = A278222(f(j)), for all i, j >= 1, where f(k) = A109812(k). %C A351578 Restricted growth sequence transform of the ordered pair [A007814(A109812(n)), A046523(A005940(1+A109812(n)))]. %C A351578 The sequence allots a new distinct number for each newly encountered combination of the 2-adic valuation of A109812 (A351964), and the multiset of the lengths of 1-runs in the odd part of A109812 (A351965). See the examples. %C A351578 For all i, j: a(i) = a(j) => A352889(i) = A352889(j). %H A351578 Antti Karttunen, Table of n, a(n) for n = 1..100000 %H A351578 Index entries for sequences related to binary expansion of n %e A351578 n A109812(n) [base-2] A351964(n) Lengths of a(n) %e A351578 (# of trailing 0's) 1-runs (allotted #) %e A351578 -----+---------------------------------------------------------------------- %e A351578 1 : 1 [1], 0 [1] 1 %e A351578 2 : 2 [10], 1 [1] 2 %e A351578 3 : 4 [100], 2 [1] 3 %e A351578 4 : 3 [11], 0 [2] 4 %e A351578 5 : 8 [1000], 3 [1] 5 %e A351578 6 : 5 [101], 0 [1,1] 6 %e A351578 7 : 10 [1010], 1 [1,1] 7 %e A351578 8 : 16 [10000], 4 [1] 8 %e A351578 9 : 6 [110], 1 [2] 9 %e A351578 10 : 9 [1001], 0 [1,1] 6 %e A351578 11 : 18 [10010], 1 [1,1] 7 %e A351578 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. %o A351578 (PARI) %o A351578 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; }; %o A351578 v109812 = readvec("b109812_to10e5.txt"); \\ Prepared from b-file data with gawk ' { print $2 } ' %o A351578 up_to = #v109812; %o A351578 A109812(n) = v109812[n]; %o A351578 A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); }; %o A351578 A007814(n) = valuation(n,2); %o A351578 A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523 %o A351578 v351578 = rgs_transform(vector(up_to, n, [A007814(A109812(n)), A046523(A005940(1+A109812(n)))])); %o A351578 A351578(n) = v351578[n]; %Y A351578 Cf. A007814, A109812, A278222 (A286622), A351963, A351964, A351965, A352888, A352889. %K A351578 nonn,base %O A351578 1,2 %A A351578 _Antti Karttunen_, Apr 07 2022 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE