A380254
Number of powerful numbers (in A001694) that do not exceed primorial A002110(n).
Original entry on oeis.org
1, 1, 2, 7, 22, 85, 330, 1433, 6450, 31555, 172023, 964560, 5891154, 37807505, 248226019, 1702890101, 12401685616, 95277158949, 744210074157, 6091922351106, 51332717836692, 438592279944173, 3898316990125822, 35515462315592564, 335052677538616216, 3299888425002527366
Offset: 0
Let P = A002110 and let s = A001694.
a(0) = 1 since P(0) = 1, and the set s(1) = {1} contains k that do not exceed 1.
a(1) = 1 since P(1) = 2, and the set s(1) = {1} contains k <= 2.
a(2) = 2 since P(2) = 6, and the set s(1..2) = {1, 4} contains k <= 6.
a(3) = 7 since P(3) = 30, and the set s(1..7) = {1, 4, 8, 9, 16, 25, 27} contains k <= 30.
a(4) = 22 since P(4) = 210, and the set s(1..19) = {1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 72, 81, 100, 108, 121, 125, 128, 144, 169, 196, 200} contains k <= 210, etc.
-
f[x_] := Sum[If[SquareFreeQ[ii], Floor[Sqrt[x/ii^3]], 0], {ii, x^(1/3)}];
Table[f[#[[k + 1]]], {k, 0, Length[#] - 1}] &[
FoldList[Times, 1, Prime[Range[12] ] ] ] (* function f after Robert G. Wilson v at A118896 *)
-
from math import isqrt
from sympy import primorial, integer_nthroot, mobius
def A380254(n):
def squarefreepi(n): return int(sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1)))
if n == 0: return 1
m = primorial(n)
c, l, j = squarefreepi(integer_nthroot(m, 3)[0]), 0, isqrt(m)
while j>1:
k2 = integer_nthroot(m//j**2,3)[0]+1
w = squarefreepi(k2-1)
c += j*(w-l)
l, j = w, isqrt(m//k2**3)
return c-l # Chai Wah Wu, Jan 24 2025
A062761
Number of powerful numbers between 2^(n-1)+1 and 2^n.
Original entry on oeis.org
1, 0, 1, 1, 2, 3, 3, 7, 8, 12, 17, 25, 36, 50, 74, 105, 152, 213, 306, 437, 620, 882, 1256, 1781, 2531, 3588, 5091, 7221, 10225, 14504, 20542, 29101, 41214, 58369, 82638, 116986, 165610, 234387, 331738, 469429, 664291, 939924, 1329876, 1881500, 2661826, 3765629
Offset: 0
64 < {72,81,100,108,121,125,128} <= 128, i.e., 7 powerful numbers are between 2^6 and 2^7, so a(7)=7.
-
a(n) = my(ka = if (n==0, 1, 2^(n-1)+1)); #select(x->ispowerful(x), [ka..2^n]); \\ Michel Marcus, Aug 25 2019
-
Q(n) = my(s=0); forsquarefree(k=1, sqrtnint(n, 3), s += sqrtint(n\k[1]^3)); s;
a(n) = if(n==0, 1, Q(2^n) - Q(2^(n-1))); \\ Daniel Suteu, Feb 18 2020
-
# uses code from A062762
def A062761(n): return A062762(n)-A062762(n-1) if n else 1 # Chai Wah Wu, Sep 13 2024
A380431
Number of powerful numbers that are not powers of primes (i.e. are in A286708) that do not exceed 2^n.
Original entry on oeis.org
0, 0, 0, 0, 0, 0, 1, 4, 9, 17, 28, 48, 75, 115, 178, 266, 403, 590, 865, 1263, 1830, 2644, 3810, 5466, 7838, 11210, 16011, 22841, 32530, 46315, 65886, 93658, 133060, 188952, 268204, 380564, 539823, 765481, 1085224, 1538194, 2179816, 3088481, 4375308, 6197420, 8777222
Offset: 0
Let s = A286708 = A001694 \ A246547 \ {1}.
a(0..5) = 0 since the smallest number in s is 36.
a(6) = 1 since only s(1) = 36 is smaller than 2^6 = 64.
a(7) = 4 since s(1..4) = {36, 72, 100, 108} are smaller than 2^7 = 128.
a(8) = 9 since s(1..9) = {36, 72, 100, 108, 144, 196, 200, 216, 225} are smaller than 2^8 = 256, etc.
-
Table[-1 + Sum[If[MoebiusMu[j] != 0, Floor[Sqrt[(2^n)/j^3]], 0], {j, 2^(n/3)}] - Sum[PrimePi@ Floor[2^(n/k)], {k, 2, n}], {n, 0, 45} ]
-
from math import isqrt
from sympy import mobius, integer_nthroot, primepi
def A380431(n):
def squarefreepi(n): return int(sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1)))
l, m = 0, 1<1:
k2 = integer_nthroot(m//j**2,3)[0]+1
w = squarefreepi(k2-1)
c += j*(w-l)
l, j = w, isqrt(m//k2**3)
return c-l # Chai Wah Wu, Jan 30 2025
A382790
a(n) is the (2^n)-th powerful number.
Original entry on oeis.org
1, 4, 9, 32, 121, 392, 1352, 5000, 18432, 69192, 265837, 1024144, 3968064, 15523600, 60972500, 240413400, 950612224, 3767130288, 14959246864, 59495990724, 236902199076, 944193944097, 3765996039168, 15029799230264, 60010866324576, 239700225078125, 957712290743329
Offset: 0
-
seq[max_] := Module[{p = Union@ Flatten@ Table[i^2*j^3, {j, 1, max^(1/3)}, {i, 1, Sqrt[max/j^3]}]}, p[[2^Range[0, Floor[Log2[Length[p]]]]]]]; seq[10^12]
Showing 1-4 of 4 results.
Comments