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

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A127937 Length of longest string of consecutive zeros in the base-7 expansion of 2^n. 0
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 3, 3, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 0, 1, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,39

COMMENTS

Is a(n) >= 3 for all n >= 8834?

LINKS

Table of n, a(n) for n=0..104.

EXAMPLE

a(42)=2 because the base-7 expansion of 2^42 is 113200616214553321.

PROG

#!/usr/bin/perl -l $|++; use Math::GMP; use strict; my $n = new Math::GMP 1; my $pow = 0; while (1) { my $base7 = basebexpansionofn(7, $n); my $maxconsecutivezeros = 0; while ($base7 =~ /(0+)/g) { if (length($1) > $maxconsecutivezeros) { $maxconsecutivezeros = length($1); } } print "a($pow)=$maxconsecutivezeros"; $n *= 2; $pow++; } sub basebexpansionofn { my ($b, $n) = @_; return '0' if $n == 0; my $lastdigit = $n % $b; my $firstdigits = ($n - $lastdigit)/$b; return ($firstdigits ? basebexpansionofn($b, $firstdigits) : '').$lastdigit; }

CROSSREFS

Sequence in context: A082586 A160094 A043283 * A250209 A280010 A167852

Adjacent sequences:  A127934 A127935 A127936 * A127938 A127939 A127940

KEYWORD

nonn

AUTHOR

Josh Purinton (joshpurinton(AT)gmail.com), Apr 06 2007

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified November 24 00:27 EST 2017. Contains 295164 sequences.