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 70 results. Next

A263272 Self-inverse permutation of nonnegative integers: a(n) = A263273(2*n) / 2.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 11, 8, 9, 10, 7, 12, 13, 14, 15, 32, 23, 18, 29, 20, 33, 38, 17, 24, 35, 26, 27, 28, 19, 30, 37, 16, 21, 34, 25, 36, 31, 22, 39, 40, 41, 42, 95, 68, 45, 86, 59, 96, 113, 50, 69, 104, 77, 54, 83, 56, 87, 110, 47, 60, 101, 74, 99, 92, 65, 114, 119, 44, 51, 98, 71, 72, 89, 62, 105, 116, 53, 78, 107, 80, 81
Offset: 0

Views

Author

Antti Karttunen, Dec 05 2015

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{g, h}, g[x_] := x/3^IntegerExponent[x, 3]; h[x_] := x/g@ x; If[n == 0, 0, FromDigits[Reverse@ IntegerDigits[#, 3], 3] &@ g[n] h[n]]]; Table[f[2 n]/2, {n, 0, 81}] (* Michael De Vlieger, Jan 04 2016,after Jean-François Alcover at A263273 *)
  • Python
    from sympy import factorint
    from sympy.ntheory.factor_ import digits
    from operator import mul
    def a030102(n): return 0 if n==0 else int(''.join(map(str, digits(n, 3)[1:][::-1])), 3)
    def a038502(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==3 else i**f[i] for i in f])
    def a038500(n): return n/a038502(n)
    def a263273(n): return 0 if n==0 else a030102(a038502(n))*a038500(n)
    def a(n): return a263273(2*n)/2 # Indranil Ghosh, May 23 2017
  • Scheme
    (define (A263272 n) (/ (A263273 (+ n n)) 2))
    

Formula

a(n) = A263273(2*n) / 2 = A264984(n) / 2.
As a composition of related permutations:
a(n) = A264974(A264975(n)) = A264976(A264974(n)).
Other identities. For all n >= 0:
a(3*n) = 3*a(n).
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]
A264974(n) = a(2n)/2. [Thus the restriction onto even numbers induces yet another permutation.]

A264974 Self-inverse permutation of natural numbers: a(n) = A263273(4*n) / 4.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 16, 9, 10, 19, 12, 13, 14, 15, 8, 17, 18, 11, 20, 21, 34, 43, 48, 25, 52, 27, 28, 55, 30, 37, 46, 57, 22, 49, 36, 31, 58, 39, 40, 41, 42, 23, 50, 45, 32, 59, 24, 35, 44, 51, 26, 53, 54, 29, 56, 33, 38, 47, 60, 61, 142, 63, 88, 169, 102, 115, 124, 129, 70, 151, 144, 97, 178, 75, 106, 133, 156, 79, 160, 81
Offset: 0

Views

Author

Antti Karttunen, Dec 05 2015

Keywords

Crossrefs

Terms of A264986 halved.
Cf. also A264975, A264976.

Programs

  • Python
    from sympy import factorint
    from sympy.ntheory.factor_ import digits
    from operator import mul
    def a030102(n): return 0 if n==0 else int(''.join(map(str, digits(n, 3)[1:][::-1])), 3)
    def a038502(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==3 else i**f[i] for i in f])
    def a038500(n): return n/a038502(n)
    def a263273(n): return 0 if n==0 else a030102(a038502(n))*a038500(n)
    def a(n): return a263273(4*n)/4 # Indranil Ghosh, May 25 2017

Formula

a(n) = A263273(4*n) / 4.
a(n) = A264986(n) / 2 = A263272(2*n) / 2.
As a composition of related permutations:
a(n) = A264975(A263272(n)) = A263272(A264976(n)).
Other identities. For all n >= 0:
a(3*n) = 3*a(n).
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]
A264978(n) = a(2n)/2. [Thus the restriction onto even numbers induces yet another permutation.]

