A336178 Numbers k such that there are exactly three powerful numbers between k^2 and (k+1)^2.
31, 36, 67, 93, 132, 140, 145, 161, 166, 189, 192, 220, 223, 265, 280, 290, 296, 311, 316, 322, 364, 384, 407, 468, 537, 576, 592, 602, 623, 639, 644, 656, 659, 661, 670, 690, 722, 769, 771, 793, 828, 883, 888, 890, 896, 950, 961, 981, 984, 987, 992, 995, 1018
Offset: 1
Keywords
Examples
31 is a term since there are exactly three powerful numbers, 968 = 2^3 * 11^2, 972 = 2^2 * 3^5 and 1000 = 2^3 * 5^3 between 31^2 = 961 and (31+1)^2 = 1024.
References
- József Sándor, Dragoslav S. Mitrinovic and Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, chapter VI, p. 226.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
- P. Shiu, On the number of square-full integers between successive squares, Mathematika, Vol. 27, No. 2 (1980), pp. 171-178.
Programs
-
Mathematica
powQ[n_] := (n == 1) || Min @@ FactorInteger[n][[;; , 2]] > 1; Select[Range[1000], Count[Range[#^2 + 1, (# + 1)^2 - 1], _?powQ] == 3 &]
-
Python
from functools import lru_cache from math import isqrt from sympy import mobius, integer_nthroot def A336178(n): def squarefreepi(n): return int(sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1))) def bisection(f,kmin=0,kmax=1): while f(kmax) > kmax: kmax <<= 1 while kmax-kmin > 1: kmid = kmax+kmin>>1 if f(kmid) <= kmid: kmax = kmid else: kmin = kmid return kmax @lru_cache(maxsize=None) def g(x): c, l = 0, 0 j = isqrt(x) while j>1: k2 = integer_nthroot(x//j**2,3)[0]+1 w = squarefreepi(k2-1) c += j*(w-l) l, j = w, isqrt(x//k2**3) c += squarefreepi(integer_nthroot(x,3)[0])-l return c def f(x): c, a = n+x, 1 for k in range(1,x+1): b = g((k+1)**2) if b == a+4: c -= 1 a = b return c return bisection(f,n,n) # Chai Wah Wu, Sep 14 2024
Comments