Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A127937
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A127937 Length of longest string of consecutive zeros in the base-7 expansion of 2^n. +0
1
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; listen)
OFFSET

0,39

COMMENT

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

EXAMPLE

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

PROGRAM

#!/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

Adjacent sequences: A127934 A127935 A127936 this_sequence A127938 A127939 A127940

Sequence in context: A113607 A082586 A043283 this_sequence A083911 A095827 A091887

KEYWORD

nonn

AUTHOR

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

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 October 16 00:31 EDT 2008. Contains 145098 sequences.


AT&T Labs Research