login
A076446
Differences of consecutive powerful numbers (definition 1).
5
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, 19, 18, 31, 8, 32, 9, 43, 16, 12, 17, 47, 49, 23, 27, 1, 53, 55, 16, 41, 23, 36, 61, 7, 4, 28, 24, 65, 36, 27, 4, 69, 71, 27, 8, 21, 17, 3, 72, 77, 47, 32, 81, 47, 36, 36, 49, 87, 8
OFFSET
1,1
COMMENTS
The term 1 appears infinitely often. Erdos conjectured that two consecutive 1's do not occur. (see Guy).
REFERENCES
R. K. Guy, Unsolved Problems in Number Theory, B16
LINKS
Eric Weisstein's World of Mathematics, Powerful numbers
FORMULA
a(n) = A001694(n+1) - A001694(n).
EXAMPLE
The first two powerful numbers are 1 and 4, there difference is 3, so a(1)=3.
MATHEMATICA
Differences[Join[{1}, Select[Range[2000], Min[FactorInteger[#][[All, 2]]]>1&]]] (* _Harvey P. Dale_, Aug 27 2017 *)
PROG
(Haskell)
a076446 n = a076446_list !! (n-1)
a076446_list = zipWith (-) (tail a001694_list) a001694_list
-- _Reinhard Zumkeller_, Nov 30 2012
(Python)
from math import isqrt
from sympy import mobius, integer_nthroot
def A076446(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
def f(x):
c, l = n+x, 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
return -(a:=bisection(f, n, n))+bisection(lambda x:f(x)+1, a, a) # _Chai Wah Wu_, Sep 10 2024
CROSSREFS
Sequence in context: A202500 A016607 A262216 * A053289 A076412 A053707
KEYWORD
nonn
AUTHOR
_Jud McCranie_, Oct 15 2002
STATUS
approved