%I #22 Oct 13 2021 03:31:55
%S 0,0,1,2,2,3,2,3,3,2,4,2,3,4,4,2,3,2,5,4,5,2,5,1,5,3,4,1,6,2,5,4,3,3,
%T 7,0,5,4,5,3,5,1,6,3,5,3,6,1,7,4,4,1,6,1,8,4,3,1,7,1,7,3,4,2,8,1,7,3,
%U 5,3,7,1,6,4,7,2,10,0,8,3,3,2,9,2,9,3,4,3,6,1,9,3,3,2,9,0,5,5,4,3,8,1,7,3,6
%N Number of ways to write n as sum of a prime and an 3-smooth number.
%C Asymptotically, for n coprime to 6, a(n) ~ C*n on the average, with C=3/(2*log(2)*log(3))~1.969796..., see the link. - M. F. Hasler, Oct 21 2011
%C a(A081310(n)) = 0; a(A081311(n)) > 0; a(A081312(n)) = 1; a(A081313(n)) > 1.
%H Reinhard Zumkeller, <a href="/A081308/b081308.txt">Table of n, a(n) for n = 1..10000</a>
%H Mark Underwood, <a href="http://groups.yahoo.com/group/primenumbers/message/23479">another goldbachian theme</a>, Mar. 16, 2009 and follow-up on Oct. 21, 2011.
%H Mark Underwood and others, <a href="/A081308/a081308.txt">Another goldbachian theme</a>, digest of 64 messages in primenumbers Yahoo group, Mar 16, 2009 - Oct 30, 2011. [Cached copy]
%e a(12)=2: 12=11+1=3+3^2; a(13)=3: 13=11+2=7+2*3=5+2^3.
%t nmax = 1000;
%t S = Select[Range[nmax], Max[FactorInteger[#][[All, 1]]] <= 3&];
%t a[n_] := Count[TakeWhile[S, #<n&], s_ /; PrimeQ[n-s]];
%t Table[a[n], {n, 1, nmax}] (* _Jean-François Alcover_, Oct 13 2021 *)
%o (PARI) A081308(n)=my(L2=log(2));sum(e3=0,log(n+.5)\log(3), sum(e2=0,log(n\3^e3)\L2, isprime(n-(3^e3)<<e2))) \\ _M. F. Hasler_, Oct 21 2011
%o (Haskell)
%o a081308 n = sum $ map (a010051' . (n -)) $ takeWhile (< n) a003586_list
%o -- _Reinhard Zumkeller_, Jul 04 2012
%Y Cf. A081310, A081311, A081309, A000040, A003586.
%Y Cf. A010051.
%K nonn
%O 1,4
%A _Reinhard Zumkeller_, Mar 17 2003