A264965 Permutation of nonnegative integers: a(n) = A263273(A057889(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 6, 5, 8, 9, 10, 13, 12, 19, 22, 21, 16, 25, 18, 17, 20, 15, 26, 55, 24, 11, 14, 27, 28, 23, 30, 37, 64, 57, 46, 43, 36, 67, 70, 33, 40, 31, 66, 79, 52, 63, 38, 47, 48, 73, 58, 75, 76, 49, 54, 65, 56, 39, 34, 29, 60, 61, 74, 45, 32, 59, 42, 145, 68, 81, 226, 193, 72, 35, 82, 219, 100, 217, 174, 121, 80, 69
Offset: 0

Views

Author

Antti Karttunen, Dec 05 2015

Keywords

Comments

Perform an adjusted reverse of n in base 2, followed by another adjusted reverse in base 3. "Adjusted reverse" here means the digit-reversing operation in which the tail of trailing zeros (in the base in question) is fixed, while the portion from the most significant digit to the least significant nonzero digit is reversed.
What percentage of the cycles are finite? (See the scatter-plot and A264969, also A264972, A264973.)

Crossrefs

Programs

Formula

a(n) = A263273(A057889(n)).
Other identities. For all n >= 0:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]

A264966 Permutation of nonnegative integers: a(n) = A057889(A263273(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 05 2015

Keywords

Comments

Perform an adjusted reverse of n in base 3, followed by another adjusted reverse in base 2. "Adjusted reverse" here means a digit-reversing operation where the suffix of trailing zeros (in the base in question) stays as it is at the right side, and only the section from the most significant digit to the least significant nonzero digit is reversed.

Crossrefs

Inverse: A264965.
Cf. also A264967, A264968.

Programs

Formula

a(n) = A057889(A263273(n)).
Other identities. For all n >= 0:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]

A265352 Permutation of nonnegative integers: a(n) = A263273(A263272(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 6, 19, 8, 9, 10, 5, 12, 13, 22, 21, 64, 23, 18, 55, 20, 57, 58, 25, 24, 73, 26, 27, 28, 11, 30, 31, 16, 15, 46, 17, 36, 37, 14, 39, 40, 67, 66, 199, 68, 63, 190, 65, 192, 193, 70, 69, 208, 71, 54, 163, 56, 165, 166, 61, 60, 181, 62, 171, 172, 59, 174, 175, 76, 75, 226, 77, 72, 217, 74, 219, 220, 79, 78, 235, 80, 81
Offset: 0

Views

Author

Antti Karttunen, Dec 07 2015

Keywords

Comments

Composition of A263273 with the permutation obtained from its even bisection.

Crossrefs

Programs

  • Python
    from sympy import factorint
    from sympy.ntheory.factor_ import digits
    from operator import mul
    def a030102(n): return 0 if n==0 else int(''.join(map(str, digits(n, 3)[1:][::-1])), 3)
    def a038502(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==3 else i**f[i] for i in f])
    def a038500(n): return n/a038502(n)
    def a263273(n): return 0 if n==0 else a030102(a038502(n))*a038500(n)
    def a(n): return a263273(a263273(2*n)/2) # Indranil Ghosh, Jun 08 2017
  • Scheme
    (define (A265352 n) (A263273 (A263272 n)))
    

Formula

a(n) = A263273(A263272(n)).
As a composition of other related permutations:
a(n) = A265368(A264974(n)).
Other identities. For all n >= 0:
a(3*n) = 3*a(n).

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

A265351 Permutation of nonnegative integers: a(n) = A263272(A263273(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 11, 6, 5, 8, 9, 10, 29, 12, 13, 38, 33, 32, 35, 18, 7, 20, 15, 14, 17, 24, 23, 26, 27, 28, 83, 30, 31, 92, 87, 86, 89, 36, 37, 110, 39, 40, 119, 114, 113, 116, 99, 34, 101, 96, 95, 98, 105, 104, 107, 54, 19, 56, 21, 22, 65, 60, 59, 62, 45, 16, 47, 42, 41, 44, 51, 50, 53, 72, 25, 74, 69, 68, 71, 78, 77, 80, 81
Offset: 0

Views

Author

Antti Karttunen, Dec 07 2015

Keywords

Comments

Composition of A263273 with the permutation obtained from its even bisection.

Crossrefs

Programs

  • Python
    from sympy import factorint
    from sympy.ntheory.factor_ import digits
    from operator import mul
    def a030102(n): return 0 if n==0 else int(''.join(map(str, digits(n, 3)[1:][::-1])), 3)
    def a038502(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==3 else i**f[i] for i in f])
    def a038500(n): return n/a038502(n)
    def a263273(n): return 0 if n==0 else a030102(a038502(n))*a038500(n)
    def a263272(n): return a263273(2*n)/2
    def a(n): return a263272(a263273(n)) # Indranil Ghosh, May 25 2017
  • Scheme
    (define (A265351 n) (A263272 (A263273 n)))
    

Formula

a(n) = A263272(A263273(n)).
As a composition of other related permutations:
a(n) = A264974(A265367(n)).
Other identities. For all n >= 0:
a(3*n) = 3*a(n).
a(n) = A265342(n)/2.

A265354 Permutation of nonnegative integers: a(n) = A263273(A264985(n)).

Original entry on oeis.org

0, 1, 3, 2, 4, 9, 6, 10, 12, 7, 5, 19, 8, 13, 27, 18, 28, 36, 21, 11, 57, 24, 37, 30, 15, 31, 39, 22, 16, 64, 23, 14, 55, 20, 46, 58, 25, 17, 73, 26, 40, 81, 54, 82, 108, 63, 29, 171, 72, 109, 90, 45, 85, 117, 66, 34, 192, 69, 38, 165, 60, 100, 174, 75, 35, 219, 78, 118, 84, 33, 91, 93, 48, 32, 138, 51, 112, 111, 42, 94, 120, 67
Offset: 0

Views

Author

Antti Karttunen, Dec 07 2015

Keywords

Comments

Composition of A263273 with the permutation obtained from its odd bisection.

Crossrefs

Inverse: A265353.
Cf. also A265352, A265355, A265356.

Programs

  • Python
    from sympy import factorint
    from sympy.ntheory.factor_ import digits
    from operator import mul
    def a030102(n): return 0 if n==0 else int(''.join(map(str, digits(n, 3)[1:][::-1])), 3)
    def a038502(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==3 else i**f[i] for i in f])
    def a038500(n): return n/a038502(n)
    def a263273(n): return 0 if n==0 else a030102(a038502(n))*a038500(n)
    def a264985(n): return (a263273(2*n + 1) - 1)/2
    def a(n): return a263273(a264985(n)) # Indranil Ghosh, May 22 2017
  • Scheme
    (define (A265354 n) (A263273 (A264985 n)))
    

Formula

a(n) = A263273(A264985(n)).

A265369 Self-inverse permutation of nonnegative integers: a(n) = A057889(A263273(A057889(n))).

Original entry on oeis.org

0, 1, 2, 3, 4, 7, 6, 5, 8, 9, 10, 11, 12, 25, 26, 21, 16, 19, 18, 17, 20, 15, 22, 59, 24, 13, 14, 27, 28, 29, 30, 41, 64, 39, 58, 53, 36, 97, 98, 33, 40, 31, 66, 121, 44, 63, 50, 61, 48, 73, 46, 105, 100, 35, 54, 65, 56, 57, 34, 23, 60, 47, 82, 45, 32, 55, 42, 137, 68, 69, 142, 131, 72, 49, 74, 219, 76, 155, 234, 79, 80, 81, 62, 173
Offset: 0

Views

Author

Antti Karttunen, Jan 02 2016

Keywords

Crossrefs

Programs

Formula

a(n) = A057889(A263273(A057889(n))).
As a composition of related permutations:
a(n) = A264966(A057889(n)).
a(n) = A057889(A264965(n)).
Other identities. For all n >= 0:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]

A265353 Permutation of nonnegative integers: a(n) = A264985(A263273(n)).

Original entry on oeis.org

0, 1, 3, 2, 4, 10, 6, 9, 12, 5, 7, 19, 8, 13, 31, 24, 28, 37, 15, 11, 33, 18, 27, 30, 21, 36, 39, 14, 16, 46, 23, 25, 73, 69, 55, 64, 17, 22, 58, 26, 40, 94, 78, 85, 112, 51, 34, 100, 72, 82, 91, 75, 109, 118, 42, 32, 96, 20, 35, 105, 60, 99, 102, 45, 29, 87, 54, 81, 84, 57, 90, 93, 48, 38, 114, 63, 108, 111, 66, 117, 120, 41
Offset: 0

Views

Author

Antti Karttunen, Dec 07 2015

Keywords

Comments

Composition of A263273 with the permutation obtained from its odd bisection.

Crossrefs

Inverse: A265354.

Programs

  • Python
    from sympy import factorint
    from sympy.ntheory.factor_ import digits
    from operator import mul
    def a030102(n): return 0 if n==0 else int(''.join(map(str, digits(n, 3)[1:][::-1])), 3)
    def a038502(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==3 else i**f[i] for i in f])
    def a038500(n): return n/a038502(n)
    def a263273(n): return 0 if n==0 else a030102(a038502(n))*a038500(n)
    def a264985(n): return (a263273(2*n + 1) - 1)/2
    def a(n): return a264985(a263273(n)) # Indranil Ghosh, May 22 2017
  • Scheme
    (define (A265353 n) (A264985 (A263273 n)))
    

Formula

a(n) = A264985(A263273(n)).
Showing 1-10 of 70 results. Next