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.

A331280 Lexicographically earliest infinite sequence such that a(i) = a(j) => A278220(i) = A278220(j) for all i, j.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 17 2020

Keywords

Comments

Restricted growth sequence transform of A278220(n) (= A046523(A241909(n))).

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; };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from A046523
    A241909(n) = if(1==n||isprime(n),2^primepi(n),my(f=factor(n),h=1,i,m=1,p=1,k=1); while(k<=#f~, p = nextprime(1+p); i = primepi(f[k,1]); m *= p^(i-h); h = i; if(f[k,2]>1, f[k,2]--, k++)); (p*m));
    A278220(n) = A046523(A241909(n));
    v331280 = rgs_transform(vector(up_to, n, A278220(n)));
    A331280(n) = v331280[n];