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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A104055 Number of numbers 0 <= i <= n such that i is a square or a cube (or both). 1
1, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Sixth powers are counted only once (0 and 1 are both squares and cubes, for example, but they are not counted twice).

LINKS

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

FORMULA

a(n) = 1 + floor(n^(1/2)) + floor(n^(1/3)) - floor(n^(1/6)). - N. J. A. Sloane, Mar 16 2005

EXAMPLE

a(9)=5 because we have 0,1,4,8 and 9.

MAPLE

seq(1+floor(evalf(n^(1/2)))+floor(evalf(n^(1/3)))-floor(evalf(n^(1/6))), n=0..94); # Emeric Deutsch

MATHEMATICA

Rest[Accumulate[Table[Which[IntegerQ[Sqrt[n]], 1, IntegerQ[Surd[n, 3]], 1, True, 0], {n, 0, 150}]]] (* Harvey P. Dale, Jun 24 2017 *)

PROG

(PARI) a(n)=sqrtint(n)+sqrtnint(n, 3)-sqrtnint(n, 6) \\ Charles R Greathouse IV, Jun 25 2017

CROSSREFS

Cf. A104058.

Sequence in context: A189575 A216503 A216672 * A216200 A157873 A022870

Adjacent sequences:  A104052 A104053 A104054 * A104056 A104057 A104058

KEYWORD

easy,nonn

AUTHOR

Giovanni Teofilatto, Mar 02 2005

EXTENSIONS

More terms from Emeric Deutsch, Mar 24 2005

Corrected by Harvey P. Dale, Jun 24 2017

Definition revised by N. J. A. Sloane, Jun 25 2017

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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 21 19:59 EDT 2019. Contains 327282 sequences. (Running on oeis4.)