Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #13 Dec 15 2024 12:58:14
%S 1,2,1,3,4,2,1,5,1,6,1,3,1,2,4,7,1,2,1,8,1,2,1,5,9,2,1,3,1,6,1,10,1,2,
%T 4,3,1,2,1,11,1,2,1,3,4,2,1,7,1,12,1,3,1,2,4,5,1,2,1,8,1,2,1,13,4,2,1,
%U 3,1,6,1,5,1,2,9,3,1,2,1,14,1,2,1,3,4,2,1,5,1,6,1,3,1,2,4,10,1,2,1,15,1,2,1,5,4
%N Lexicographically earliest infinite sequence such that a(i) = a(j) => v_2(i) = v_2(j) and v_5(i) = v_5(j), for all i, j, where v_2 (A007814) and v_5 (A112765) give the 2- and 5-adic valuations of n respectively.
%C Restricted growth sequence transform of A132741, or equally, of the ordered pair [A007814(n), A112765(n)].
%C For all i, j:
%C A379005(i) = A379005(j) => a(i) = a(j).
%C A379003 (after its initial 0) and this sequence are ordinal transforms of each other.
%H Antti Karttunen, <a href="/A379004/b379004.txt">Table of n, a(n) for n = 1..100000</a>
%o (PARI)
%o up_to = 100000;
%o 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 v379004 = rgs_transform(vector(up_to, n, [valuation(n,2), valuation(n,5)]));
%o A379004(n) = v379004[n];
%Y Cf. A007814, A112765, A132741, A379003 (ordinal transform), A379005.
%K nonn,look,new
%O 1,2
%A _Antti Karttunen_, Dec 15 2024