login
A380254
Number of powerful numbers (in A001694) that do not exceed primorial A002110(n).
3
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,3
COMMENTS
In other words, A001694(a(n)) is the largest powerful number less than or equal to A002110(n).
LINKS
EXAMPLE
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.
MATHEMATICA
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 *)
PROG
(Python)
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
CROSSREFS
KEYWORD
nonn,hard
AUTHOR
Michael De Vlieger, Jan 19 2025
EXTENSIONS
a(18)-a(25) from Chai Wah Wu, Jan 24 2025
STATUS
approved