A365435 Position of A002110(n) in A005117.
1, 2, 5, 19, 129, 1405, 18262, 310347, 5896728, 135624240, 3933101824, 121926157641, 4511267827532, 184961980943493, 7953365180610401, 373808163488684050, 19811832664899731266, 1168898127229083969893, 71302785760974119699474
Offset: 0
Examples
Let b(n) = A002110(n) and c(n) = A005117(n). a(0) = 1 since b(0) = 1, and c(1) = 1. a(1) = 2 since b(1) = 2 = c(2). a(2) = 5 since b(2) = 6 = c(5). a(3) = 19 since b(3) = 30 = c(19), etc.
Programs
-
Mathematica
s = Select[Range[2^20], SquareFreeQ]; Map[FirstPosition[s, #][[1]] &, FoldList[Times, 1, Prime@ Range[7]] ]
-
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
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
Comments