OFFSET
1,3
LINKS
Paolo Leonetti and Carlo Sanna, Practical numbers among the binomial coefficients, arXiv:1905.12023 [math.NT], 2019.
MAPLE
A334082 := proc(n)
local a, k ;
a := 0 ;
for k from 0 to n do
if not isA005153(binomial(n, k)) then # reuses code of A005153
a := a+1 ;
end if;
end do:
a ;
end proc:
seq(A334082(n), n=1..100) ; # R. J. Mathar, Jul 07 2023
MATHEMATICA
PracticalQ[n_] := Module[{f, p, e, prod = 1, ok = True}, If[n < 1 || (n > 1 && OddQ[n]), False, If[n == 1, True, f = FactorInteger[n]; {p, e} = Transpose[f]; Do[If[p[[i]] > 1 + DivisorSigma[1, prod], ok = False; Break[]]; prod = prod*p[[i]]^e[[i]], {i, Length[p]}]; ok]]];
a[n_] := Select[Table[Binomial[n, k], {k, 0, n}], !PracticalQ[#]&] // Length;
PROG
(PARI) a(n) = sum(k=0, n, !is_A005153(binomial(n, k)));
(Python)
from math import comb
from sympy import factorint
def A334082(n):
m = 0
for k in range(1, n):
c = comb(n, k)
l = (~c & c-1).bit_length()
if l>0:
P = (1<<l+1)-1
for p, e in factorint(c>>l).items():
if p > 1+P:
break
P *= (p**(e+1)-1)//(p-1)
else:
continue
m += 1
else:
m += 1
return m # Chai Wah Wu, Jul 05 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Apr 14 2020
STATUS
approved