Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A154840
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A154840 Distance to nearest cube different from n. +0
2
1, 1, 1, 2, 3, 3, 2, 1, 7, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 8, 7, 6, 5, 4, 3, 2, 1, 19, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 37, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 (list; graph; listen)
OFFSET

0,4

COMMENT

Equals A074989(n) if this is not zero, else 1+A055400(n-1), the distance to the nearest cube < n.

EXAMPLE

a(8)=7, because the two cubes below and above 8 are 1^3=1 and 3^3=27, and the distance to 1 is smaller, namely 8-1=7.

MAPLE

distNearstDiffCub := proc(n) local iscbr ; iroot(n, 3, 'iscbr') ; if iscbr then 1+A055400(n-1); else A074989(n) ; end if; end proc;

CROSSREFS

Cf. A066635, A163497.

Sequence in context: A107336 A156613 A078041 this_sequence A011154 A048466 A096838

Adjacent sequences: A154837 A154838 A154839 this_sequence A154841 A154842 A154843

KEYWORD

nonn,easy

AUTHOR

R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Nov 01 2009

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 20 16:54 EST 2009. Contains 171081 sequences.


AT&T Labs Research