cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A336429 First location of n in A331025 or 0 if number is absent.

Original entry on oeis.org

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

Views

Author

J. Lowell, Jul 21 2020

Keywords

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.

Examples

			a(9) = 4 because A331025(4) = 9 and no earlier term of A331025 is 9.
		

Crossrefs

Programs

  • 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 *)
  • 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

Extensions

More terms from Rémy Sigrist, Jul 21 2020