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.

Showing 1-3 of 3 results.

A323235 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j), where f(1) = 0, f(n) = -1 if n is an odd number > 1, and f(n) = A323234(n) for even numbers >= 4.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 08 2019

Keywords

Comments

For all i, j:
A319701(i) = A319701(j) => a(i) = a(j),
A323234(i) = A323234(j) => a(i) = a(j).

Crossrefs

Cf. also A323241 (somewhat 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]);
    A323235aux(n) = if(1==n,0,if(n%2,-1,[A053645(n), A079944off0(n-2)]));
    v323235 = rgs_transform(vector(up_to,n,A323235aux(n)));
    A323235(n) = v323235[n];

A323236 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j), where f(1) = 0, f(n) = -1 if n is an even number > 2, and f(n) = A323234(n) for odd numbers >= 3.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 08 2019

Keywords

Comments

For all i, j:
A319702(i) = A319702(j) => a(i) = a(j),
A323234(i) = A323234(j) => a(i) = a(j).

Crossrefs

Cf. also A323242 (somewhat 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]);
    A323236aux(n) = if(1==n,0,if(!(n%2),-1,[A053645(n), A079944off0(n-2)]));
    v323236 = rgs_transform(vector(up_to,n,A323236aux(n)));
    A323236(n) = v323236[n];

A324400 Lexicographically earliest sequence such that a(i) = a(j) => f(i) = f(j) for all i, j >= 1, where f(n) = -1 if n = 2^k and k > 0, and f(n) = n for all other numbers.

Original entry on oeis.org

1, 2, 3, 2, 4, 5, 6, 2, 7, 8, 9, 10, 11, 12, 13, 2, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 2, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 2, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78
Offset: 1

Views

Author

Antti Karttunen, Mar 01 2019

Keywords

Comments

In the following, A stands for this sequence, A324400, and S -> T (where S and T are sequence A-numbers) indicates that for all i, j >= 1: S(i) = S(i) => T(i) = T(j).
For example, the following chains of implications hold:
A -> A286619 -> A005811,
and
A -> A003602 -> A286622 -> A000120,
-> A323889,
-> A000593,
-> A001227,
among many others.

Crossrefs

Programs

  • PARI
    A000523(n) = if(n<1, 0, #binary(n)-1);
    A324400(n) = if(n<4,n,if(!bitand(n,n-1),2,1+n-A000523(n)));

Formula

If n <= 3, a(n) = n; and for n >= 4, if A209229(n) = 1, then a(n) = 2, otherwise a(n) = 1 + n - A000523(n).
Showing 1-3 of 3 results.