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.

A252755 Tree of Eratosthenes, mirrored: a(0) = 1, a(1) = 2; after which, a(2n) = 2*a(n), a(2n+1) = A250469(a(n)).

Original entry on oeis.org

1, 2, 4, 3, 8, 9, 6, 5, 16, 21, 18, 25, 12, 15, 10, 7, 32, 45, 42, 55, 36, 51, 50, 49, 24, 33, 30, 35, 20, 27, 14, 11, 64, 93, 90, 115, 84, 123, 110, 91, 72, 105, 102, 125, 100, 147, 98, 121, 48, 69, 66, 85, 60, 87, 70, 77, 40, 57, 54, 65, 28, 39, 22, 13, 128, 189, 186, 235, 180, 267, 230, 203, 168, 249, 246, 305, 220, 327, 182, 187, 144
Offset: 0

Views

Author

Antti Karttunen, Jan 02 2015

Keywords

Comments

This sequence can be represented as a binary tree. Each child to the left is obtained by doubling the parent, and each child to the right is obtained by applying A250469 to the parent:
1
|
...................2...................
4 3
8......../ \........9 6......../ \........5
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
16 21 18 25 12 15 10 7
32 45 42 55 36 51 50 49 24 33 30 35 20 27 14 11
etc.
Sequence A252753 is the mirror image of the same tree. A253555(n) gives the distance of n from 1 in both trees.

Crossrefs

Inverse: A252756.
Row sums: A253787, products: A253788.
Similar permutations: A163511, A252753, A054429, A163511, A250245, A269865.
Cf. also: A249814 (Compare the scatterplots).

Programs

  • Mathematica
    (* b = A250469 *) b[1] = 1; b[n_] := If[PrimeQ[n], NextPrime[n], m1 = p1 = FactorInteger[n][[1, 1]]; For[k1 = 1, m1 <= n, m1 += p1; If[m1 == n, Break[]]; If[FactorInteger[m1][[1, 1]] == p1, k1++]]; m2 = p2 = NextPrime[p1]; For[k2 = 1, True, m2 += p2, If[FactorInteger[m2][[1, 1]] == p2, k2++]; If[k1 + 2 == k2, Return[m2]]]];
    a[0] = 1; a[1] = 2; a[n_] := a[n] = If[EvenQ[n], 2 a[n/2], b[a[(n-1)/2]]];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Mar 08 2016 *)

Formula

a(0) = 1, a(1) = 2; after which, a(2n) = 2*a(n), a(2n+1) = A250469(a(n)).
As a composition of related permutations:
a(n) = A252753(A054429(n)).
a(n) = A250245(A163511(n)).

A252753 Tree of Eratosthenes: a(0) = 1, a(1) = 2; after which, a(2n) = A250469(a(n)), a(2n+1) = 2 * a(n).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 8, 7, 10, 15, 12, 25, 18, 21, 16, 11, 14, 27, 20, 35, 30, 33, 24, 49, 50, 51, 36, 55, 42, 45, 32, 13, 22, 39, 28, 65, 54, 57, 40, 77, 70, 87, 60, 85, 66, 69, 48, 121, 98, 147, 100, 125, 102, 105, 72, 91, 110, 123, 84, 115, 90, 93, 64, 17, 26, 63, 44, 95, 78, 81, 56, 119, 130, 159, 108, 145, 114, 117, 80
Offset: 0

Views

Author

Antti Karttunen, Jan 02 2015

Keywords

Comments

This sequence can be represented as a binary tree. Each child to the left is obtained by applying A250469 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 21 16
11 14 27 20 35 30 33 24 49 50 51 36 55 42 45 32
etc.
Sequence A252755 is the mirror image of the same tree. A253555(n) gives the distance of n from 1 in both trees.

Crossrefs

Inverse: A252754.
Row sums: A253787, products: A253788.
Fixed points of a(n-1): A253789.
Similar permutations: A005940, A252755, A054429, A250245.

Programs

  • Mathematica
    (* b = A250469 *)
    b[1] = 1; b[n_] := If[PrimeQ[n], NextPrime[n], m1 = p1 = FactorInteger[n][[ 1, 1]]; For[k1 = 1, m1 <= n, m1 += p1; If[m1 == n, Break[]]; If[ FactorInteger[m1][[1, 1]] == p1, k1++]]; m2 = p2 = NextPrime[p1]; For[k2 = 1, True, m2 += p2, If[FactorInteger[m2][[1, 1]] == p2, k2++]; If[k1+2 == k2, Return[m2]]]];
    a[0] = 1; a[1] = 2; a[n_] := a[n] = If[EvenQ[n], b[a[n/2]], 2 a[(n-1)/2]];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Mar 08 2016 *)

Formula

a(0) = 1, a(1) = 2; after which, a(2n) = A250469(a(n)), a(2n+1) = 2 * a(n).
As a composition of related permutations:
a(n) = A252755(A054429(n)).
a(n) = A250245(A005940(1+n)).
Other identities. For all n >= 1:
A055396(a(n)) = A001511(n). [A005940 has the same property.]
a(A003945(n)) = A001248(n) for n>=1. - Peter Luschny, Jan 13 2015

A253787 Row sums of irregular tables A252753 & A252755.

Original entry on oeis.org

1, 2, 7, 28, 124, 554, 2520, 11304, 50958, 229914, 1037436, 4682542, 21136380, 95409878
Offset: 0

Views

Author

Antti Karttunen, Jan 13 2015

Keywords

Crossrefs

Cf. A253788 (the corresponding products).

Programs

  • Scheme
    (define (A253787 n) (if (zero? n) 1 (add A252753 (A000079 (- n 1)) (A000225 n))))
    (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (+ 1 i) (+ res (intfun i)))))))

Formula

a(0) = 1; for n>1: a(n) = Sum_{k = A000079(n-1) .. A000225(n)} A252753(k) = Sum_{k = 2^(n-1) .. (2^n)-1} A252753(k).
Showing 1-3 of 3 results.