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.

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)).

A332893 a(1) = 1, a(2n) = n, a(2n+1) = A332819(2n+1).

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 5, 4, 4, 5, 13, 6, 7, 7, 6, 8, 11, 9, 17, 10, 10, 11, 29, 12, 9, 13, 8, 14, 19, 15, 37, 16, 26, 17, 15, 18, 23, 19, 14, 20, 31, 21, 41, 22, 12, 23, 53, 24, 25, 25, 22, 26, 43, 27, 39, 28, 34, 29, 61, 30, 47, 31, 20, 32, 21, 33, 73, 34, 58, 35, 89, 36, 59, 37, 18, 38, 65, 39, 97, 40, 16, 41, 101, 42, 33, 43, 38, 44, 67, 45, 35
Offset: 1

Views

Author

Antti Karttunen, Mar 01 2020

Keywords

Comments

For any node n >= 2 in binary trees like A332815, a(n) gives the parent node of n.

Crossrefs

Cf. also A252463.

Programs

Formula

a(1) = 1, after which a(n) = n/2 for even n, and a(n) = A332819(n) for odd 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)).

A332816 a(n) = A156552(A332808(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 8, 7, 6, 9, 32, 11, 16, 17, 10, 15, 64, 13, 128, 19, 18, 65, 512, 23, 12, 33, 14, 35, 256, 21, 2048, 31, 66, 129, 20, 27, 1024, 257, 34, 39, 4096, 37, 8192, 131, 22, 1025, 32768, 47, 24, 25, 130, 67, 16384, 29, 68, 71, 258, 513, 131072, 43, 65536, 4097, 38, 63, 36, 133, 524288, 259, 1026, 41, 2097152, 55, 262144, 2049, 26, 515
Offset: 1

Views

Author

Antti Karttunen, Feb 28 2020

Keywords

Crossrefs

Cf. A332815 (inverse permutation).

Programs

  • PARI
    up_to = 26927;
    A156552(n) = {my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ From A156552
    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); };
    A332816(n) = A156552(A332808(n));

Formula

a(n) = A156552(A332808(n)).
For n > 1, A070939(a(n)) = A332894(n).
For n >= 1: (Start)
A080791(a(n)) = A332899(n)-1.
Among many identities given in A156552 that apply here as well we have for example the following ones:
A000120(a(n)) = A001222(n).
A069010(a(n)) = A001221(n).
A106737(a(n)) = A000005(n).
(End)
Showing 1-4 of 4 results.