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.

A339811 Lexicographically earliest infinite sequence such that a(i) = a(j) => A339810(i) = A339810(j), for all i, j >= 1.

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 2, 4, 2, 5, 2, 4, 4, 6, 4, 4, 4, 7, 4, 6, 2, 5, 4, 5, 5, 8, 2, 9, 2, 4, 2, 5, 3, 4, 4, 10, 4, 4, 2, 11, 2, 12, 4, 4, 5, 11, 2, 4, 8, 5, 2, 13, 2, 14, 2, 15, 8, 8, 4, 16, 2, 4, 2, 17, 4, 5, 2, 11, 3, 4, 2, 4, 4, 5, 4, 18, 4, 6, 4, 8, 2, 19, 4, 4, 8, 5, 4, 11, 2, 8, 2, 12, 4, 4, 4, 11, 20, 4, 5, 19, 3, 4, 4, 4, 4
Offset: 1

Views

Author

Antti Karttunen, Dec 18 2020

Keywords

Crossrefs

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; };
    A019565(n) = { my(m=1, p=1); while(n>0, p = nextprime(1+p); if(n%2, m *= p); n >>= 1); (m); };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); }; \\ From A046523
    A339810(n) = A046523(A019565(n)-1);
    v339811 = rgs_transform(vector(up_to, n, A339810(n)));
    A339811(n) = v339811[n];