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

A332894 a(1) = 0, a(2n) = 1 + a(n), a(2n+1) = 1 + a(A332819(2n+1)); also binary width of terms of A332816.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 04 2020

Keywords

Comments

a(n) tells how many iterations of A332893 are needed before 1 is reached, i.e., the distance of n from 1 in binary trees like A332815.
Each n > 0 occurs 2^(n-1) times in total.

Crossrefs

Programs

Formula

a(n) = A252464(A332808(n)).
a(1) = 0, and for n > 1, a(n) = 1 + a(A332893(n)).
For n >= 1, a(A108546(n)) = n; for all n >= 0, a(2^n) = n.
For n > 1: (Start)
a(n) = 1 + a(n/2) if n is even, and a(n) = 1 + a(A332819(n)), if n is odd.
a(n) = A070939(A332816(n)).
a(n) >= A332899(n).
(End)

A332815 a(n) = A108548(A005940(1+n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 8, 7, 10, 15, 12, 25, 18, 27, 16, 13, 14, 21, 20, 35, 30, 45, 24, 49, 50, 75, 36, 125, 54, 81, 32, 11, 26, 39, 28, 65, 42, 63, 40, 91, 70, 105, 60, 175, 90, 135, 48, 169, 98, 147, 100, 245, 150, 225, 72, 343, 250, 375, 108, 625, 162, 243, 64, 17, 22, 33, 52, 55, 78, 117, 56, 77, 130, 195, 84
Offset: 0

Views

Author

Antti Karttunen, Feb 28 2020

Keywords

Comments

This is variant of Doudna-sequence, A005940 and thus can be represented as a binary tree. Each child to the left is obtained by applying A332818 to the parent, and each child to the right is obtained by doubling the parent:
1
|
...................2...................
3 4
5......../ \........6 9......../ \........8
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
7 10 15 12 25 18 27 16
13 14 21 20 35 30 45 24 49 50 75 36 125 54 81 32
etc.
Note the indexing: the sequence starts with a(0)=1, as is natural for sequences based on maps from base-2 expansion to prime factorization. This is
in contrast to A005940, which for historical reasons starts from offset 1.
For any n > 1, A332893(n) gives the value of the parent node. For any n >= 1, A332894(n) gives the distance to 1, and A332899(n) gives the number of odd numbers that occur (inclusively) on the path from 1 to n.

Crossrefs

Cf. A332816 (inverse permutation).
Cf. A108546 (the left edge of the tree from 2 downward).

Programs

  • PARI
    up_to = 26927;
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ From A005940
    A108546list(up_to) = { my(v=vector(up_to), p,q); v[1] = 2; v[2] = 3; v[3] = 5; for(n=4,up_to, p = v[n-2]; q = nextprime(1+p); while(q%4 != p%4, q=nextprime(1+q)); v[n] = q); (v); };
    v108546 = A108546list(up_to);
    A108546(n) = v108546[n];
    A108548(n) = { my(f=factor(n)); f[,1] = apply(A108546,apply(primepi,f[,1])); factorback(f); };
    A332815(n) = A108548(A005940(1+n));

Formula

a(n) = A108548(A005940(1+n)).

A332899 a(1) = 0, and for n > 2, a(n) = a(A332893(n)) + A000035(n).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 04 2020

Keywords

Comments

a(n) tells how many odd numbers are encountered when map x -> A332893(x) is used to traverse from n to 1, the root of the binary tree A332815. This count includes both the starting n itself if it is odd, but excludes 1 where the iteration ends.
a(n) also gives the index of the largest prime factor (A061395) in A332808(n), which is the inverse permutation of A108548 (see also A108546).

Crossrefs

Cf. A000079 (after its initial term, gives the positions of 1's).

Programs

Formula

a(1) = 0, and for n > 1, a(n) = a(A332893(n)) + A000035(n).
a(n) = A000120(A332811(n)).
a(n) = A061395(A332808(n)).
a(n) = A332897(n) + A332898(n).
a(n) <= A332894(n).
For all n > 1, a(n) = 1 + A080791(A332816(n)).

A332811 a(n) = A243071(A332808(n)).

Original entry on oeis.org

0, 1, 3, 2, 7, 6, 15, 4, 5, 14, 63, 12, 31, 30, 13, 8, 127, 10, 255, 28, 29, 126, 1023, 24, 11, 62, 9, 60, 511, 26, 4095, 16, 125, 254, 27, 20, 2047, 510, 61, 56, 8191, 58, 16383, 252, 25, 2046, 65535, 48, 23, 22, 253, 124, 32767, 18, 123, 120, 509, 1022, 262143, 52, 131071, 8190, 57, 32, 59, 250, 1048575, 508, 2045, 54, 4194303, 40, 524287, 4094, 21
Offset: 1

Views

Author

Antti Karttunen, Mar 05 2020

Keywords

Crossrefs

Cf. A332817 (inverse permutation).
Cf. also A332215.

Programs

  • PARI
    up_to = 26927;
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A243071(n) = if(n<=2, n-1, if(!(n%2), 2*A243071(n/2), 1+(2*A243071(A064989(n)))));
    A332806list(up_to) = { my(v=vector(2), xs=Map(), lista=List([]), p,q,u); v[2] = 3; v[1] = 5; mapput(xs,1,1); mapput(xs,2,2); mapput(xs,3,3);  for(n=4,up_to, p = v[2-(n%2)]; q = nextprime(1+p); while(q%4 != p%4, q=nextprime(1+q)); v[2-(n%2)] = q; mapput(xs,primepi(q),n)); for(i=1, oo, if(!mapisdefined(xs, i, &u), return(Vec(lista)), listput(lista, prime(u)))); };
    v332806 = A332806list(up_to);
    A332806(n) = v332806[n];
    A332808(n) = { my(f=factor(n)); f[,1] = apply(A332806,apply(primepi,f[,1])); factorback(f); };
    A332811(n) = A243071(A332808(n));

Formula

a(n) = A243071(A332808(n)).
For n > 1, a(n) = A054429(A332816(n)).
a(n) = A332895(n) + A332896(n).
a(n) = A332895(n) OR A332896(n) = A332895(n) XOR A332896(n).
A000120(a(n)) = A332899(n).
Showing 1-4 of 4 results.