login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A051382 Numbers n such that base 3 expansion matches (0|1)*(02)?(0|1)* (no more than one "02" allowed in midst of 0's and 1's). 2
1, 2, 3, 4, 6, 7, 9, 10, 11, 12, 13, 18, 19, 21, 22, 27, 28, 29, 30, 31, 33, 34, 36, 37, 38, 39, 40, 54, 55, 57, 58, 63, 64, 66, 67, 81, 82, 83, 84, 85, 87, 88, 90, 91, 92, 93, 94, 99, 100, 102, 103, 108, 109, 110, 111, 112, 114, 115, 117, 118, 119, 120, 121, 162, 163 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

COMMENTS

Representation of 2n in base 3 consists entirely of 0's and 2's, except possibly for a single pair of adjacent 1's among them.

9 divides neither C(2s-1,s) (= A001700[ s ]) nor C(2s,s) (= A000984[ s ]) if and only if s=a(n)

Representation of 2n in base 3 consists entirely of 0's and 2's, except possibly for a pair of adjacent 1's

9 does not divide C(2s-1,s) (= A001700[ s ]) if and only if s=a(n)

LINKS

Eric Weisstein's World of Mathematics, Link to a section of The World of Mathematics.

EXAMPLE

In base 3 the terms look like 1, 2, 10, 11, 20, 21, 100, 101, 102, 110, 111, 200, 201, 210, 211, 1000, 1001, 1002, 1010, 1011, 1020, 1021, 1100, 1101, 1102, 1110, 1111, 2000, 2001, 2010, 2011, 2100, 2101, 2 110, 2111, 10000

PROG

(Perl) sub conv_x_base_n { my($x, $b) = @_; my ($r, $z) = (0, ''); do { $r = $x % $b; $x = ($x - $r)/$b; $z = "$r" . $z; } while(0 != $x); return($z); }

(Perl) for($i=1; $i <= 201; $i++) { if(("0" . conv_x_base_n($i, 3)) =~ /^(0|1)*(02)?(0|1)*$/) { print $i, ", "; } }

CROSSREFS

Cf. A046097, A048645, A037468, A005836.

Sequence in context: A065904 A039108 A020756 * A026514 A039054 A047519

Adjacent sequences:  A051379 A051380 A051381 * A051383 A051384 A051385

KEYWORD

nonn

AUTHOR

David W. Wilson (davidwwilson(AT)comcast.net), Antti Karttunen Oct 24 1999

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 11:51 EST 2012. Contains 205908 sequences.