OFFSET
0,2
COMMENTS
Primorial A002110(n) is the a(n)-th squarefree number.
EXAMPLE
MATHEMATICA
s = Select[Range[2^20], SquareFreeQ]; Map[FirstPosition[s, #][[1]] &, FoldList[Times, 1, Prime@ Range[7]] ]
PROG
(PARI) A071172(n) = my(s); forsquarefree(d=1, sqrtint(n), s += n\d[1]^2 * moebius(d)); s; \\ Charles R Greathouse IV at A071172
a(n) = my(p = prod(i = 1, n, prime(i))); A071172(p); \\ Amiram Eldar, Nov 19 2023
(Python)
from math import isqrt
from sympy import primorial, mobius
def A365435(n):
if n == 0: return 1
p = primorial(n)
return sum(mobius(k)*(p//k**2) for k in range(1, isqrt(p)+1)) # Chai Wah Wu, Aug 12 2024
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Michael De Vlieger, Nov 19 2023
EXTENSIONS
a(8)-a(16) from Amiram Eldar, Nov 19 2023
a(17) from Chai Wah Wu, Aug 12 2024
a(18) from Chai Wah Wu, Aug 13 2024
STATUS
approved