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

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

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

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

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 11, 8, 17, 10, 7, 12, 13, 14, 25, 38, 9, 30, 23, 20, 53, 34, 19, 36, 15, 26, 51, 28, 29, 18, 37, 76, 33, 22, 83, 24, 31, 16, 39, 40, 47, 42, 59, 46, 75, 44, 41, 218, 73, 122, 27, 52, 21, 188, 107, 56, 101, 58, 43, 100, 89, 74, 397, 152, 65, 66, 109, 134, 131, 70, 71, 514, 49, 62, 45, 32, 239, 78, 97, 120, 563, 82, 35
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 reverse the binary representation of the resulting odd number (with A030101), 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. A265329, A266404 (other conjugates or similar sequences derived from A057889).
Cf. also A266401, A266415, A266416.

Programs

  • Mathematica
    f[n_] := Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose @FactorInteger@ n; g[n_] := FromDigits[Reverse@ IntegerDigits[n, 2], 2] 2^IntegerExponent[n, 2]; h[p_?PrimeQ] := h[p] = Prime[PrimePi@ p + 1]; h[1] = 1; h[n_] := h[n] = Times @@ (h[First@ #]^Last@ # &) /@ FactorInteger@ n; Table[f@ g@ h@ n, {n, 83}] (* A266402, after Jean-François Alcover at A003961 and Ivan Neretin at A057889 *)
  • PARI
    A030101(n) = if(n<1,0,subst(Polrev(binary(n)),x,2));
    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)};
    A266402 = n -> A064989(A030101(A003961(n)));
    for(n=1, 8191, write("b266402.txt", n, " ", A266402(n)));
    
  • Scheme
    (define (A266402 n) (A064989 (A057889 (A003961 n))))

Formula

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

A266407 Permutation of natural numbers: a(n) = A064989(A263273((2*n)-1)).

Original entry on oeis.org

1, 2, 5, 3, 4, 17, 11, 10, 9, 7, 6, 19, 13, 8, 21, 31, 34, 71, 29, 22, 61, 25, 20, 59, 41, 18, 73, 23, 14, 33, 43, 12, 53, 37, 38, 35, 15, 26, 67, 47, 16, 157, 107, 42, 145, 55, 62, 197, 69, 68, 179, 113, 142, 129, 39, 58, 191, 137, 44, 45, 49, 122, 227, 101, 50, 199, 151, 40, 121, 57, 118, 211, 89, 82, 111, 149, 36, 91, 85
Offset: 1

Views

Author

Antti Karttunen, Jan 02 2016

Keywords

Crossrefs

Inverse: A266408.
Cf. also A064216, A266401, A266403.

Programs

  • 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.
    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)};
    A266407 = n -> A064989(A263273((2*n)-1));
    for(n=1, 9842, write("b266407.txt", n, " ", A266407(n)));
    
  • Scheme
    (define (A266407 n) (A064989 (A263273 (+ n n -1))))

Formula

a(n) = A064989(A263273((2*n)-1)).

A266408 Permutation of natural numbers: a(n) = (1/2) * (1+A263273(A003961(n))).

Original entry on oeis.org

1, 2, 4, 5, 3, 11, 10, 14, 9, 8, 7, 32, 13, 29, 37, 41, 6, 26, 12, 23, 15, 20, 28, 95, 22, 38, 115, 86, 19, 110, 16, 122, 30, 17, 36, 77, 34, 35, 55, 68, 25, 44, 31, 59, 60, 83, 40, 284, 61, 65, 100, 113, 33, 344, 46, 257, 70, 56, 24, 329, 21, 47, 289, 365, 88, 89, 39, 50, 49, 107, 18, 230, 27, 101, 244, 104, 112, 164, 82, 203, 174, 74
Offset: 1

Views

Author

Antti Karttunen, Jan 02 2016

Keywords

Crossrefs

Inverse: A266407.
Cf. also A048673, A266401, A266403.

Programs

  • 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
    A266408 = n -> (1+A263273(A003961(n)))/2;
    for(n=1, 8191, write("b266408.txt", n, " ", A266408(n)));
    
  • Scheme
    (define (A266408 n) (/ (+ 1 (A263273 (A003961 n))) 2))

Formula

a(n) = (1/2) * (1+A263273(A003961(n))).
Showing 1-8 of 8 results.