OFFSET
1,3
COMMENTS
MATHEMATICA
Block[{nn = 66, s}, s = Select[Range[3 nn], And[# != 2, Or[Log2[#] == 3, PrimeQ@ #, PrimeQ[#/2]]] &]; Insert[#, 0, 2][[1 ;; nn]] &@ Values[KeySort@ PositionIndex@ Array[Times @@ Map[If[#[[1]] == 1, 1, # /. {p_, e_} :> s[[PrimePi@ p]]^e] &, FactorInteger[#]] &, Prime@ Length@ s]][[All, 1]]] (* Michael De Vlieger, Aug 21 2020 *)
PROG
(PARI) isp(n) = (isprime(n) && (n%2)) || (n==8) || (!(n%2) && isprime(n/2)); \\ A232803
vA331025(nn) = {my(vall = [1..nn]); my(vp = select(x->isp(x), vall)); for (n=2, nn, my(f=factor(n)); for (k=1, #f~, f[k, 1] = vp[primepi(f[k, 1])]); vall[n] = factorback(f); ); vall; }
lista(nn) = {my(vall = vA331025(nn)); my(vr = vector(nn)); for (n=1, nn, my(vs = select(x->(x==n), vall, 1)); if (#vs == 0, vr[n] = 0, vr[n] = vs[1]); ); my(vz = select(x->(x==0), vr, 1)); if (#vz > 1, vr = vector(vz[2]-1, k, vr[k]); ); vr; } \\ Michel Marcus, Sep 14 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
J. Lowell, Jul 21 2020
EXTENSIONS
More terms from Rémy Sigrist, Jul 21 2020
STATUS
approved