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

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

A264976 Permutation of nonnegative integers: a(n) = A263272(A264974(n)).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 11, 32, 9, 10, 29, 12, 13, 14, 15, 8, 23, 18, 7, 20, 33, 34, 95, 96, 35, 104, 27, 28, 83, 30, 31, 86, 87, 38, 113, 36, 37, 110, 39, 40, 41, 42, 17, 50, 45, 16, 47, 24, 25, 68, 69, 26, 77, 54, 19, 56, 21, 22, 59, 60, 101, 302, 99, 100, 299, 102, 103, 284, 285, 98, 293, 288, 97, 290, 105, 106, 311, 312, 107, 320, 81
Offset: 0

Views

Author

Antti Karttunen, Dec 05 2015

Keywords

Crossrefs

Inverse: A264975
Cf. also A264991, A264992.

Formula

a(n) = A263272(A264974(n)).
a(n) = (1/2) * A263273(A263273(4*n) / 2).
Other identities. For all n >= 0:
a(3*n) = 3*a(n).
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]

A264991 Permutation of nonnegative integers: a(n) = A264989(A264985(n)).

Original entry on oeis.org

0, 1, 5, 2, 4, 14, 6, 16, 17, 3, 7, 8, 11, 13, 41, 15, 43, 44, 18, 19, 59, 56, 49, 50, 47, 52, 53, 9, 10, 32, 29, 22, 23, 20, 25, 26, 12, 34, 35, 38, 40, 122, 42, 124, 125, 45, 46, 140, 137, 130, 131, 128, 133, 134, 54, 55, 167, 164, 58, 176, 60, 178, 179, 57, 169, 170, 173, 148, 149, 51, 151, 152, 48
Offset: 0

Views

Author

Antti Karttunen, Dec 05 2015

Keywords

Crossrefs

Inverse: A264992.
Cf. also A264975, A264976.

Programs

Formula

a(n) = A264989(A264985(n)).

A264992 Permutation of nonnegative integers: a(n) = A264985(A264989(n)).

Original entry on oeis.org

0, 1, 3, 9, 4, 2, 6, 10, 11, 27, 28, 12, 36, 13, 5, 15, 7, 8, 18, 19, 33, 99, 31, 32, 96, 34, 35, 81, 82, 30, 90, 85, 29, 87, 37, 38, 108, 109, 39, 117, 40, 14, 42, 16, 17, 45, 46, 24, 72, 22, 23, 69, 25, 26, 54, 55, 21, 63, 58, 20, 60, 100, 101, 297, 298, 102, 306, 94, 95, 285, 97, 98, 288
Offset: 0

Views

Author

Antti Karttunen, Dec 05 2015

Keywords

Crossrefs

Inverse: A264991.
Cf. also A264975, A264976.

Programs

Formula

a(n) = A264985(A264989(n)).

A264984 Even bisection of A263273; terms of A263262 doubled.

Original entry on oeis.org

0, 2, 4, 6, 8, 10, 12, 22, 16, 18, 20, 14, 24, 26, 28, 30, 64, 46, 36, 58, 40, 66, 76, 34, 48, 70, 52, 54, 56, 38, 60, 74, 32, 42, 68, 50, 72, 62, 44, 78, 80, 82, 84, 190, 136, 90, 172, 118, 192, 226, 100, 138, 208, 154, 108, 166, 112, 174, 220, 94, 120, 202, 148, 198, 184, 130
Offset: 0

Views

Author

Antti Karttunen, Dec 05 2015

Keywords

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(2*n) # Indranil Ghosh, May 22 2017
  • Scheme
    (define (A264984 n) (A263273 (+ n n)))
    

Formula

a(n) = 2 * A263272(n).
a(n) = A263273(2*n).
Other identities. For all n >= 0:
A010873(a(n)) = 2 * A000035(n) = A010673(n).

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

Original entry on oeis.org

0, 1, 2, 3, 4, 19, 6, 5, 16, 9, 10, 55, 12, 13, 58, 57, 46, 49, 18, 7, 20, 15, 14, 17, 48, 43, 52, 27, 28, 163, 30, 37, 172, 165, 136, 145, 36, 31, 166, 39, 40, 175, 174, 139, 148, 171, 22, 181, 138, 127, 154, 147, 130, 157, 54, 11, 56, 21, 34, 169, 60, 47, 142, 45, 8, 59, 42, 41, 50, 51, 44, 53, 144, 25, 178, 129, 124, 151, 156, 133, 160, 81
Offset: 0

Views

Author

Antti Karttunen, Dec 07 2015

Keywords

Comments

Composition of A263273 with the permutations obtained from its bisection (A263272) and quadrisection (A264974), in that order from right to left.

Crossrefs

Programs

Formula

a(n) = A264974(A263272(A263273(n))).
As a composition of other related permutations:
a(n) = A264974(A265351(n)).
a(n) = A264975(A263273(n)).
Other identities. For all n >= 0:
a(3*n) = 3*a(n).
Showing 1-7 of 7 results.