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-10 of 56 results. Next

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

A266403 Self-inverse permutation of natural numbers: a(n) = A250470(A263273(A250469(n))).

Original entry on oeis.org

1, 2, 5, 4, 3, 8, 17, 6, 13, 10, 11, 20, 9, 14, 71, 22, 7, 26, 19, 12, 23, 16, 21, 24, 41, 18, 53, 28, 31, 56, 29, 38, 107, 58, 67, 74, 61, 32, 197, 40, 25, 68, 59, 50, 137, 64, 73, 62, 49, 44, 227, 76, 27, 80, 55, 30, 89, 34, 43, 66, 37, 48, 91, 46, 69, 60, 35, 42, 65, 70, 15, 78, 47, 36, 119, 52
Offset: 1

Views

Author

Antti Karttunen, Jan 02 2016

Keywords

Crossrefs

Cf. A265369, A265904, A266190, A266401 (other conjugates or similar derivations of A263273).

Programs

Formula

a(n) = A250470(A263273(A250469(n))).
As a composition of related permutations:
a(n) = A266415(A266645(n)) = A266646(A266416(n)).
a(n) = A250472(A264996(A250471(n))).
Other identities. For all n >= 0:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]

A266645 Permutation of natural numbers: a(n) = A064989(A250469(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 10, 9, 8, 11, 14, 13, 22, 15, 12, 17, 26, 19, 34, 21, 20, 23, 38, 25, 18, 33, 16, 29, 46, 31, 58, 39, 28, 35, 30, 37, 62, 51, 44, 41, 74, 43, 82, 57, 24, 47, 86, 49, 50, 27, 52, 53, 94, 55, 42, 69, 68, 59, 106, 61, 118, 87, 40, 65, 66, 67, 122, 45, 76, 71, 134, 73, 142, 93, 36, 77, 70, 79, 146, 111, 32, 83, 158, 85, 78, 123
Offset: 1

Views

Author

Antti Karttunen, Jan 02 2016

Keywords

Crossrefs

Inverse: A266646.
Related permutations: A266403, A266416, A249817, A249818.

Programs

  • Mathematica
    f[n_] := Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n; g[n_] := If[n == 1, 0, PrimePi@ FactorInteger[n][[1, 1]]]; Function[s, MapIndexed[ Function[{m, n}, f[Lookup[s, g[n] + 1][[m]] - Boole[n == 1]]][#1, First@ #2] &, #] &@ Map[Position[Lookup[s, g@ #], #][[1, 1]] &, Range@ 120]]@ PositionIndex@ Array[g, 10^4] (* Michael De Vlieger, Mar 09 2017, Version 10 *)

Formula

a(n) = A064989(A250469(n)).
As a composition of related permutations:
a(n) = A266416(A266403(n)).
Other identities. For all n >= 0:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]
A020639(a(n)) = A020639(n). [More generally, it preserves the smallest prime dividing n.]
A055396(a(n)) = A055396(n).

A269172 Permutation of natural numbers: a(1) = 1, a(2n) = 2*a(n), a(2n+1) = A250469(a(A269380(2n+1))).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Mar 03 2016

Keywords

Crossrefs

Inverse: A269171.
Related or similar permutations: A260741, A260742, A269356, A269358, A255422.
Cf. also A269394 (a(3n)/3) and A269396.
Differs from A255408 for the first time at n=38, where a(38) = 50, while A255408(38) = 38.

Formula

a(1) = 1, then after for even n, a(n) = 2*a(n/2), and for odd n, A250469(a(A269380(n))).
a(1) = 1, for n > 1, a(n) = A083221(A260738(n), a(A260739(n))).
As a composition of other permutations:
a(n) = A252755(A269386(n)).
a(n) = A252753(A269388(n)).
Other identities. For all n >= 1:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]
a(A003309(n)) = A008578(n). [Maps Ludic numbers to noncomposites.]

A269865 Permutation of natural numbers: a(1) = 1, a(2n) = 2*a(n), a(2n+1) = A250469(1+a(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 8, 7, 10, 15, 12, 11, 18, 27, 16, 25, 14, 21, 20, 13, 30, 45, 24, 17, 22, 33, 36, 23, 54, 81, 32, 19, 50, 75, 28, 35, 42, 63, 40, 55, 26, 39, 60, 37, 90, 135, 48, 49, 34, 51, 44, 29, 66, 99, 72, 41, 46, 69, 108, 91, 162, 243, 64, 85, 38, 57, 100, 125, 150, 225, 56, 31, 70, 105, 84, 47, 126, 189, 80, 43, 110, 165, 52
Offset: 1

Views

Author

Antti Karttunen, Mar 12 2016

Keywords

Comments

This sequence can be represented as a binary tree. When the parent contains n, the left hand child contains 2n, while the value of right hand child is obtained by applying A250469(1+n):
1
|
................../ \..................
2 3
4......../ \........5 6......../ \........9
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
8 7 10 15 12 11 18 27
16 25 14 21 20 13 30 45 24 17 22 33 36 23 54 81
etc.
Note how all nodes with odd n have a right hand child with value 3n.

Crossrefs

Inverse: A269866.
Cf. A250469.
Related or similar permutations: A269359, A269863, A269864, A269867, A246375, A249814, A252755, A270195.

Formula

a(1) = 1, a(2n) = 2*a(n), a(2n+1) = A250469(1+a(n)).

A280692 a(n) = A003961(n) - A250469(n).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 6, 0, -6, 0, 12, 0, -6, 0, 36, 0, 24, 0, 6, 0, -24, 0, 66, 0, -24, 60, 18, 0, 18, 0, 150, -20, -42, 0, 120, 0, -42, -10, 72, 0, 42, 0, -12, 60, -48, 0, 264, 0, 0, -30, 0, 0, 216, 0, 132, -30, -78, 0, 138, 0, -72, 120, 540, 0, 0, 0, -30, -30, 24, 0, 462, 0, -96, 60, -18, 0, 24, 0, 330, 420, -114, 0, 246
Offset: 1

Views

Author

Antti Karttunen, Mar 08 2017

Keywords

Crossrefs

Cf. A280693 (gives the positions of zeros).
Cf. also arrays A083221 and A246278.

Programs

  • Mathematica
    f[n_] := f[n] = Which[n == 1, 1, PrimeQ@ n, NextPrime@ n, True, Times @@ Replace[FactorInteger[n], {p_, e_} :> f[p]^e, 1]]; g[n_] := If[n == 1, 0, PrimePi@ FactorInteger[n][[1, 1]]]; Function[s, MapIndexed[ Function[{m, n}, f@ n - Lookup[s, g[n] + 1][[m]] + Boole[n == 1]][#1, First@ #2] &, #] &@ Map[Position[Lookup[s, g@ #], #][[1, 1]] &, Range@ 120]]@ PositionIndex@ Array[g, 10^4] (* Michael De Vlieger, Mar 09 2017, Version 10 *)
  • Scheme
    (define (A280692 n) (- (A003961 n) (A250469 n)))

Formula

a(n) = A003961(n) - A250469(n).

A250471 Permutation of natural numbers: a(n) = (A250469(n) + 1) / 2.

Original entry on oeis.org

1, 2, 3, 5, 4, 8, 6, 11, 13, 14, 7, 17, 9, 20, 18, 23, 10, 26, 12, 29, 28, 32, 15, 35, 25, 38, 33, 41, 16, 44, 19, 47, 43, 50, 39, 53, 21, 56, 48, 59, 22, 62, 24, 65, 58, 68, 27, 71, 61, 74, 63, 77, 30, 80, 46, 83, 73, 86, 31, 89, 34, 92, 78, 95, 60, 98, 36, 101, 88, 104, 37, 107, 40, 110, 93, 113, 72, 116, 42, 119, 103, 122, 45, 125, 67, 128, 108, 131, 49
Offset: 1

Views

Author

Antti Karttunen, Dec 06 2014

Keywords

Crossrefs

Inverse: A250472.

Programs

Formula

a(n) = (A250469(n) + 1) / 2.

A253886 Permutation of even numbers: a(n) = A250469(n+1) - 1.

Original entry on oeis.org

0, 2, 4, 8, 6, 14, 10, 20, 24, 26, 12, 32, 16, 38, 34, 44, 18, 50, 22, 56, 54, 62, 28, 68, 48, 74, 64, 80, 30, 86, 36, 92, 84, 98, 76, 104, 40, 110, 94, 116, 42, 122, 46, 128, 114, 134, 52, 140, 120, 146, 124, 152, 58, 158, 90, 164, 144, 170, 60, 176, 66, 182, 154, 188, 118, 194, 70, 200, 174, 206, 72, 212, 78, 218, 184, 224, 142, 230, 82
Offset: 0

Views

Author

Antti Karttunen, Jan 18 2015

Keywords

Crossrefs

Programs

Formula

a(n) = A250469(n+1) - 1.

A266416 Permutation of natural numbers: a(n) = A064989(A263273(A250469(n))).

Original entry on oeis.org

1, 2, 5, 4, 3, 10, 17, 6, 13, 8, 11, 34, 9, 22, 71, 20, 7, 18, 19, 14, 23, 12, 21, 38, 41, 26, 53, 16, 31, 42, 29, 62, 107, 68, 67, 142, 61, 58, 197, 44, 25, 122, 59, 50, 137, 40, 73, 118, 49, 82, 227, 36, 33, 146, 55, 46, 89, 28, 43, 66, 37, 86, 91, 24, 45, 106, 35, 74, 65, 76, 15, 70, 47, 30, 119, 52
Offset: 1

Views

Author

Antti Karttunen, Jan 02 2016

Keywords

Crossrefs

Inverse: A266415.
Related permutations: A064216, A250471, A264985, A264996, A266403, A266645.

Programs

Formula

a(n) = A064989(A263273(A250469(n))).
As a composition of related permutations:
a(n) = A266645(A266403(n)).
a(n) = A064216(A264996(A250471(n))) = A064216(1+A264985(-1+A250471(n))).
Other identities. For all n >= 0:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]
Showing 1-10 of 56 results. Next