The OEIS is supported by the many generous donors to the OEIS Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A340716 Lexicographically earliest sequence of positive integers with as many distinct values as possible such that for any n > 0, a(n + pi(n)) = a(n) (where pi(n) = A000720(n) corresponds to the number of prime numbers <= n). 2
 1, 2, 2, 3, 2, 3, 4, 2, 3, 5, 4, 2, 3, 5, 6, 4, 2, 7, 3, 5, 6, 4, 8, 2, 7, 9, 3, 5, 6, 4, 10, 8, 2, 7, 9, 3, 5, 11, 6, 4, 12, 10, 8, 2, 7, 9, 3, 13, 5, 11, 6, 4, 14, 12, 10, 15, 8, 2, 7, 9, 16, 3, 13, 5, 11, 6, 4, 17, 14, 12, 10, 15, 8, 2, 18, 7, 9, 19, 16, 3 (list; graph; refs; listen; history; text; internal format)
 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). This sequence has similarities with A003602 (A003602(2*n) = A003602(n)) and with A163491 (A163491(n+ceiling(n/2)) = A163491(n)). LINKS Rémy Sigrist, Table of n, a(n) for n = 1..10000 FORMULA a(n) = 2 iff n belongs to A061535. a(A095116(n)) = n + 1. 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 See A003602, A163491 and A340717 for similar sequences. Cf. A000720, A095117. Sequence in context: A222127 A221999 A222334 * A181948 A238943 A070081 Adjacent sequences:  A340713 A340714 A340715 * A340717 A340718 A340719 KEYWORD nonn,look AUTHOR Rémy Sigrist, Jan 17 2021 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 24 18:11 EDT 2022. Contains 356949 sequences. (Running on oeis4.)