login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A010057 a(n) = 1 if n is a cube, else 0. 79

%I #48 Feb 07 2023 09:43:39

%S 1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,

%T 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,

%U 0,0,0,0,0,0,0,0,0,0,0,0,0

%N a(n) = 1 if n is a cube, else 0.

%C Multiplicative with a(p^e) = 1 if 3 divides e, 0 otherwise. - _Mitch Harris_, Jun 09 2005

%C a(A000578(n)) = 1; a(A007412(n)) = 0. - _Reinhard Zumkeller_, Oct 22 2011

%C a(n) = A000007(sum(A010872(A124010(n,k))): k = 1..A001221(n)) for n > 0. - _Reinhard Zumkeller_, Jun 21 2013

%C If n has 4 divisors, a(n) = bigomega(n) - 2. - _Wesley Ivan Hurt_, Jun 06 2014

%D E. Landau, Elementary Number Theory, translation by Jacob E. Goodman of Elementare Zahlentheorie (Vol. I_1 (1927) of Vorlesungen ueber Zahlentheorie), by Edmund Landau, with added exercises by Paul T. Bateman and E. E. Kohlbecker, Chelsea Publishing Co., New York, 1958, pp. 31-32.

%H Reinhard Zumkeller, <a href="/A010057/b010057.txt">Table of n, a(n) for n = 0..10000</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%F Dirichlet generating function: zeta(3s). - _Franklin T. Adams-Watters_, Sep 11 2005

%F a(n) = f(n,0) with f(x,y) = if x>0 then f(x-3*y*(y+1),y+1) else 0^(-x). - _Reinhard Zumkeller_, Sep 27 2008

%F a(n) = 1 + floor(n^(1/3)) - ceiling(n^(1/3)). - _Wesley Ivan Hurt_, Jun 06 2014

%F a(n) = floor(n^(1/3)) - floor((n-1)^(1/3)). - _Mikael Aaltonen_, Feb 24 2015

%p A010057 := proc(n)

%p if n = 0 then

%p 1;

%p else

%p for pe in ifactors(n)[2] do

%p if modp(op(2,pe),3) <> 0 then

%p return 0 ;

%p end if;

%p end do:

%p end if;

%p 1 ;

%p end proc: # _R. J. Mathar_, Feb 07 2023

%t Table[ Boole[ IntegerQ[n^(1/3)]], {n, 0, 80}] (* _Jean-François Alcover_, Jun 10 2013 *)

%o (Haskell)

%o a010057 0 = 1

%o a010057 n = fromEnum $ all ((== 0) . (`mod` 3)) $ a124010_row n

%o a010057_list = concatMap (\x -> 1 : replicate (a003215 x - 1) 0) [0..]

%o -- _Reinhard Zumkeller_, Jun 21 2013, Oct 22 2011

%o (PARI) a(n) = ispower(n, 3); \\ _Michel Marcus_, Feb 24 2015

%o (Python)

%o from sympy import integer_nthroot

%o def A010057(n): return int(integer_nthroot(n,3)[1]) # _Chai Wah Wu_, Apr 02 2021

%Y Cf. A000578.

%Y Cf. A003215. - _Reinhard Zumkeller_, Sep 27 2008

%K nonn,easy,mult

%O 0,1

%A _N. J. A. Sloane_, Mar 15 1996

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 17:39 EDT 2024. Contains 371797 sequences. (Running on oeis4.)