%I #23 Feb 16 2025 08:32:47
%S 3,4,1,7,9,2,5,4,13,15,8,9,19,8,13,4,3,16,25,27,4,16,9,18,13,32,1,35,
%T 19,18,31,8,32,9,43,16,12,17,47,49,23,27,1,53,55,16,41,23,36,61,7,4,
%U 28,24,65,36,27,4,69,71,27,8,21,17,3,72,77,47,32,81,47,36,36,49,87,8
%N Differences of consecutive powerful numbers (definition 1).
%C The term 1 appears infinitely often. Erdős conjectured that two consecutive 1's do not occur. (see Guy).
%D R. K. Guy, Unsolved Problems in Number Theory, B16
%H Reinhard Zumkeller, <a href="/A076446/b076446.txt">Table of n, a(n) for n = 1..10000</a>
%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PowerfulNumber.html">Powerful numbers</a>
%F a(n) = A001694(n+1) - A001694(n).
%e The first two powerful numbers are 1 and 4, their difference is 3, so a(1)=3.
%t Differences[Join[{1},Select[Range[2000],Min[FactorInteger[#][[All, 2]]]>1&]]] (* _Harvey P. Dale_, Aug 27 2017 *)
%o (Haskell)
%o a076446 n = a076446_list !! (n-1)
%o a076446_list = zipWith (-) (tail a001694_list) a001694_list
%o -- _Reinhard Zumkeller_, Nov 30 2012
%o (Python)
%o from math import isqrt
%o from sympy import mobius, integer_nthroot
%o def A076446(n):
%o def squarefreepi(n): return int(sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1)))
%o def bisection(f,kmin=0,kmax=1):
%o while f(kmax) > kmax: kmax <<= 1
%o while kmax-kmin > 1:
%o kmid = kmax+kmin>>1
%o if f(kmid) <= kmid:
%o kmax = kmid
%o else:
%o kmin = kmid
%o return kmax
%o def f(x):
%o c, l = n+x, 0
%o j = isqrt(x)
%o while j>1:
%o k2 = integer_nthroot(x//j**2,3)[0]+1
%o w = squarefreepi(k2-1)
%o c -= j*(w-l)
%o l, j = w, isqrt(x//k2**3)
%o c -= squarefreepi(integer_nthroot(x,3)[0])-l
%o return c
%o return -(a:=bisection(f,n,n))+bisection(lambda x:f(x)+1,a,a) # _Chai Wah Wu_, Sep 10 2024
%Y Cf. A001694, A076444.
%K nonn,changed
%O 1,1
%A _Jud McCranie_, Oct 15 2002