login
Numbers n having at least two complementary pairs of divisors (q, p) and (p', q') such that n = p*q = p'*q' where the decimal digits of p' are the 9's complement of the decimal digits of p and the decimal digits of q' are the 9's complement of the decimal digits of q.
0

%I #55 Sep 17 2017 22:24:25

%S 88,154,198,220,888,1554,1998,2220,8888,9768,15554,17094,19998,21978,

%T 22220,24420,88888,89890,97768,105444,112918,120190,127260,134128,

%U 140794,147258,153520,155554,159580,165438,171094,176548,181800,186850,191698,196344,199998,200788,205030

%N Numbers n having at least two complementary pairs of divisors (q, p) and (p', q') such that n = p*q = p'*q' where the decimal digits of p' are the 9's complement of the decimal digits of p and the decimal digits of q' are the 9's complement of the decimal digits of q.

%C The 9's complement of a number m equals 10^d - 1 - m where d is the number of digits in m. If u is a digit in m replace it with 9 - u.

%C A pair of integer (p, q) is complementary for multiplication when the product p*q is the same as the product p'*q' where the decimal digits of p' are the 9's complement of the decimal digits of p and the decimal digits of q' are the 9's complement of the decimal digits of q.

%C A double pair shows a complementary structure, for example: 77*2 = 7*22; 888*11 = 88*111; 8989*10 = 89*1010.

%C The sequence is infinite: let two integers x and y with the decimal representation x = ppp...p (i times) and y = (9-p)(9-p)...(9-p) (j times). The product x*y = p*(9-p)*R_i*R_j where R_k is a string of k 1's (or a Repunit number of the form (10^k - 1)/9). But x’ = (9-p)*R_i and y' = p*R_j => x*y => x'*y'.

%e 198 is in the sequence because 66*3 = 6*33 = 198.

%p with(numtheory):for n from 1 to 210000 do:x:=divisors(n):n1:=nops(x):ii:=0:for a from 2 to n1-1 while(ii=0) do:m:=n/x[a]:m1:=convert(m, base, 10):nn1:=nops(m1): m2:=convert(x[a], base, 10):nn2:=nops(m2): s1:=sum('(9-m1[i])*10^(i-1)', 'i'=1..nn1): s2:=sum('(9-m2[i])*10^(i-1)', 'i'=1..nn2):for b from a+1 to n1-1 while(ii=0) do:q:=n/x[b]:if s1=q and s2=x[b] and m<>x[b] then ii:=1:printf(`%d, `, n):else fi:od:od:od:

%p # warning: there were missing terms, so the above Maple program may be wrong. - _N. J. A. Sloane_, Sep 17 2017

%o (PARI) compl(n) = my(dn = digits(n)); fromdigits(vector(#dn, k, 9 - dn[k]));

%o isok(n) = sumdiv(n, d, if ((d^2<n), compl(d)*compl(n/d) == n)) >= 2; \\ _Michel Marcus_, Sep 16 2017

%Y Cf. A002275, A061601.

%K nonn,base,less

%O 1,1

%A _Michel Lagneau_, Sep 02 2013

%E Missing terms 88, 888, 8888, 88888 added by _Michel Marcus_, Sep 16 2017