OFFSET
1,2
COMMENTS
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, PARI program
Michael De Vlieger, Log log scatterplot of a(n), n = 1..10000, showing primes in red, proper prime powers in gold, squarefree composites in green, and numbers neither squarefree nor prime powers in blue and magenta, with magenta representing powerful numbers that are not prime powers.
EXAMPLE
MATHEMATICA
nn = 540; c[_] := False;
Array[Set[{a[#], c[#]}, {#, True}] &, 2]; j = a[2]; u = 3;
f[x_] := f[x] = Or[IntegerQ@ Log2[x], And[EvenQ[x], Union@ Differences@ PrimePi@ FactorInteger[x][[All, 1]] == {1}]];
Monitor[Do[k = u;
While[Or[! CoprimeQ[j, k], c[k], ! f[j*k]], k++];
Set[{a[n], c[k], j}, {k, True, k}];
If[k == u, While[c[u], u++]], {n, 3, nn}], n];
Array[a, nn] (* Michael De Vlieger, Jul 16 2024 *)
PROG
(PARI) \\ See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
David James Sycamore, Jul 08 2024
EXTENSIONS
More terms from Rémy Sigrist, Jul 11 2024
STATUS
approved
