OFFSET
1,2
COMMENTS
All prime numbers appear in the sequence, in ascending order.
This sequence is likely a permutation of the natural numbers.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, Scatterplot of (n, a(n)-n) for n = 1..250000
Rémy Sigrist, PARI program for A330647
EXAMPLE
The first terms, alongside the corresponding t(n), are:
n a(n) t(n)
-- ---- ----
1 1 1
2 2 2
3 3 6
4 5 30
5 6 5
6 4 20
7 7 140
8 9 1260
9 10 126
10 11 1386
MATHEMATICA
Nest[Append[#1, Block[{k = 2, s}, While[Nand[FreeQ[#1[[All, 1]], k], MemberQ[{1, k}, Set[s, GCD[#3, k]]]], k++]; {k, If[s == 1, #3 k, #3/k]}]] & @@ {#, #[[-1, 1]], #[[-1, -1]]} &, {{1, 1}}, 66][[All, 1]] (* Michael De Vlieger, Dec 23 2019 *)
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Dec 22 2019
STATUS
approved