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

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

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

A266401 Self-inverse permutation of natural numbers: a(n) = A064989(A263273(A003961(n))).

Original entry on oeis.org

1, 2, 5, 4, 3, 10, 17, 8, 13, 6, 11, 20, 9, 34, 71, 16, 7, 26, 19, 12, 23, 22, 21, 40, 41, 18, 227, 68, 31, 142, 29, 32, 53, 14, 67, 52, 61, 38, 107, 24, 25, 46, 59, 44, 65, 42, 73, 80, 49, 82, 197, 36, 33, 454, 55, 136, 137, 62, 43, 284, 37, 58, 571, 64, 45, 106, 35, 28, 89, 134, 15, 104, 47
Offset: 1

Views

Author

Antti Karttunen, Jan 02 2016

Keywords

Comments

Shift primes in the prime factorization of n one step towards larger primes (A003961), then apply the bijective base-3 reverse (A263273) to the resulting odd number, which yields another (or same) odd number, then shift primes in the prime factorization of that second odd number one step back towards smaller primes (A064989).

Crossrefs

Cf. A265369, A265904, A266190, A266403 (other conjugates or similar sequences derived from A263273).

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]]]; g[p_?PrimeQ] := g[p] = Prime[PrimePi@ p + 1]; g[1] = 1; g[n_] := g[n] = Times @@ (g[First@ #]^Last@ # &) /@ FactorInteger@ n; h[n_] := Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n; Table[h@ f@ g@ n, {n, 82}] (* Michael De Vlieger, Jan 04 2016, after Jean-François Alcover at A003961 and A263273 *)
  • PARI
    A030102(n) = { my(r=[n%3]); while(0M. F. Hasler's Nov 04 2011 code in A030102.
    A263273 = n -> if(!n,n,A030102(n/(3^valuation(n,3))) * (3^valuation(n, 3))); \\ Taking of the quotient probably unnecessary.
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of Michel Marcus
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A266401 = n -> A064989(A263273(A003961(n)));
    for(n=1, 6560, write("b266401.txt", n, " ", A266401(n)));
    
  • Scheme
    (define (A266401 n) (A064989 (A263273 (A003961 n))))

Formula

a(n) = A064989(A263273(A003961(n))).
As a composition of related permutations:
a(n) = A064216(A264996(A048673(n))).
Other identities. For all n >= 0:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]

A266646 Permutation of natural numbers: a(n) = A250470(A003961(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 10, 9, 8, 11, 16, 13, 12, 15, 28, 17, 26, 19, 22, 21, 14, 23, 46, 25, 18, 51, 34, 29, 36, 31, 82, 27, 20, 35, 76, 37, 24, 33, 64, 41, 56, 43, 40, 69, 30, 47, 136, 49, 50, 39, 52, 53, 126, 55, 100, 45, 32, 59, 106, 61, 38, 111, 244, 65, 66, 67, 58, 57, 78, 71, 226, 73, 42, 99, 70, 77, 86, 79, 190, 249, 44, 83, 166, 85
Offset: 1

Views

Author

Antti Karttunen, Jan 02 2016

Keywords

Crossrefs

Inverse: A266645.
Related permutations: A249817, A249818, A266403, A266415.

Programs

Formula

a(n) = A250470(A003961(n)).
As a composition of related permutations:
a(n) = A266403(A266415(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).

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

Original entry on oeis.org

0, 1, 2, 3, 4, 11, 6, 29, 8, 9, 10, 5, 12, 13, 38, 33, 92, 17, 18, 83, 20, 87, 110, 35, 24, 89, 26, 27, 28, 7, 30, 37, 32, 15, 86, 23, 36, 31, 14, 39, 40, 119, 114, 281, 44, 99, 254, 65, 276, 335, 98, 51, 260, 71, 54, 245, 56, 249, 326, 101, 60, 263, 74, 261, 272, 47, 330, 353, 116, 105, 278, 53, 72, 251, 62, 267, 332, 107, 78, 269, 80, 81, 82, 19
Offset: 0

Views

Author

Antti Karttunen, Jan 02 2016

Keywords

Comments

A263273 conjugated with the permutation obtained from its even bisection.

Crossrefs

Cf. also A265902.
Cf. A265369, A266190, A266401, A266403 (other conjugates or similar derivations of A263273).

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]]]; t = Table[f[2 n]/2, {n, 0, 1000}]; Table[t[[f[t[[n + 1]]] + 1]], {n, 0, 83}] (* 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 a263272(n): return a263273(2*n)/2
    def a(n): return a263272(a263273(a263272(n))) # Indranil Ghosh, May 25 2017
  • Scheme
    (define (A265904 n) (A263272 (A263273 (A263272 n))))
    

Formula

a(n) = A263272(A263273(A263272(n))).
As a composition of related permutations:
a(n) = A263272(A265352(n)).
a(n) = A265351(A263272(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.]

A266190 Self-inverse permutation of nonnegative integers: a(n) = A264985(A263273(A264985(n))).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 9, 19, 12, 13, 14, 15, 16, 17, 24, 11, 69, 21, 25, 23, 18, 22, 26, 31, 28, 73, 30, 27, 46, 33, 55, 58, 37, 36, 64, 39, 40, 41, 42, 43, 44, 51, 32, 150, 48, 52, 50, 45, 49, 53, 78, 34, 213, 57, 35, 204, 60, 61, 231, 75, 38, 210, 66, 79, 68, 20, 70, 77, 72, 29, 207, 63, 76, 71, 54, 67, 80, 94, 85, 235
Offset: 0

Views

Author

Antti Karttunen, Jan 02 2016

Keywords

Comments

A263273 conjugated with the permutation obtained from its odd bisection.

Crossrefs

Cf. A265369, A265904, A266401, A266403 (other conjugates or similar derivations of A263273).
Cf. also A266189.

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]]]; s = Select[f /@ Range@ 5000, OddQ]; t = Table[(s[[n + 1]] - 1)/2, {n, 0, 1000}]; Table[t[[f[t[[n + 1]]] + 1]], {n, 0, 83}] (* Michael De Vlieger, Jan 04 2016, after Jean-François Alcover at A263273 *)
  • Scheme
    (define (A266190 n) (A264985 (A263273 (A264985 n))))

Formula

a(n) = A264985(A263273(A264985(n))).
As a composition of related permutations:
a(n) = A265353(A264985(n)).
a(n) = A264985(A265354(n)).

A266415 Permutation of natural numbers: a(n) = A250470(A263273(A003961(n))).

Original entry on oeis.org

1, 2, 5, 4, 3, 8, 17, 10, 13, 6, 11, 22, 9, 20, 71, 28, 7, 18, 19, 16, 23, 14, 21, 64, 41, 26, 227, 58, 31, 74, 29, 82, 53, 12, 67, 52, 61, 24, 107, 46, 25, 30, 59, 40, 65, 56, 73, 190, 49, 44, 197, 76, 27, 230, 55, 172, 137, 38, 43, 220, 37, 32, 571, 244, 69, 60, 35, 34, 89, 72, 15, 154, 47, 68, 479, 70
Offset: 1

Views

Author

Antti Karttunen, Jan 02 2016

Keywords

Crossrefs

Inverse: A266416.
Related permutations: A048673, A250472, A264985, A264996, A266403, A266646.

Programs

Formula

a(n) = A250470(A263273(A003961(n))).
As a composition of related permutations:
a(n) = A266403(A266646(n)).
a(n) = A250472(A264996(A048673(n))) = A250472(1+A264985(-1+A048673(n))).
Other identities. For all n >= 0:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]

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

A264996 Self-inverse permutation of natural numbers: a(n) = (1/2) * (1+A263273(2n -1)) = 1 + A264985(n-1).

Original entry on oeis.org

1, 2, 4, 3, 5, 10, 7, 11, 13, 6, 8, 12, 9, 14, 28, 19, 29, 37, 16, 20, 34, 25, 32, 31, 22, 38, 40, 15, 17, 33, 24, 23, 30, 21, 35, 39, 18, 26, 36, 27, 41, 82, 55, 83, 109, 46, 56, 100, 73, 86, 91, 64, 110, 118, 43, 47, 97, 70, 59, 88, 61, 101, 115, 52, 74, 106, 79, 95, 85, 58, 92, 112, 49, 65, 103, 76
Offset: 1

Views

Author

Antti Karttunen, Jan 04 2016

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]]]; Array[(1/2) (1 + f[2 # - 1]) &, {76}] (* Michael De Vlieger, Jan 04 2016, after Jean-François Alcover at A263273 *)

Formula

a(n) = (1/2) * (1+A263273((2*n)-1)).
a(n) = 1 + A264985(n-1).

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

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 11, 8, 17, 10, 7, 12, 13, 20, 25, 16, 9, 18, 23, 14, 53, 22, 19, 28, 15, 36, 27, 24, 29, 40, 37, 32, 33, 34, 83, 26, 31, 42, 51, 30, 47, 38, 59, 44, 101, 76, 41, 60, 73, 68, 39, 52, 21, 84, 107, 56, 131, 72, 43, 48, 89, 80, 125, 64, 65, 66, 109, 50, 99, 82, 71, 58, 49, 74, 151, 46, 239, 78, 97, 62, 173, 70, 35, 54
Offset: 1

Views

Author

Antti Karttunen, Jan 02 2016

Keywords

Crossrefs

Cf. A265329, A266402 (other conjugates or similar derivations of A057889).
Cf. also A266403.

Programs

Formula

Other identities. For all n >= 0:
A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.]
Showing 1-10 of 12 results. Next