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.

A215160 Odd numbers n with the property that the binary representation of n is the same as the decimal representation of the smallest multiple of n that can be represented with only 1's and 0's.

This page as a plain text file.
%I A215160 #21 Mar 08 2014 01:53:13
%S A215160 1,21,2231,28261,611123,1200341,3427673,2202416417,11102657671
%N A215160 Odd numbers n with the property that the binary representation of n is the same as the decimal representation of the smallest multiple of n that can be represented with only 1's and 0's.
%C A215160 All numbers that are a power of 2 times a member of the sequence share the property that the binary representation is the same as the decimal representation of the first 1's and 0's multiple.
%C A215160 Of the values listed, only 1200341 and 3427673 are primes. - _Jonathan Vos Post_, Aug 09 2012
%F A215160 {odd n: n*A079339(n) = A007088(n)} . - _R. J. Mathar_, Aug 09 2012
%e A215160 For example 21*481=10101 (the first multiple of 21 containing only 1's and 0's) and the binary representation of 21 is 10101.
%p A215160 rebase := proc(n,bin,bout)
%p A215160     local a,c,i;
%p A215160     a := 0 ;
%p A215160     c := convert(n,base,bin) ;
%p A215160     add( op(i,c)*bout^(i-1),i=1..nops(c)) ;
%p A215160 end proc:
%p A215160 isA079339 := proc(n,c)
%p A215160     local c2,b;
%p A215160     if modp(c,n) > 0 then
%p A215160         return false;
%p A215160     end if;
%p A215160     c2 := rebase(c,10,2) ;
%p A215160     for b from 1 to c2-1 do
%p A215160         if modp( rebase(b,2,10),n) = 0 then
%p A215160             return false;
%p A215160         end if;
%p A215160     end do:
%p A215160     return true ;
%p A215160 end proc:
%p A215160 for n from 1 by 2 do
%p A215160     sb := rebase(n,2,10) ;
%p A215160     if isA079339(n,sb) then
%p A215160         print(n);
%p A215160     end if;
%p A215160 end do: # _R. J. Mathar_, Aug 09 2012
%Y A215160 Cf. A079339.
%K A215160 nonn,base,more
%O A215160 1,2
%A A215160 _Patrick McKinley_, Aug 05 2012