OFFSET
0,3
COMMENTS
LINKS
Chai Wah Wu, Table of n, a(n) for n = 0..26
EXAMPLE
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
