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.

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

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

A264967 Permutation of nonnegative integers: a(n) = A263272(A246200(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Dec 05 2015

Keywords

Crossrefs

Inverse: A264968.
Cf. also A264965, A264966.

Programs

Formula

a(n) = A263272(A246200(n)).
Other identities. For all n >= 0:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of numbers.]
Showing 1-4 of 4 results.