cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Michel Lagneau, Sep 02 2013

Keywords

Comments

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.
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.
A double pair shows a complementary structure, for example: 77*2 = 7*22; 888*11 = 88*111; 8989*10 = 89*1010.
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'.

Examples

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

Crossrefs

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