login
Demlo numbers: concat(L,M,R) where M and L + R are repdigits using the same digit, see comments for details.
0

%I #30 Mar 14 2021 13:50:06

%S 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,

%T 30,31,32,33,34,35,36,40,41,42,43,44,45,50,51,52,53,54,55,60,61,62,63,

%U 66,70,71,72,77,80,81,88,90,99,110,111,121,132,143,154,165,176,187,198

%N Demlo numbers: concat(L,M,R) where M and L + R are repdigits using the same digit, see comments for details.

%C Demlo numbers have been invented and defined by D. R. Kaprekar as numbers of the form L.M.R (concatenated) where L + R = m*A002275(p) and M = m*A002275(k), with 1 <= m <= 9, k = length(M) >= 0, p = length(R) >= length(L) >= p-1, A002275(k) = (10^k-1)/9; zero k or p means that M resp. L and R is/are absent, not zero. In the paper it is shown that any such number can be written as (9L + m)*A002275(k+p).

%C Best known are the "Wonderful Demlo numbers" A002477(n) = A002275(n)^2 = 1...n...1, 1 <= n <= 9. (This expression does not yield a Demlo number for n=10, 19, 28, ...)

%H K. R. Gunjikar and D. R. Kaprekar, <a href="/A249605/a249605.pdf">Theory of Demlo numbers</a>, J. Univ. Bombay, Vol. VIII, Part 3, Nov. 1939, pp. 3-9. [Annotated scanned copy]

%e Any repdigit number (cf. A010785) > 1, any one or two digit number L.R with digit sum m = L + R < 10, and any such number multiplied by a repunit 1...1, L.R*1...1 = L.M.R (where M = digit m repeated length(1...1)-1 times), satisfy the definition.

%e In Kaprekar's paper it is shown that all Demlo numbers (as defined in the comment) are of that form, cf. formula in comments.

%o (PARI) is_A295020(n,d=digits(n),N=#d)={for(r=!n,N,my(p=(1+N-r)\2); r>1 && #Set(d[N-p-r+1..N-p])>1 && return; (!p||((n%10^p>=10^(p-1)||p==1)&&(p==#p=digits(n\10^(p+r)+n%10^p))&&if(r,Set(p)==[d[N-#p]],#Set(p)==1))) && return(1))}

%Y Cf. A002477 (Wonderful Demlo numbers), A249605, A002275 (repunits), A010785 (repdigits), A002113 (palindromes).

%K nonn,base

%O 1,2

%A _M. F. Hasler_, Nov 17 2017