OFFSET
1,1
COMMENTS
Sequence inspired by a revisit to A353125. a(n) is a novel prime p iff a(n-1) is a term in A046363, following which a(n+1) is also = p. The first occurrences of 4 or p are followed by 4 or p respectively (4 being the only composite m such that Sopfr(m)=m), and these are the only terms repeated contiguously in this sequence. 3 cannot be a term because it is not given, and there is no composite g such that Sopfr(g)=3. A string of descending composite terms follows primes p,p until reaching (i) a repeat of an earlier term, or (ii) a term in A046363 (which produces a new prime pair q,q). If (i) the sequence resets immediately to a new string of descending composite terms, and if (ii) the reset occurs after the next pair q,q of primes. Every positive integer m (other than 3) occurs a maximum of A000607(m) times, this being the number of numbers k such that Sopfr(k)=m.
The rows of table T(n,k) in A064364 reads numbers j such that A001414(j) = n, in which T(k,1) = A056240. The terms of the present sequence are extracted from the rows of A064364 as the sequence extends, and there is no possibility that a number is called for (by the definition) which does not exist, because the only numbers m whose Sopfr(m) = n are the A000607(n) terms in T(n,k). Therefore this the sequence is well defined.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..5000
Michael De Vlieger, Log log scatterplot of a(n), n = 1..5000, showing primes in red, perfect powers of primes in gold, squarefree composites in green, and numbers neither squarefree nor prime powers in blue and purple, with purple additionally representing powerful numbers that are not prime powers. Primes first appear in pairs.
FORMULA
If a(k) = first occasion of prime p, a(k+1) = p, a(k+2) = A056240(2*p), a(k+3) = 2*p.
EXAMPLE
a(1) = 2 is given, then since 2 is a novel term, a(2) = A001414(2) = 2. 2 has now been seen k = 2 times so a(3) is the smallest novel m such that A001414(m) = 2*2 = 4, so a(3) = 4, a novel term meaning that a(4) = A001414(4) = 4. now 4 has been seen twice so a(5) is the smallest novel m such that A001414(m) = 2*4 = 8, so a(5) = 15.
MATHEMATICA
nn = 120; c[_] := 0; j = a[1] = 2; u = 2;
f[x_] := f[x] = Total@ Flatten[ConstantArray[#1, #2] & @@@ FactorInteger[x]];
s = PositionIndex@ Array[f, 2^16];
Do[If[Set[m, c[j]] == 0, Set[k, f[j]],
Set[{k, t, w}, {1, #, Length[#]}] &@Lookup[s, (m + 1)*j];
While[c[t[[k]]] > 0, k++]; k = t[[k]] ]; c[j]++;
Set[{a[i], j}, {k, k}], {i, 2, nn}];
Array[a, nn] (* Michael De Vlieger, Sep 27 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Sep 25 2024
STATUS
approved