OFFSET
1,2
COMMENTS
This sequence is a permutation of the natural numbers, with inverse A320455:
- by induction: for any k > 0, every number with greatest prime factor prime(k) (where prime(k) denotes the k-th prime number) appear in the sequence:
- for k = 1: we can always choose a number with greatest prime factor 2, so eventually every number with greatest prime factor 2 will appear in the sequence,
- for any k > 1: provided every number with greatest prime factor prime(k) appear in the sequence: after a number with greatest prime factor prime(k), say w, we can always choose a number < w with greatest prime factor prime(k+1), so eventually every number with greatest prime factor prime(k+1) will appear in the sequence, QED.
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(6) = 5, a(7) = 7,
- 2 terms: a(14) = 11, a(15) = 13,
- 5 terms: a(32) = 17, ..., a(36) = 31,
- 7 terms: a(56) = 37, ..., a(62) = 61,
- 14 terms: a(139) = 67, ..., a(152) = 131,
- 26 terms: a(343) = 137, ..., a(368) = 271,
- 43 terms: a(745) = 277, ..., a(787) = 547,
- 85 terms: a(1893) = 557, ..., a(1977) = 1109,
- 145 terms: a(3963) = 1117, ..., a(4107) = 2221,
- 276 terms: a(10047) = 2237, ..., a(10322) = 4463,
- 506 terms: a(24973) = 4481, ..., a(25478) = 8951,
- 942 terms: a(44952) = 8963, ..., a(45893) = 17923.
See A320503 for a similar sequence.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, Scatterplot of the first 50000 terms (with prime terms highlighted)
Rémy Sigrist, PARI program for A320454
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
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Rémy Sigrist, Oct 13 2018
STATUS
approved