A145875 Repdigit Kaprekar numbers.
1, 9, 55, 99, 999, 7777, 9999, 22222, 99999, 999999, 4444444, 9999999, 88888888, 99999999, 999999999, 1111111111, 9999999999, 55555555555, 99999999999, 999999999999, 7777777777777, 9999999999999, 22222222222222, 99999999999999, 999999999999999, 4444444444444444, 9999999999999999, 88888888888888888, 99999999999999999
Offset: 1
Links
- Daniel Mondot, Table of n, a(n) for n = 1..1000
- Shyam Sunder Gupta, On Some Marvellous Numbers of Kaprekar, Exploring the Beauty of Fascinating Numbers, Springer (2025) Ch. 9, 275-315. See Sections 9.2.2 and 9.2.3.
- Robert P. Munafo, Kaprekar sequences at MROB
Crossrefs
Programs
-
PARI
is_A145875(n)=is_A006886(n) && #Set(digits(n))==1 \\ M. F. Hasler, Mar 31 2025 apply( {A145875(n)=10^(n--*3\5+1)\9*if(bittest(5, n%5),[1,5,7,2,4,8][n%15*2\/5+1],9)}, [1..29]) \\ M. F. Hasler, Mar 28 2025
-
PARI
isk(k) = my(d=digits(k^2), nb=#d); if (nb%2, d=concat(0, d); nb++); fromdigits(Vec(d, nb/2)) + fromdigits(vector(nb/2, i, d[nb/2+i])) == k; lista(nn) = my(list=List()); for (i=1, nn, for (d=1, 9, my(x = fromdigits(vector(i, k, d))); if (isk(x), listput(list, x)););); Vec(list); \\ Michel Marcus, Mar 29 2025
Formula
a(n) = d(n) * R(floor(n*3/5+2/5)), where R(n) = (10^n-1)/9 = A002275(n) and d = (1, 9, 5, 9, 9; 7, 9, 2, 9, 9; 4, 9, 8, 9, 9) repeating, where ";" is used just to emphasize the 3 similar subgroups of length 5, with 2nd, 4th and 5th element equal to 9. - M. F. Hasler, Mar 28 2025
Length (= number of digits) of the n-th term is floor((n+2)*3/5). - M. F. Hasler, Mar 31 2025
Extensions
More terms from Gupta (2025) added by N. J. A. Sloane, Mar 26 2025
Comments