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.

A373593 Lexicographically earliest infinite sequence such that for all i, j >= 1, a(i) = a(j) => f(i) = f(j), where f(n<=3) = n, f(p) = 0 for primes p > 3, and for composite n, f(n) = [A007949(n), A046523(A248909(n)), A046523(A343430(n))].

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 13 2024

Keywords

Comments

Restricted growth sequence transform of the function f given in the definition.
For all i, j >= 1:
a(i) = a(j) => A373595(i) = A373595(j),
a(i) = a(j) => A353815(i) = A353815(j),
a(i) = a(j) => A353816(i) = A353816(j).

Crossrefs

Programs

  • PARI
    up_to = 100000;
    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; };
    A007949(n) = valuation(n,3);
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };
    A248909(n) = { my(f=factor(n)); for(k=1, #f~, if(1!=(f[k,1]%3), f[k,1]=1)); factorback(f); };
    A343430(n) = { my(f=factor(n)); for(k=1, #f~, if(2!=(f[k,1]%3), f[k,1]=1)); factorback(f); };
    Aux373593(n) = if(n<3, n, [A007949(n), A046523(A248909(n)), A046523(A343430(n))]);
    v373593 = rgs_transform(vector(up_to, n, Aux373593(n)));
    A373593(n) = v373593[n];