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.

A302039 Analog of A056239 for nonstandard factorization based on the sieve of Eratosthenes (A083221).

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 3, 4, 4, 5, 4, 6, 5, 5, 4, 7, 5, 8, 5, 6, 6, 9, 5, 6, 7, 6, 6, 10, 6, 11, 5, 7, 8, 7, 6, 12, 9, 7, 6, 13, 7, 14, 7, 8, 10, 15, 6, 8, 7, 8, 8, 16, 7, 9, 7, 8, 11, 17, 7, 18, 12, 8, 6, 8, 8, 19, 9, 9, 8, 20, 7, 21, 13, 9, 10, 9, 8, 22, 7, 9, 14, 23, 8, 10, 15, 9, 8, 24, 9, 12, 11, 10, 16, 9, 7, 25, 9, 10, 8, 26, 9, 27, 9, 10
Offset: 1

Views

Author

Antti Karttunen, Mar 31 2018

Keywords

Comments

Each n occurs A000041(n) times in total.

Crossrefs

Cf. also A253557, A302041, A302050, A302051, A302052, A302055 for other similar analogs.

Programs

  • PARI
    up_to = 65537;
    ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
    A020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1); \\ From A020639, by Hasler.
    A055396(n) = if(1==n,0,primepi(A020639(n)));
    v078898 = ordinal_transform(vector(up_to,n,A020639(n)));
    A078898(n) = v078898[n];
    A302042(n) = if((1==n)||isprime(n),1,my(c = A078898(n), p = prime(-1+primepi(A020639(n))+primepi(A020639(c))), d = A078898(c), k=0); while(d, k++; if((1==k)||(A020639(k)>=p),d -= 1)); (k*p));
    A302039(n) = if(1==n,0,A055396(n) + A302039(A302042(n)));

Formula

a(1) = 0; for n > 1, a(n) = A055396(n) + a(A302042(n)).
a(1) = 0; for n > 1, a(n) = (A055396(n)*A302045(n)) + a(A302044(n)).
a(n) = A056239(A250246(n)).