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.

A165090 a(n) is the image of n under the base-8 Kaprekar map n -> (n with digits sorted into descending order) - (n with digits sorted into ascending order).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 7, 14, 21, 28, 35, 42, 14, 7, 0, 7, 14, 21, 28, 35, 21, 14, 7, 0, 7, 14, 21, 28, 28, 21, 14, 7, 0, 7, 14, 21, 35, 28, 21, 14, 7, 0, 7, 14, 42, 35, 28, 21, 14, 7, 0, 7, 49, 42, 35, 28, 21, 14, 7, 0, 63, 63, 126, 189, 252, 315, 378, 441, 63, 0, 63, 126, 189
Offset: 0

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Examples

			For n = 11, 11_10 = 13_8. So, a(11) = 31_8 - 13_8 = 25 - 11 = 14. - _Indranil Ghosh_, Feb 02 2017
		

Crossrefs

Cf. A165091.
In other bases: A164884 (base 2), A164993 (base 3), A165012 (base 4), A165032 (base 5), A165051 (base 6), A165071 (base 7), A165110 (base 9), A151949 (base 10).

Programs

  • Mathematica
    a[n_] := With[{dd = IntegerDigits[n, 8]}, FromDigits[ReverseSort[dd], 8] - FromDigits[Sort[dd], 8]];
    a /@ Range[0, 100] (* Jean-François Alcover, Jan 08 2020 *)
  • Python
    def A165090(n):
        if n==0:return 0
        return int("".join(sorted(oct(n)[2:],reverse=True)),8)-int("".join(sorted(oct(n)[2:])),8) # Indranil Ghosh, Feb 02 2017

A151950 a(n) = A151949(n)/9.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 2, 1, 0, 1, 2, 3, 4, 5, 6, 7, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 7, 6, 5, 4, 3, 2, 1, 0, 1, 2, 8, 7, 6, 5, 4, 3, 2, 1, 0, 1, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 11, 11, 22
Offset: 0

Views

Author

N. J. A. Sloane, Aug 18 2009

Keywords

Crossrefs

In other bases: A164884 (base 2), A164994 (base 3), A165013 (base 4), A165033 (base 5), A165052 (base 6), A165072 (base 7), A165091 (base 8), A165111 (base 9). [From Joseph Myers, Sep 05 2009]

Programs

  • PARI
    a(n) = my(d=digits(n)); (fromdigits(vecsort(d,,4)) - fromdigits(vecsort(d)))/9; \\ Michel Marcus, Sep 25 2018

Extensions

Extended by Joseph Myers, Aug 28 2009

A165033 A165032(n)/4.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 1, 2, 3, 2, 1, 0, 1, 2, 3, 2, 1, 0, 1, 4, 3, 2, 1, 0, 6, 6, 12, 18, 24, 6, 0, 6, 12, 18, 12, 6, 6, 12, 18, 18, 12, 12, 12, 18, 24, 18, 18, 18, 18, 12, 12, 12, 18, 24, 12, 6, 6, 12, 18, 12, 6, 0, 6, 12, 18, 12, 6, 6, 12, 24, 18, 12, 12, 12, 18, 18, 18, 18, 24, 18, 12, 12
Offset: 0

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Crossrefs

Cf. A165032.
In other bases: A164884 (base 2), A164994 (base 3), A165013 (base 4), A165052 (base 6), A165072 (base 7), A165091 (base 8), A165111 (base 9), A151950 (base 10).

A164994 A164993(n)/2.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 2, 1, 0, 4, 4, 8, 4, 0, 4, 8, 4, 4, 8, 8, 8, 8, 4, 4, 8, 4, 0, 13, 16, 29, 16, 13, 26, 29, 26, 29, 16, 13, 26, 13, 0, 13, 26, 13, 16, 29, 26, 29, 26, 13, 16, 29, 16, 13, 26, 29, 32, 29, 26, 29, 32, 29, 26, 29, 26, 29, 26, 13, 16, 29, 16, 13, 32, 29, 26, 29, 16, 13, 26
Offset: 0

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Crossrefs

Cf. A164993.
In other bases: A164884 (base 2), A165013 (base 4), A165033 (base 5), A165052 (base 6), A165072 (base 7), A165091 (base 8), A165111 (base 9), A151950 (base 10).

A165013 a(n) = A165012(n)/3.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 2, 2, 1, 0, 1, 3, 2, 1, 0, 5, 5, 10, 15, 5, 0, 5, 10, 10, 5, 5, 10, 15, 10, 10, 10, 10, 10, 10, 15, 10, 5, 5, 10, 10, 5, 0, 5, 15, 10, 5, 5, 15, 15, 15, 15, 15, 10, 10, 10, 15, 10, 5, 5, 15, 10, 5, 0, 21, 25, 46, 67, 25, 21, 42, 63, 46, 42, 46, 67, 67, 63, 67, 71, 25, 21
Offset: 0

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Crossrefs

Cf. A165012.
In other bases: A164884 (base 2), A164994 (base 3), A165033 (base 5), A165052 (base 6), A165072 (base 7), A165091 (base 8), A165111 (base 9), A151950 (base 10).

A165052 A165051(n)/5.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 3, 4, 2, 1, 0, 1, 2, 3, 3, 2, 1, 0, 1, 2, 4, 3, 2, 1, 0, 1, 5, 4, 3, 2, 1, 0, 7, 7, 14, 21, 28, 35, 7, 0, 7, 14, 21, 28, 14, 7, 7, 14, 21, 28, 21, 14, 14, 14, 21, 28, 28, 21, 21, 21, 21, 28, 35, 28, 28, 28, 28, 28, 14, 14, 14, 21, 28, 35, 14, 7, 7, 14, 21, 28, 14
Offset: 0

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Crossrefs

Cf. A165051.
In other bases: A164884 (base 2), A164994 (base 3), A165013 (base 4), A165033 (base 5), A165072 (base 7), A165091 (base 8), A165111 (base 9), A151950 (base 10).

A165072 A165071(n)/6.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 3, 4, 5, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 3, 4, 3, 2, 1, 0, 1, 2, 5, 4, 3, 2, 1, 0, 1, 6, 5, 4, 3, 2, 1, 0, 8, 8, 16, 24, 32, 40, 48, 8, 0, 8, 16, 24, 32, 40, 16, 8, 8, 16, 24, 32, 40, 24, 16, 16, 16, 24, 32, 40, 32, 24, 24, 24, 24, 32, 40, 40, 32, 32, 32, 32
Offset: 0

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Crossrefs

Cf. A165071.
In other bases: A164884 (base 2), A164994 (base 3), A165013 (base 4), A165033 (base 5), A165052 (base 6), A165091 (base 8), A165111 (base 9), A151950 (base 10).

A165111 A165110(n)/8.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 2, 1, 0, 1, 2, 3, 4, 5, 6, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 6, 5, 4, 3, 2, 1, 0, 1, 2, 7, 6, 5, 4, 3, 2, 1, 0, 1, 8, 7, 6, 5, 4, 3, 2, 1, 0, 10, 10, 20, 30, 40, 50, 60, 70, 80, 10, 0, 10, 20, 30, 40, 50
Offset: 0

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Crossrefs

Cf. A165110.
In other bases: A164884 (base 2), A164994 (base 3), A165013 (base 4), A165033 (base 5), A165052 (base 6), A165072 (base 7), A165091 (base 8), A151950 (base 10).
Showing 1-8 of 8 results.