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.

A324538 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j), where f(n) = A324537(n) for all other numbers, except f(1) = 0.

Original entry on oeis.org

1, 2, 2, 2, 2, 3, 2, 2, 2, 4, 2, 5, 2, 6, 4, 2, 2, 7, 2, 4, 6, 8, 2, 9, 2, 10, 2, 6, 2, 11, 2, 2, 8, 12, 6, 13, 2, 14, 10, 15, 2, 16, 2, 8, 15, 17, 2, 18, 2, 19, 12, 10, 2, 20, 8, 6, 14, 21, 2, 22, 2, 23, 6, 2, 10, 24, 2, 12, 17, 25, 2, 26, 2, 27, 19, 14, 8, 28, 2, 29, 2, 30, 2, 31, 12, 32, 21, 8, 2, 33, 10, 17, 23, 34, 14, 35, 2, 36, 8, 37, 2, 38, 2, 10, 25
Offset: 1

Views

Author

Antti Karttunen, Mar 07 2019

Keywords

Comments

For all i, j:
a(i) = a(j) => A069513(i) = A069513(j),
a(i) = a(j) => A324191(i) = A324191(j).

Crossrefs

Cf. A000961 (positions of terms <= 2), A069513, A297167, A324191, A324537.

Programs

  • PARI
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    A061395(n) = if(1==n, 0, primepi(vecmax(factor(n)[, 1])));
    A297167(n) = if(1==n, 0, (A061395(n) + (bigomega(n)-omega(n)) - 1));
    A003557(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 2] = f[i, 2]-1); factorback(f); }; \\ From A003557
    A324537(n) = { my(m=1); fordiv(n, d, if(d>2, m *= prime(A297167(d)))); A003557(m); };
    Aux324538(n) = if(1==n,0,A324537(n));
    v324538 = rgs_transform(vector(up_to,n,Aux324538(n)));
    A324538(n) = v324538[n];