Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A063131
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A063131 Odd composite numbers which in base 2 contain their largest proper factor as a substring of digits. +0
2
55, 91, 215, 407, 493, 893, 1189, 1343, 1403, 1643, 1681, 1961, 3151, 3223, 3415, 4063, 4579, 7087, 7597, 7979, 8791, 9167, 10579, 11227, 13303, 13655, 14219, 15487, 16147, 22939, 23479, 24341, 25751, 26101, 27571, 28757, 30461, 30607 (list; graph; listen)
OFFSET

1,1

COMMENT

The Pascal program checks to n=100000 in about a second on a 2GHz desktop, about three times as fast than the Mathematica program.

MATHEMATICA

Do[ If[ !PrimeQ[ n ] && StringPosition[ ToString[ FromDigits[ IntegerDigits[ n, 2 ] ] ], ToString[ FromDigits[ IntegerDigits[ Divisors[ n ] [ [ -2 ] ], 2 ] ] ] ] != {}, Print[ n ] ], {n, 3, 500, 2} ]

PROGRAM

(Pascal) program A063131; var n, nn, lpd:longint; nstr, dstr:string; function prime(n:longint; var d:longint):boolean; var sq, i:longint; begin{PRIME} sq := round(sqrt(n)); for i := 2 to sq do if n mod i=0 then begin d := n div i; prime := false; exit; end; prime := true; end{PRIME}; begin{MAIN} for n := 3 to 100000 do if (n mod 2=1) and (not prime(n, lpd)) then begin nn := n; nstr := ''; repeat if nn mod 2=1 then nstr := '1'+nstr else nstr := '0'+nstr; nn := nn div 2; until nn=0; dstr := ''; repeat if lpd mod 2=1 then dstr := '1'+dstr else dstr := '0'+dstr; lpd := lpd div 2; until lpd=0; if pos(dstr, nstr)>0 then write(n:8); end; end.

CROSSREFS

Cf. A062238, A063127.

Sequence in context: A143205 A111192 A063873 this_sequence A128880 A039596 A115377

Adjacent sequences: A063128 A063129 A063130 this_sequence A063132 A063133 A063134

KEYWORD

base,nonn

AUTHOR

Robert G. Wilson v (rgwv(AT)rgwv.com), Aug 08 2001

EXTENSIONS

Extended and edited by John W. Layman (layman(AT)math.vt.edu), Apr 06 2002

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 4 14:15 EST 2008. Contains 151279 sequences.


AT&T Labs Research