A053816 Another version of the Kaprekar numbers (A006886): n such that n = q+r and n^2 = q*10^m+r, for some m >= 1, q >= 0 and 0 <= r < 10^m, with n != 10^a, a >= 1 and n an m-digit number.
1, 9, 45, 55, 99, 297, 703, 999, 2223, 2728, 4950, 5050, 7272, 7777, 9999, 17344, 22222, 77778, 82656, 95121, 99999, 142857, 148149, 181819, 187110, 208495, 318682, 329967, 351352, 356643, 390313, 461539, 466830, 499500, 500500, 533170, 538461, 609687, 643357
Offset: 1
Examples
703 is Kaprekar because 703 = 494 + 209, 703^2 = 494209.
References
- D. R. Kaprekar, On Kaprekar numbers, J. Rec. Math., 13 (1980-1981), 81-82.
- David Wells, The Penguin Dictionary of Curious and Interesting Numbers, Penguin Books, NY, 1986, p. 151.
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..50000
- Shyam Sunder Gupta, On Some Marvellous Numbers of Kaprekar, Exploring the Beauty of Fascinating Numbers, Springer (2025) Ch. 9, 275-315.
- Douglas E. Iannucci, The Kaprekar numbers, J. Integer Sequences, Vol. 3, 2000, #1.2.
- Robert Munafo, Kaprekar Sequences.
- Eric Weisstein's World of Mathematics, Kaprekar Number.
- Chai Wah Wu, Semilog plot of A053816(n), n = 1..1003371 (all terms with m <= 60).
- Chai Wah Wu, Plot of A053816(n), n = 1..1003371 (all terms with m <= 60).
- Index entries for Colombian or self numbers and related sequences
Crossrefs
Programs
-
Haskell
a053816 n = a053816_list !! (n-1) a053816_list = 1 : filter f [4..] where f x = length us - length vs <= 1 && read (reverse us) + read (reverse vs) == x where (us, vs) = splitAt (length $ show x) (reverse $ show (x^2)) -- Reinhard Zumkeller, Oct 04 2014
-
Mathematica
kapQ[n_]:=Module[{idn2=IntegerDigits[n^2],len},len=Length[idn2];FromDigits[ Take[idn2,Floor[len/2]]]+FromDigits[Take[idn2, -Ceiling[len/2]]]==n]; Select[Range[540000],kapQ] (* Harvey P. Dale, Aug 22 2011 *) ktQ[n_] := ((x = n^2) - (z = FromDigits[Take[IntegerDigits[x], y = -IntegerLength[n]]]))*10^y + z == n; Select[Range[540000], ktQ] (* Jayanta Basu, Aug 04 2013 *) Select[Range[540000],Total[FromDigits/@TakeDrop[IntegerDigits[#^2], Floor[ IntegerLength[ #^2]/2]]] ==#&] (* The program uses the TakeDrop function from Mathematica version 10 *) (* Harvey P. Dale, Jun 03 2016 *) maxDigits=6; Flatten[Table[lst={};sub=Subsets@FactorInteger[v=10^d-1]; Do[a=Times@@Power@@@s; n=ChineseRemainder[{0,1},{a,v/a},1]; If[10^(d-1)<=n<10^d,AppendTo[lst,n]],{s,sub}];Union@lst,{d,maxDigits}]] (* Giorgos Kalogeropoulos, Mar 27 2025 *)
-
PARI
isok(n) = n == vecsum(divrem(n^2, 10^(1+logint(n, 10)))); \\ Ruud H.G. van Tol, Jun 02 2024
-
Python
def is_A053816(n): return n==sum(divmod(n**2,10**len(str(n)))) and n print(upto_1e5:=list(filter(is_A053816, range(10**5)))) # M. F. Hasler, Mar 28 2025
Extensions
More terms from Michel ten Voorde, Apr 11 2001
Comments