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.

A366259 Lexicographically earliest infinite sequence such that a(i) = a(j) => A366258(i) = A366258(j) for all i, j >= 1, where A366258 is Dirichlet inverse of gcd(n, A366275(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 07 2023

Keywords

Comments

Restricted growth sequence transform of A366258.

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; };
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA030101(n) = if(n<1,0,subst(Polrev(binary(n)),x,2));
    A057889(n) = if(!n,n,A030101(n/(2^valuation(n,2))) * (2^valuation(n, 2)));
    A163511(n) = if(!n, 1, my(p=2, t=1); while(n>1, if(!(n%2), (t*=p), p=nextprime(1+p)); n >>= 1); (t*p));
    A366275(n) = A163511(A057889(n));
    A366283(n) = gcd(n,A366275(n));
    v366259 = rgs_transform(DirInverseCorrect(vector(up_to,n,A366283(n))));
    A366259(n) = v366259[n];