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.

A323234 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j), where f(1) = 0, and for n > 1, f(n) = ordered pair [A053645(n), A079944(n-2)], where A053645(n) gives n without its most significant bit, while A079944(n-2) gives the second most significant bit of n.

Original entry on oeis.org

1, 2, 3, 2, 4, 5, 6, 2, 4, 7, 8, 9, 10, 11, 12, 2, 4, 7, 8, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 2, 4, 7, 8, 13, 14, 15, 16, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 2, 4, 7, 8, 13, 14, 15, 16, 25, 26, 27, 28, 29, 30, 31, 32, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61
Offset: 1

Views

Author

Antti Karttunen, Jan 08 2019

Keywords

Comments

Also the restricted growth sequence transform of function f(1) = 0, f(n) = [A053645(n), A278222(n)] for n > 1.
For all i, j:
a(i) = a(j) => A286622(i) = A286622(j),
a(i) = a(j) => A323235(i) = A323235(j),
a(i) = a(j) => A323236(i) = A323236(j).

Crossrefs

Cf. also A300226 (an analogous filter sequence for prime factorization).

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; };
    A053644(n) = { my(k=1); while(k<=n, k<<=1); (k>>1); }; \\ From A053644
    A053645(n) = (n-A053644(n));
    A079944off0(n) = (1==binary(2+n)[2]);
    A323234aux(n) = if(1==n,0,[A053645(n), A079944off0(n-2)]);
    v323234 = rgs_transform(vector(up_to,n,A323234aux(n)));
    A323234(n) = v323234[n];