login
A377566
Lexicographically earliest infinite sequence of distinct positive integers such that if j = a(n-1) is primorial, a(n) is the smallest prime not already a term, whereas if j is not primorial a(n) is the smallest novel number > j divisible by rad(j).
1
1, 2, 3, 6, 5, 10, 20, 30, 7, 14, 28, 42, 84, 126, 168, 210, 11, 22, 44, 66, 132, 198, 264, 330, 660, 990, 1320, 1650, 1980, 2310, 13, 26, 52, 78, 156, 234, 312, 390, 780, 1170, 1560, 1950, 2340, 2730, 5460, 8190, 10920, 13650, 16380, 19110, 21840, 24570, 27300, 30030, 17
OFFSET
1,2
COMMENTS
In other words: j in A002110 implies a(n) = p, next missing prime; j not in A002110 implies a(n) = m*rad(j), with minimal novel m.
Immediately following odd prime term p = prime(n), 2*p occurs, and as the sequence extends, multiples of intervening primes q; 2<q<=p occur in order until eventually q = prevprime(p), whereupon primorial(n) occurs. A101301(n) gives the number of steps (terms) from prime(n) to A002110(n).
Sequence can be generated by the following recursion: If a(t) = prime(n), n > 1 then a(t+k-1) = A060735(k)*prime(n); k = 1,2...A101301(n)+1; see Example.
LINKS
Michael De Vlieger, Log log scatterplot of log_10 a(n), n = 1..2^17.
EXAMPLE
If j = a(n-1) is squarefree then a(n) = 2*j.
a(9) = prime(4) = 7, A101301(4) = 7, so there are 7+1 = 8 terms from 7 to A002110(4) = 210, namely: A060735(7+k-1)*7, k = 1,2,...8; so: 1*7,2*7,4*7,6*7,12*7,18*7,24*7,30*7 = 7,14,28,42,84,126,168,210.
MATHEMATICA
{{1, 2, 3, 6}}~Join~Table[Prime[m + 2]*If[n == 0, 1, Product[Prime[i], {i, n}]]*k, {m, 10}, {n, 0, m}, {k, 1 + Boole[n > 1], If[n == 0, 1, Prime[n + 1]]}] // Flatten
(* faster for large datasets, or *)
nn = 1000; c[_] := False; m[_] := 1; f[x_] := FactorInteger[x][[All, 1]]; Array[Set[{a[#], c[#], m[#]}, {#, True, 2}] &, 2]; j = 2; u = v = 3;
Do[If[Or[IntegerQ@ Log2[j],
And[EvenQ[j], Union@ Differences@ PrimePi[#] == {1}] ],
k = v, k = Times @@ #;
While[c[k m[k]], m[k]++]; k *= m[k]] &[f[j]];
Set[{a[n], c[k], j}, {k, True, k}];
If[k == u, While[c[u], u++]];
If[k == v, While[c[v], v = NextPrime[v] ] ], {n, 3, nn}];
Array[a, nn] (* Michael De Vlieger, Nov 04 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved