%I #36 Oct 23 2022 01:09:47
%S 0,0,0,0,1,0,3,0,3,3,3,0,9,0,4,6,6,0,9,3,9,6,3,0,18,3,6,6,9,3,15,0,9,
%T 12,6,6,19,0,3,9,21,0,18,0,12,12,6,6,21,6,9,12,9,0,24,6,18,6,3,6,33,6,
%U 6,12,15,6,18,0,15,15,15,0,33,6,6,18,13,6,21,3,21,9,9,0,36,12,9,12,18,9,27,6,9,9,6
%N Number of ordered solutions to n = x*y*z + x + y + z in positive integers.
%H Brian Conrey and Neil Shah, <a href="https://arxiv.org/abs/2112.15551">Which numbers are not the sum plus the product of three positive integers?</a>, 2021 preprint. arXiv:2112.15551 [math.NT], 2021-2022.
%F Conrey & Shah prove that a(n) << n^(1.3) * log n * (log log n)^4, and conjecture that a(n) << n^e for any e > 0.
%F Conrey & Shah prove that the average value of a(n) is (log n)^2/2, in the sense that Sum_{k <= n} a(k) ~ n*(log n)^2/2.
%F a(n) = 0 iff n = 0 or n belongs to A350535. - _Rémy Sigrist_, Oct 21 2022
%e 6 = 2*1*1 + 2 + 1 + 1 = 1*2*1 + 1 + 2 + 1 = 1*1*2 + 1 + 1 + 2, so a(6) = 3.
%o (PARI) a(n)=sum(x=1,(n-1)\2, my(s); for(y=1,x, my(m=x*y+1); if(m+x+y>n, break); my(N=n-y-x,z); if(N%m, next); z=N/m; z<=y && s += [1,3,6][#Set([x,y,z])]); s)
%o (Python)
%o from sympy.utilities.iterables import combinations_with_replacement
%o from math import prod
%o def A357062(n): return sum(max(1,3*(len(set(d))-1)) for d in combinations_with_replacement(range(1,n+1),3) if prod(d)+sum(d) == n) # _Chai Wah Wu_, Oct 21 2022
%Y Cf. A350535, A357809.
%K nonn
%O 0,7
%A _Charles R Greathouse IV_, Oct 13 2022
|