A376839 a(1) = 1. For n > 1 if A007947(a(n-1)) is in A002110, a(n) is the smallest prime not already a term. Otherwise a(n) is the least novel multiple of the smallest non divisor prime of a(n-1).
1, 2, 3, 4, 5, 6, 7, 8, 11, 10, 9, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 23, 26, 27, 28, 30, 29, 32, 31, 34, 33, 36, 37, 38, 39, 40, 42, 25, 44, 45, 46, 48, 41, 50, 51, 52, 54, 43, 56, 57, 58, 60, 47, 62, 63, 64, 53, 66, 35, 68, 69, 70, 72, 59, 74, 75
Offset: 1
Keywords
Examples
a(1) = 1 = A002110(0) so a(2) = 2 (smallest prime not already a term). a(2) = 2 = A002110(1) so a(3) = 3. a(3) = 3 not a term in A002110 so a(4) is least novel multiple of 2, the least non divisor prime of 3. Therefore a(4) = 4 since 2 has occurred earlier. a(39) = 42, not a term in A002110 so a(40) = 25, the least novel multiple of 5, the smallest non divisor prime of 42.
Links
- Michael De Vlieger, Table of n, a(n) for n = 1..10000
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^20.
- Michael De Vlieger, Log log scatterplot of a(n), n = 1..2^14, showing primes in red, perfect prime powers in gold, squarefree composites in green, and numbers neither squarefree nor prime powers in blue or purple, with the latter additionally representing powerful numbers that are not prime powers.
Crossrefs
Programs
-
Mathematica
nn = 120; c[] := False; m[] := 1; f[x_] := FactorInteger[x][[All, 1]]; Array[Set[{a[#], c[#], m[#]}, {#, True, 2}] &, 2]; j = 2; v = 3; Do[If[Or[IntegerQ@ Log2[j], And[EvenQ[j], Union@ Differences@ PrimePi[#] == {1}]], k = v; While[c[k*m[k]], m[k]++]; k *= m[k], k = 2; While[Divisible[j, k], k = NextPrime[k]]; While[c[k*m[k]], m[k]++]; k *= m[k]] &[f[j]]; Set[{a[n], c[k], j}, {k, True, k}]; If[k == v, While[c[v], v = NextPrime[v]]], {n, 3, nn}]; Array[a, nn] (* Michael De Vlieger, Oct 09 2024 *)
Extensions
More terms from Michael De Vlieger, Oct 09 2024
Comments