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-5 of 5 results.

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

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

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

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

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

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 02 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]]]; s = Select[f /@ Range@ 5000, OddQ]; t = Table[(s[[n + 1]] - 1)/2, {n, 0, 1000}]; Table[f@ t[[f@ n + 1]], {n, 0, 82}] (* 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 a264985(n): return (a263273(2*n + 1) - 1)/2
    def a(n): return a263273(a264985(a263273(n))) # Indranil Ghosh, May 22 2017
  • Scheme
    (define (A266189 n) (A263273 (A264985 (A263273 n))))
    

Formula

a(n) = A263273(A264985(A263273(n))).
As a composition of related permutations:
a(n) = A263273(A265353(n)).
a(n) = A265354(A263273(n)).
Showing 1-5 of 5 results.