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!)
A160113 Number of cubefree integers not exceeding 2^n. 6
1, 2, 4, 7, 14, 27, 54, 107, 214, 427, 854, 1706, 3410, 6815, 13629, 27259, 54521, 109042, 218080, 436158, 872318, 1744638, 3489278, 6978546, 13957092, 27914186, 55828364, 111656716, 223313428, 446626866, 893253744, 1786507472, 3573014938 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
An alternate definition specifying "less than 2^n" would yield the same sequence except for the first 3 terms: 0,1,3,7,14,27,54,107, etc. (since powers of 2 beyond 8 are not cubefree).
The limit of a(n)/2^n is the inverse of Apery's constant, 1/zeta(3) [see A088453].
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..103 (terms 0..80 from Gerard P. Michon)
FORMULA
a(n) = Sum_{i=1..2^(n/3)} A008683(i)*floor(2^n/i^3).
EXAMPLE
a(0)=1 because there is just one cubefree integer (1) not exceeding 2^0 = 1.
a(3)=7 because 1,2,3,4,5,6,7 are cubefree but 8 is not.
MATHEMATICA
a[n_] := Sum[ MoebiusMu[i]*Floor[2^n/i^3], {i, 1, 2^(n/3)}]; Table[a[n], {n, 0, 32}] (* Jean-François Alcover, Dec 20 2011, from formula *)
Module[{nn=20, mu}, mu=Table[If[Max[FactorInteger[n][[All, 2]]]<3, 1, 0], {n, 2^nn}]; Table[Total[Take[mu, 2^k]], {k, 0, nn}]] (* The program generates the first 20 terms of the sequence. To get more, increase the value (constant) for nn, but the program may take a long time to run. *) (* Harvey P. Dale, Aug 13 2021 *)
PROG
(Haskell)
a160113 = a060431 . (2 ^) -- Reinhard Zumkeller, Jul 27 2015
(Python)
from sympy import mobius, integer_nthroot
def A160113(n): return sum(mobius(k)*((1<<n)//k**3) for k in range(1, integer_nthroot(1<<n, 3)[0]+1)) # Chai Wah Wu, Aug 06 2024
(Python)
from bitarray import bitarray
from sympy import integer_nthroot
def A160113(n): # faster program
q = 1<<n
m = integer_nthroot(q, 3)[0]+1
a, b = bitarray(m), bitarray(m)
a[1], p, i, c = 1, 2, 4, q-sum(q//k**3 for k in range(2, m))
while i < m:
j = 2
while i < m:
if j==p:
c -= (b[i]^1 if a[i] else -1)*(q//i**3)
j, a[i], b[i] = 0, 1, 1
else:
t1, t2 = a[i], b[i]
if (t1&t2)^1:
a[i], b[i] = (t1^1)&t2, ((t1^1)&t2)^1
c += (t2 if t1 else 2)*(q//i**3) if (t1^1)&t2 else (t2-2 if t1 else 0)*(q//i**3)
i += p
j += 1
p += 1
while a[p]|b[p]:
p += 1
i = p<<1
return c # Chai Wah Wu, Aug 06 2024
CROSSREFS
Cf. A004709 (cubefree numbers), A160112 (decimal counterpart for cubefree integers), A143658 (binary counterpart for squarefree integers), A071172 & A053462 (decimal counterpart for squarefree integers).
Cf. A060431.
Sequence in context: A107949 A155099 A136322 * A171231 A094057 A119267
KEYWORD
easy,nice,nonn,changed
AUTHOR
Gerard P. Michon, May 02 2009
STATUS
approved

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 August 22 04:22 EDT 2024. Contains 375356 sequences. (Running on oeis4.)