Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #17 May 22 2018 20:32:28
%S 1,2,3,4,9,5,7,8,27,10,6,12,18,15,11,13,14,21,16,81,17,19,20,36,45,22,
%T 24,54,30,33,23,25,26,39,28,63,29,31,32,243,34,42,48,162,51,35,37,38,
%U 57,40,108,72,135,41,43,44,90,60,99,46,66,69,47,49,50,75
%N Lexicographically earliest sequence of distinct positive terms such that for any n > 0, the 2-adic valuation of a(n) equals the 3-adic valuation of a(n+1).
%C The 2-adic and 3-adic valuations of a number are respectively given by A007814 and by A007949.
%C For any distinct prime numbers p and q, let F_{p,q} be the lexicographically earliest sequence of distinct positive terms such that for any n > 0, the p-adic valuation of F_{p,q}(n) equals the q-adic valuation of F_{p,q}(n+1):
%C - in particular, F_{2,3} = a (this sequence) and F_{3,2} = A304881,
%C - the powers of q appear in order in F_{p,q},
%C - every power of q appear in F_{p,q},
%C - F_{p,q} is a permutation of the natural numbers.
%C This sequence is a permutation of the natural numbers, with inverse A304872.
%C The first known fixed points are: 1, 2, 3, 4, 7, 8, 10, 12, 42.
%H Rémy Sigrist, <a href="/A298196/a298196.png">Colored logarithmic scatterplot of the first 100000 terms</a> (where the color is function of A007949(a(n)))
%H Rémy Sigrist, <a href="/A298196/a298196_1.gp.txt">PARI program for A298196</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%e The first terms, alongside their 2-adic and 3-adic valuations, are:
%e n a(n) v2 v3
%e -- ---- -- --
%e 1 1 0 0
%e 2 2 1 0
%e 3 3 0 1
%e 4 4 2 0
%e 5 9 0 2
%e 6 5 0 0
%e 7 7 0 0
%e 8 8 3 0
%e 9 27 0 3
%e 10 10 1 0
%e 11 6 1 1
%e 12 12 2 1
%e 13 18 1 2
%e 14 15 0 1
%e 15 11 0 0
%e 16 13 0 0
%e 17 14 1 0
%e 18 21 0 1
%e 19 16 4 0
%e 20 81 0 4
%o (PARI) See Links section.
%Y Cf. A007814, A007949, A304872 (inverse), A304881.
%K nonn
%O 1,2
%A _Rémy Sigrist_, May 19 2018