OFFSET
1,2
COMMENTS
The condition "with as many distinct values as possible" means here that for any distinct m and n, provided the orbits of m and n under the map x -> x + pi(x) do not merge, then a(m) <> a(n).
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
EXAMPLE
The first terms, alongside n + pi(n), are:
n a(n) n + pi(n)
-- ---- ---------
1 1 1
2 2 3
3 2 5
4 3 6
5 2 8
6 3 9
7 4 11
8 2 12
9 3 13
10 5 14
11 4 16
12 2 17
PROG
(PARI) u=0; for (n=1, #a=vector(80), if (a[n]==0, a[n]=u++); print1 (a[n]", "); m=n+primepi(n); if (m<=#a, a[m]=a[n]))
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Rémy Sigrist, Jan 17 2021
STATUS
approved