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-6 of 6 results.

A365388 Lexicographically earliest infinite sequence such that a(i) = a(j) => A334867(i) = A334867(i) and A365386(j) = A365386(j) for all i, j >= 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 07 2023

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A334867(n), A365386(n)], or equally, of the quadruplet [A329697(n), A334204(n), A331410(n), A365385(n)].
For all i, j:
A003602(i) = A003602(j) => a(i) = a(j),
a(i) = a(j) => A334867(i) = A334867(j),
a(i) = a(j) => A335880(i) = A335880(j),
a(i) = a(j) => A365386(i) = A365386(j).

Crossrefs

Differs from A003602 and A351090 for the first time at n=99, where a(99) = 41, while A003602(99) = A351090(99) = 50.

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; };
    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));
    A329697(n) = if(!bitand(n,n-1),0,1+A329697(n-(n/vecmax(factor(n)[, 1]))));
    A334204(n) = A329697(A163511(n));
    A331410(n) = if(!bitand(n,n-1),0,1+A331410(n+(n/vecmax(factor(n)[, 1]))));
    A365385(n) = A331410(A163511(n));
    A365388aux(n) = [A329697(n),A334204(n),A331410(n),A365385(n)];
    v365388 = rgs_transform(vector(up_to,n,A365388aux(n)));
    A365388(n) = v365388[n];

A334204 a(n) = A329697(A163511(n)).

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 1, 1, 0, 3, 2, 2, 1, 2, 1, 2, 0, 4, 3, 3, 2, 3, 2, 4, 1, 3, 2, 3, 1, 3, 2, 2, 0, 5, 4, 4, 3, 4, 3, 6, 2, 4, 3, 5, 2, 5, 4, 4, 1, 4, 3, 4, 2, 4, 3, 4, 1, 4, 3, 3, 2, 3, 2, 2, 0, 6, 5, 5, 4, 5, 4, 8, 3, 5, 4, 7, 3, 7, 6, 6, 2, 5, 4, 6, 3, 6, 5, 6, 2, 6, 5, 5, 4, 5, 4, 4, 1, 5, 4, 5, 3, 5, 4, 6, 2, 5
Offset: 0

Views

Author

Antti Karttunen, Jun 09 2020

Keywords

Comments

As the underlying sequence A163511 can be represented as a binary tree, so can be this:
0
|
...................0...................
0 1
0......../ \........2 1......../ \........1
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
0 3 2 2 1 2 1 2
0 4 3 3 2 3 2 4 1 3 2 3 1 3 2 2
etc.
The nodes at the left edge are all zeros, and their right-hand children give positive integers, A000027.
Each left-hand leaning branch stays constant, because A329697(2n) = A329697(n).
The right-hand leaning branches are not necessarily monotonic. For example, a((2^6)-1) = 2 > 1 = a((2^7)-1), because A000040(7) = 17 is a Fermat prime (but A000040(6) = 13 is not), and therefore the latter is only one step away from a power of 2.

Crossrefs

Programs

Formula

a(n) = A329697(A163511(n)).
a(n) = A334109(A334860(n)).
a(n) = a(2n) = a(A000265(n)).
For all n >= 0, a(2^n) = 0, a(2^n + 1) = n.

A335880 Lexicographically earliest infinite sequence such that a(i) = a(j) => A329697(i) = A329697(j) and A331410(i) = A331410(j) for all i, j >= 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jun 29 2020

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A329697(n), A331410(n)].
For all i, j:
A324400(i) = A324400(j) => a(i) = a(j),
a(i) = a(j) => A334861(i) = A334861(j),
a(i) = a(j) => A335875(i) = A335875(j),
a(i) = a(j) => A335877(i) = A335877(j),
a(i) = a(j) => A335881(i) = A335881(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; };
    A329697(n) = { my(f=factor(n)); sum(k=1,#f~,if(2==f[k,1],0,f[k,2]*(1+A329697(f[k,1]-1)))); };
    A331410(n) = { my(f=factor(n)); sum(k=1,#f~,if(2==f[k,1],0,f[k,2]*(1+A331410(f[k,1]+1)))); };
    Aux335880(n) = [A329697(n),A331410(n)];
    v335880 = rgs_transform(vector(up_to, n, Aux335880(n)));
    A335880(n) = v335880[n];

A334873 a(n) = A329697(n) * A334204(n).

Original entry on oeis.org

0, 0, 1, 0, 2, 1, 2, 0, 6, 2, 4, 1, 4, 2, 4, 0, 4, 6, 9, 2, 9, 4, 12, 1, 6, 4, 9, 2, 9, 4, 6, 0, 15, 4, 12, 6, 12, 9, 18, 2, 8, 9, 20, 4, 15, 12, 16, 1, 16, 6, 8, 4, 12, 9, 12, 2, 16, 9, 12, 4, 9, 6, 8, 0, 18, 15, 20, 4, 20, 12, 32, 6, 15, 12, 21, 9, 28, 18, 24, 2, 20, 8, 18, 9, 12, 20, 24, 4, 18, 15, 20, 12, 20
Offset: 1

Views

Author

Antti Karttunen, Jun 09 2020

Keywords

Crossrefs

Cf. A000079 (positions of zeros); It is also conjectured that A007283 gives the positions of ones, and that A070875 gives the indices of twos.

Programs

Formula

a(n) = A329697(n) * A334204(n) = A329697(n) * A329697(A163511(n)).

A365386 Lexicographically earliest infinite sequence such that a(i) = a(j) => A331410(i) = A331410(j) and A365385(i) = A365385(j) for all i, j >= 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 03 2023

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A331410(n), A365385(n)].
For all i, j: A365388(i) = A365388(j) => a(i) = a(j) => A365387(i) = A365387(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; };
    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));
    A331410(n) = if(!bitand(n,n-1),0,1+A331410(n+(n/vecmax(factor(n)[, 1]))));
    A365385(n) = A331410(A163511(n));
    A365386aux(n) = [A331410(n),A365385(n)];
    v365386 = rgs_transform(vector(up_to,n,A365386aux(n)));
    A365386(n) = v365386[n];

A366791 Lexicographically earliest infinite sequence such that a(i) = a(j) => A366388(j) = A366388(j) and A366788(i) = A366788(j), for all i, j >= 1.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 23 2023

Keywords

Comments

Restricted growth sequence transform of the ordered pair [A366388(n), A366788(n)].
For all i, j >= 1: A003602(i) = A003602(j) => a(i) = a(j).

Crossrefs

Cf. also A334867, A365386, A365388 (compare the scatter plots).

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; };
    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));
    A366388(n) = if(n<=2, 0, if(isprime(n), 1+A366388(primepi(n)), my(f=factor(n)); (apply(A366388, f[, 1])~ * f[, 2])));
    Aux366791(n) = [A366388(n), A366388(A163511(n))];
    v366791 = rgs_transform(vector(up_to, n, Aux366791(n)));
    A366791(n) = v366791[n];
Showing 1-6 of 6 results.