Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A014886
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A014886 n is equal to the number of 2's in all numbers <= n written in base 8. +0
8
679922, 679923, 679924, 679925, 679926, 679927, 679928, 679929, 1048576, 16777216, 17457138, 17457139, 17457140, 17457141, 17457142, 17457143, 17457144, 17457145, 17825792 (list; graph; listen)
OFFSET

1,1

PROGRAM

(Perl) ($s, $t, $u)=(0, '1', 1); while($s <= $u*8){print "$u " if $s == $u; ($p, $o)=

(Perl) (1, 0); $q=($t =~ /^(7*)/ && length $1); $r=length($t)+1; ++$o, $p *= 8 while

(Perl) $o+1 <= $q && $p*$r*8 <= abs($u-$s); $u += $p; s/^(7*)(.)?/(0 x length($1))

(Perl) .($2+1)/e, $s += tr/2/2/*$p + $o*$p/8 for substr $t, $o } print "\n"

CROSSREFS

Cf. A014778.

Sequence in context: A068246 A068248 A119404 this_sequence A010095 A081415 A101698

Adjacent sequences: A014883 A014884 A014885 this_sequence A014887 A014888 A014889

KEYWORD

nonn,base,fini,full

AUTHOR

Olivier Gerard (olivier.gerard(AT)gmail.com)

EXTENSIONS

More terms and Perl program from Hugo van der Sanden (hv(AT)crypt.org)

Comment from Hugo van der Sanden: Program terminates at n = 2.94239143846251e+56, when 2.37843307942386e+57 2's have been seen; since s > 8n and n > 8^8 at this point, it is not possible for n ever again to catch up with the sum (given s(8^n) = n 8^{n-1}).

page 1

Search completed in 0.005 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 November 25 20:09 EST 2009. Contains 167514 sequences.


AT&T Labs Research