OFFSET
1,2
COMMENTS
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):
- in particular, F_{2,3} = a (this sequence) and F_{3,2} = A304881,
- the powers of q appear in order in F_{p,q},
- every power of q appear in F_{p,q},
- F_{p,q} is a permutation of the natural numbers.
This sequence is a permutation of the natural numbers, with inverse A304872.
The first known fixed points are: 1, 2, 3, 4, 7, 8, 10, 12, 42.
LINKS
Rémy Sigrist, Colored logarithmic scatterplot of the first 100000 terms (where the color is function of A007949(a(n)))
Rémy Sigrist, PARI program for A298196
EXAMPLE
The first terms, alongside their 2-adic and 3-adic valuations, are:
n a(n) v2 v3
-- ---- -- --
1 1 0 0
2 2 1 0
3 3 0 1
4 4 2 0
5 9 0 2
6 5 0 0
7 7 0 0
8 8 3 0
9 27 0 3
10 10 1 0
11 6 1 1
12 12 2 1
13 18 1 2
14 15 0 1
15 11 0 0
16 13 0 0
17 14 1 0
18 21 0 1
19 16 4 0
20 81 0 4
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, May 19 2018
STATUS
approved