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.

Previous Showing 31-39 of 39 results.

A165041 Consider the base-5 Kaprekar map n->K(n) defined in A165032. Sequence gives least elements of each cycle, including fixed points.

Original entry on oeis.org

0, 8, 48, 392, 1992, 7488, 53712, 249992, 1831056, 6249992, 45781056, 48217776, 170312312, 1144531056, 1205467776, 1217651376, 4514058432, 4576557032, 22460937432, 28613281056, 28671874056, 30136717776, 30441401376
Offset: 1

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Comments

Initial terms in base 5: 0, 13, 143, 3032, 30432, 214423, 3204322, 30444432, 432043211, 3044444432.

Crossrefs

In other bases: A163205 (base 2), A165002 (base 3), A165021 (base 4), A165060 (base 6), A165080 (base 7), A165099 (base 8), A165119 (base 9), A164718 (base 10).

A165060 Consider the base-6 Kaprekar map n->K(n) defined in A165051. Sequence gives least elements of each cycle, including fixed points.

Original entry on oeis.org

0, 105, 430, 4305, 5600, 16840, 27195, 33860, 42925, 218960, 895275, 1221860, 1275170, 1548445, 1657225, 6018495, 7892360, 44002820, 45962330, 47681900, 55760125, 56319925, 59679145, 60331825, 277695950, 284180120, 348285175
Offset: 1

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Comments

Initial terms in base 6: 0, 253, 1554, 31533, 41532, 205544, 325523, 420432, 530421, 4405412.

Crossrefs

In other bases: A163205 (base 2), A165002 (base 3), A165021 (base 4), A165041 (base 5), A165080 (base 7), A165099 (base 8), A165119 (base 9), A164718 (base 10).

A165080 Consider the base-7 Kaprekar map n->K(n) defined in A165071. Sequence gives least elements of each cycle, including fixed points.

Original entry on oeis.org

0, 144, 1068, 9936, 55500, 640992, 3562968, 31412208, 220709400, 227429400, 228238488, 1922263344, 11150046252, 11432420652, 75796404672, 94197649008, 96503566608, 419850417612, 546394287000, 3939440152944, 4615731883344
Offset: 1

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Comments

Initial terms in base 7: 0, 264, 3054, 40653, 320544, 5306532, 42166443, 530666532, 5316666432, 5431055322.

Crossrefs

In other bases: A163205 (base 2), A165002 (base 3), A165021 (base 4), A165041 (base 5), A165060 (base 6), A165099 (base 8), A165119 (base 9), A164718 (base 10).

A165099 Consider the base-8 Kaprekar map n->K(n) defined in A165090. Sequence gives least elements of each cycle, including fixed points.

Original entry on oeis.org

0, 21, 252, 1022, 1589, 17892, 21483, 102837, 147420, 213402, 1445787, 1707930, 1711962, 6589877, 13667738, 16092433, 76545756, 93093147, 110132442, 111443346, 421817781, 874802586, 878996762, 1029991697, 1068263553
Offset: 1

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Comments

Initial terms in base 8: 0, 25, 374, 1776, 3065, 42744, 51753, 310665, 437734, 640632.

Crossrefs

In other bases: A163205 (base 2), A165002 (base 3), A165021 (base 4), A165041 (base 5), A165060 (base 6), A165080 (base 7), A165119 (base 9), A164718 (base 10).

A165119 Consider the base-9 Kaprekar map n->K(n) defined in A165110. Sequence gives least elements of each cycle, including fixed points.

Original entry on oeis.org

0, 16, 320, 2256, 3712, 34960, 41520, 183696, 3496800, 31531872, 31596672, 278474880, 326952560, 2066242576, 2516902752, 2598744000, 23087388720, 26531651360, 167365651216, 203869268832, 211282856832, 1901588877840
Offset: 1

Views

Author

Joseph Myers, Sep 04 2009

Keywords

Comments

Initial terms in base 9: 0, 17, 385, 3076, 5074, 52854, 62853, 308876, 6518633, 65288533.

Crossrefs

In other bases: A163205 (base 2), A165002 (base 3), A165021 (base 4), A165041 (base 5), A165060 (base 6), A165080 (base 7), A165099 (base 8), A164718 (base 10).

A151965 Smallest member of cycle corresponding to n-th term of A151964.

Original entry on oeis.org

0, 495, 6174, 62964, 61974, 53955, 420876, 631764, 549945, 7509843, 64308654, 43208766, 97508421, 63317664, 864197532, 753098643, 554999445, 6431088654, 9751088421, 6543086544, 6433086654, 4332087666, 9753086421, 9975084201
Offset: 1

Views

Author

Klaus Brockhaus, Aug 19 2009

Keywords

Crossrefs

In other bases: A163205 (base 2), A165010 (base 3), A165030 (base 4), A165049 (base 5), A165069 (base 6), A165088 (base 7), A165108 (base 8), A165128 (base 9). [From Joseph Myers, Sep 05 2009]

Extensions

Extended by Joseph Myers, Aug 22 2009

