A226587 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.
88, 154, 198, 220, 888, 1554, 1998, 2220, 8888, 9768, 15554, 17094, 19998, 21978, 22220, 24420, 88888, 89890, 97768, 105444, 112918, 120190, 127260, 134128, 140794, 147258, 153520, 155554, 159580, 165438, 171094, 176548, 181800, 186850, 191698, 196344, 199998, 200788, 205030
Offset: 1
Examples
198 is in the sequence because 66*3 = 6*33 = 198.
Programs
-
Maple
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: # warning: there were missing terms, so the above Maple program may be wrong. - N. J. A. Sloane, Sep 17 2017
-
PARI
compl(n) = my(dn = digits(n)); fromdigits(vector(#dn, k, 9 - dn[k])); isok(n) = sumdiv(n, d, if ((d^2
= 2; \\ Michel Marcus, Sep 16 2017
Extensions
Missing terms 88, 888, 8888, 88888 added by Michel Marcus, Sep 16 2017
Comments