This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A381391 #17 Feb 23 2025 12:17:10 %S A381391 0,29,367,3866,39098,391838,3920154,39205902,392069187,3920718974, %T A381391 39207261564,392072817656,3920728751139,39207289143932, %U A381391 392072896183208,3920728975677128,39207289797472001,392072898095046811,3920728981307675534,39207289814141997459,392072898144605471040 %N A381391 Number of k <= 10^n that are neither squarefree nor prime powers (i.e., k is in A126706). %F A381391 a(n) = 10^n - Sum_{k = 2..log_2(10^n)} pi(floor(10^(n/k))) - Sum_{k = 1..floor(sqrt(10^n))} mu(k)*floor(10^n/k^2), where pi = A000720 and mu = A008683. %F A381391 a(n) = A011557(n) - A071172(n) - A267574(n). %e A381391 Let S = A126706. %e A381391 a(1) = 0 since the smallest term in S is 12. %e A381391 a(2) = 29 since S(1..29) = {12, 18, 20, 24, ..., 99, 100}, etc. %t A381391 Table[10^n - Sum[PrimePi@ Floor[10^(n/k)], {k, 2, Floor[Log2[10^n]]}] - Sum[MoebiusMu[k]*Floor[10^n/(k^2)], {k, Floor[Sqrt[10^n]]}], {n, 10}] %o A381391 (Python) %o A381391 from math import isqrt %o A381391 from sympy import primepi, integer_nthroot, mobius %o A381391 def A381391(n): %o A381391 m = 10**n %o A381391 return int(-sum(primepi(integer_nthroot(m,k)[0]) for k in range(2,m.bit_length()))-sum(mobius(k)*(m//k**2) for k in range(2, isqrt(m)+1))) # _Chai Wah Wu_, Feb 23 2025 %Y A381391 Cf. A011557, A071172, A126706, A267574, A372403, A229099, A380403. %K A381391 nonn %O A381391 1,2 %A A381391 _Michael De Vlieger_, Feb 22 2025