OFFSET
1,1
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Wikipedia, Sphenic number
FORMULA
EXAMPLE
a(1) = 72 because the divisors of A007304(1) = 30 are {1,2,3,5,6,10,15,30}, the sum of which is 72.
MATHEMATICA
DivisorSigma[1, #]&/@With[{upto=500}, Sort[Select[Times@@@Subsets[ Prime[ Range[ Ceiling[ upto/6]]], {3}], #<=upto&]]] (* Harvey P. Dale, May 30 2020 *)
PROG
(PARI)
L=List(); for(n=1, 1000, if(bigomega(n)==3 && omega(n)==3, listput(L, sum(k=1, 8, divisors(n)[k])))); Vec(L)
(Python)
from math import isqrt
from sympy import primepi, primerange, integer_nthroot, divisor_sigma
def A271329(n):
def f(x): return int(n+x-sum(primepi(x//(k*m))-b for a, k in enumerate(primerange(integer_nthroot(x, 3)[0]+1), 1) for b, m in enumerate(primerange(k+1, isqrt(x//k)+1), a+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
return divisor_sigma(bisection(f)) # Chai Wah Wu, Aug 30 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Colin Barker, Apr 04 2016
STATUS
approved