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.

A323889 Lexicographically earliest positive sequence such that a(i) = a(j) => A002487(i) = A002487(j) and A278222(i) = A278222(j), for all i, j >= 0.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Feb 09 2019

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A002487(n), A278222(n)].

Crossrefs

Cf. also A103391, A278243, A286378, A318311, A323892, A323897 and A324533 for a "deformed variant".

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; };
    A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t };
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ From A046523
    A278222(n) = A046523(A005940(1+n));
    Aux323889(n) = [A002487(n), A278222(n)];
    v323889 = rgs_transform(vector(1+up_to,n,Aux323889(n-1)));
    A323889(n) = v323889[1+n];

Formula

a(2^n) = 2 for all n >= 0.