A372368 a(1) = 1. Thereafter, if A007947(a(n-1)) is a term in A002110, a(n) is the smallest prime not already in the sequence. Otherwise a(n) is the smallest novel multiple of p, the greatest prime < g = gpd(a(n-1)).
1, 2, 3, 4, 5, 6, 7, 10, 9, 8, 11, 14, 15, 12, 13, 22, 21, 20, 18, 17, 26, 33, 28, 25, 24, 19, 34, 39, 44, 35, 30, 23, 38, 51, 52, 55, 42, 40, 27, 16, 29, 46, 57, 68, 65, 66, 49, 45, 36, 31, 58, 69, 76, 85, 78, 77, 56, 50, 48, 37, 62, 87, 92, 95, 102, 91, 88, 63
Offset: 1
Keywords
Examples
rad(a(1)) = rad(1) = 1 = A002110(0), hence a(2) = 2, the smallest novel prime. rad(a(2)) = rad(2) = 2 = A002110(1), so a(3) = 3, the smallest novel prime. a(3) = 3 is not a term in A002110 so a(4) = 4, the least novel multiple of p = 2. rad(a(4)) = rad(4) = 2 = A002110(1), so a(5) = next novel prime = 5. Define condition [A] to be the entry of smallest missing prime given primorial rad(a(n-1)), and define condition [B] to be the entry of a(n) = m * p. The following illustrates the cycle following a(32) = prime(9) = 23. This cycle is "full", ending with a power of 2. We mark condition [A] in the last column, all unmarked terms come about through condition [B]. prime factors n a(n) 2 3 5 7 11 13 17 19 23 29 m g ----------------------------------------------- 32 23 . . . . . . . . 1 (1) 23 [A] 33 38 1 . . . . . . 1 2 19 34 51 . 1 . . . . 1 3 17 35 52 2 . . . . 1 4 13 36 55 . . 1 . 1 5 11 37 42 1 1 . 1 6 7 38 40 3 . 1 8 5 39 27 . 3 9 3 40 16 4 8 2 41 29 . . . . . . . . . 1 (1) 29 [A] a(41) = 29 since rad(a(40)) = rad(16) = 2 = A002110(1).Earliest example of a prime that comes in through condition [B]: prime factors n a(n) 2 3 5 7 11 13 17 19 ~ 313 317 331 m g ------------------------------------------------------------ 3473 2850 1 1 2 . . . . 1 150 19 3474 2805 . 1 1 . 1 . 1 165 17 3475 2730 1 1 1 1 . 1 210 13 3476 2695 . . 1 2 1 245 11 3477 2317 . . . 1 . . . . ~ . . 1 331 7 3478 317 . . . . . . . . ~ . 1 1 317 3479 1252 2 . . . . . . . ~ 1 4 313 a(3496) = 2695 = 5*7^2*11, which is not in A002110, so a(3497) = smallest novel multiple of 7 = m*7 for m = 331 (prime). Thus a(3497) = 7*331 = 2317. This implies a(3498) = m*317 for m = 1 (since 317 is the greatest prime < 331). Condition [B] becomes the most frequent source of primes in the sequence as n increases.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..3600000.
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..120000, showing primes in red, perfect prime powers in gold, squarefree composites in green, and numbers neither squarefree nor prime powers in blue and purple, where purple shows powerful numbers that are not prime powers.
- Michael De Vlieger, Notes on this sequence.
Programs
-
Mathematica
nn = 1000; c[] := False; m[] := 1; P = FoldList[Times, 1, Prime@ Range[120]]; a[1] = j = 1; c[1] = True; v = 2; Monitor[Do[ If[MemberQ[P, Times @@ #[[All, 1]]], k = v, While[c[Set[k, # m[#]]], m[#]++] &[ Prime[PrimePi[#[[-1, 1]] ] - 1] ] ] &[FactorInteger[j]]; Set[{a[n], c[k], j}, {k, True, k}]; If[k == v, While[Or[c[v], CompositeQ[v]], v++]], {n, 2, nn}], n]; Array[a, nn]
Comments