A076446 Differences of consecutive powerful numbers (definition 1).
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
Keywords
Examples
The first two powerful numbers are 1 and 4, their difference is 3, so a(1)=3.
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
Programs
-
Haskell
a076446 n = a076446_list !! (n-1) a076446_list = zipWith (-) (tail a001694_list) a001694_list -- Reinhard Zumkeller, Nov 30 2012
-
Mathematica
Differences[Join[{1},Select[Range[2000],Min[FactorInteger[#][[All, 2]]]>1&]]] (* Harvey P. Dale, Aug 27 2017 *)
-
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
Comments