A319839 Smallest fixed points (>0) of the base-2*n Kaprekar map.

Original entry on oeis.org

9, 30, 105, 21, 495, 858, 65, 2040, 2907, 133, 5313, 6900, 225, 10962, 13485, 341, 19635, 23310, 481, 31980, 37023, 645, 48645, 55272, 833, 70278, 78705, 1045, 97527, 107970, 1281, 131040, 143715, 1541, 171465, 186588, 1825, 219450, 237237, 2133, 275643, 296310, 2465
Offset: 1

Views

Author

Seiichi Manyama, Sep 29 2018

Keywords

Crossrefs

Programs

  • Ruby
    def f(k, n)
      ary = []
      while n > 0
        ary << n % k
        n /= k
      end
      ary
    end
    def g(k, ary)
      (0..ary.size - 1).inject(0){|s, i| s + ary[i] * k ** i}
    end
    def A319798(n)
      i = 1
      ary = [1]
      while g(n, ary) - g(n, ary.reverse) != i
        i += 1
        ary = f(n, i).sort
      end
      i
    end
    def A319839(n)
      (1..n).map{|i| A319798(2 * i)}
    end
    p A319839(20)

Formula

a(n) = A319798(2*n).

A160761 The Kaprekar binary numbers in decimal.

Original entry on oeis.org

9, 9, 9, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 45, 45, 49, 45, 49, 49, 45, 45, 49, 49, 45, 49, 45, 45, 45, 49, 49, 45, 49, 45, 45, 49, 45, 45, 45, 93, 93, 105, 93, 105, 105, 105, 93, 105, 105, 105, 105, 105, 105, 93, 93, 105, 105, 105, 105, 105, 105, 93, 105, 105, 105
Offset: 1

Views

Author

Damir Olejar, May 25 2009

Keywords

Examples

			The number 9 is 1001 in binary. The maximum number using the same number of 0's and one's is found and the minimum number having the same number of 0's and 1's is found to obtain the equation such as 1100 - 0011 = 1001. Repeating the same procedure always gives us the same number and pattern of 0's and 1's. Therefore 9 is one of the Kaprekar numbers. Numbers that end the procedure in 0 are excluded since they are not Kaprekar numbers.
		

References

  • M. Charosh, Some Applications of Casting Out 999...'s, Journal of Recreational Mathematics 14, 1981-82, pp. 111-118
  • D. R. Kaprekar, On Kaprekar numbers, J. Rec. Math., 13 (1980-1981), 81-82.

Crossrefs

Programs

  • Java
    class pattern { public static void main(String args[]) { int mem1 = 0; int mem2 =1; for (int i = 1; i<3000; i++) {do { mem1 = mem2; String binaryi = Integer.toBinaryString(i); String binarysort = ""; String binaryminimum = ""; for (int n = 0; n< binaryi.length(); n++) { String g = binaryi.substring(n,n+1); if (g.equals("0")){ binarysort = binarysort+"0"; } else { binarysort = "1"+binarysort; binaryminimum = binaryminimum + "1"; } } int binrev1 = Integer.parseInt(binarysort , 2); int binrev2 = Integer.parseInt(binaryminimum , 2); int diff = binrev1 - binrev2; mem2 = diff; } while (mem2!=0 && mem2!=mem1); String memtobin = Integer.toBinaryString(mem1); int ones = 0; for (int t = 0; t
    				
  • Mathematica
    nmax = 100; f[n_] := Module[{id, sid, min, max}, id = IntegerDigits[n, 2]; min = FromDigits[sid = Sort[id], 2]; max = FromDigits[Reverse[sid], 2]; max - min]; Reap[Do[If[(fpn = FixedPoint[f, n]) > 0, Sow[fpn]], {n, 1, nmax}]][[2, 1]] (* Jean-François Alcover, Apr 23 2017 *)

Formula

1. Sort all integers from the number in descending order 2. Sort all integers from the number in ascending order 3. Subtract ascending from descending order to obtain a new number 4. Repeat the steps 1-3 with a new number until a repetitive sequence is obtained or until a zero is obtained. 5. Call the repetitive sequence's number a Kaprekar number, ignore zeros.

A319798 Smallest fixed points (>0) of the base-n Kaprekar map.

Original entry on oeis.org

9, 184, 30, 8, 105, 1922263344, 21, 41520, 495, 40, 858, 3488424, 65, 30996, 2040, 96, 2907, 264925230120, 133, 2787400, 5313, 176, 6900, 237360, 225, 9742824, 10962, 280, 13485, 763713003420, 341, 26485184, 19635, 408, 23310, 107599353444576, 481, 60920080, 31980
Offset: 2

Views

Author

Seiichi Manyama, Sep 28 2018

Keywords

Comments

Conjecture: If n = 3*k - 1 (>2), a(n) = A000567(k). For example, a(29) = 10 * (3*10 - 2) = 280.

Crossrefs

Extensions

a(19) and a(31)-a(40) from Giovanni Resta, Oct 02 2018
Previous Showing 31-39 of 39 results.