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.

A336126 Lexicographically earliest infinite sequence such that a(i) = a(j) => A000035(i) = A000035(j) and A007814(1+A000265(i)) = A007814(1+A000265(j)), for all i, j >= 1.

Original entry on oeis.org

1, 2, 3, 2, 1, 4, 5, 2, 1, 2, 3, 4, 1, 6, 7, 2, 1, 2, 3, 2, 1, 4, 5, 4, 1, 2, 3, 6, 1, 8, 9, 2, 1, 2, 3, 2, 1, 4, 5, 2, 1, 2, 3, 4, 1, 6, 7, 4, 1, 2, 3, 2, 1, 4, 5, 6, 1, 2, 3, 8, 1, 10, 11, 2, 1, 2, 3, 2, 1, 4, 5, 2, 1, 2, 3, 4, 1, 6, 7, 2, 1, 2, 3, 2, 1, 4, 5, 4, 1, 2, 3, 6, 1, 8, 9, 4, 1, 2, 3, 2, 1, 4, 5, 2, 1
Offset: 1

Views

Author

Antti Karttunen, Jul 13 2020

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A000035(n), A007814(1+A000265(n))], parity and the number of trailing 1-bits in the odd part of n (i.e., the length of the rightmost run of 1-bits in its binary expansion).
For all i, j: A336146(i) = A336146(j) => a(i) = a(j).

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; };
    A000265(n) = (n>>valuation(n,2));
    A007814(n) = valuation(n,2);
    Aux336126(n) = [(n%2),A007814(1+A000265(n))];
    v336126 = rgs_transform(vector(up_to, n, Aux336126(n)));
    A336126(n) = v336126[n];