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
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Eric Weisstein's World of Mathematics, Powerful numbers
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
KEYWORD
nonn
AUTHOR
Jud McCranie, Oct 15 2002
STATUS
approved