login
A336429
First location of n in A331025 or 0 if number is absent.
0
1, 0, 2, 3, 5, 7, 11, 13, 4, 17, 19, 6, 23, 29, 10, 9, 31, 14, 37, 15, 22, 41, 43, 21, 25, 47, 8, 33, 53, 34, 59, 39, 38, 61, 55, 12, 67, 71, 46, 51, 73, 58, 79, 57, 20, 83, 89, 18, 121, 85, 62, 69, 97, 28, 95, 87, 74, 101, 103, 30, 107, 109, 44, 27, 115, 82
OFFSET
1,3
COMMENTS
26 is the smallest number not in this sequence; A331025(21) and A331025(26) both equal 24; the smallest number to occur in A331025 at least twice.
EXAMPLE
a(9) = 4 because A331025(4) = 9 and no earlier term of A331025 is 9.
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
Sequence in context: A142713 A039712 A072700 * A072698 A034442 A077620
KEYWORD
nonn
AUTHOR
J. Lowell, Jul 21 2020
EXTENSIONS
More terms from Rémy Sigrist, Jul 21 2020
STATUS
approved