OFFSET
1,2
COMMENTS
This sequence is a variant of A320454.
This sequence is a permutation of the natural numbers, with inverse A320504; the reasoning to prove it is similar to that of A320454.
The prime numbers appear in ascending order as clusters in the sequence; the first prime clusters are:
- 2 terms: a(2) = 2, a(3) = 3,
- 2 terms: a(8) = 5, a(9) = 7,
- 12 terms: a(46) = 11, ..., a(57) = 53,
- 400 terms: a(2638) = 59, ..., a(3037) = 2861,
- 552398 terms: a(9149634) = 2879, ..., a(9702031) = 8207707.
The next prime cluster is expected to appear after the occurrence of the term 8207707^2.
The first known fixed points are: 1, 2, 3, 4, 10, 58, 84367, 2934331.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, Scatterplot of the first 10000000 terms (with prime terms highlighted)
Rémy Sigrist, C program for A320503
EXAMPLE
MATHEMATICA
Nest[Append[#, Block[{k = 3, p}, While[Nand[Set[p, FactorInteger[k][[1, 1]]] <= NextPrime[#[[-1, -1]] ], FreeQ[#[[All, 1]], k ]], k++]; {k, p}]] &, {{1, 1}, {2, 2}}, 65][[All, 1]] (* Michael De Vlieger, Oct 17 2018 *)
PROG
(C) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Oct 13 2018
STATUS
approved