login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) is the number of nonnegative integer pairs i,j such that n = 2^i + 3^j.
2

%I #14 Feb 11 2022 07:44:28

%S 0,1,1,1,2,0,1,0,1,1,2,0,1,0,0,0,2,0,1,0,0,0,0,0,1,0,0,1,1,0,1,0,1,0,

%T 2,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,1,0,

%U 0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,1,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0

%N a(n) is the number of nonnegative integer pairs i,j such that n = 2^i + 3^j.

%H Robert Israel, <a href="/A141747/b141747.txt">Table of n, a(n) for n = 1..10000</a>

%F G.f.: ( Sum_{i>=0} x^(2^i) ) * ( Sum_{j>=0} x^(3^j) ). - _Ilya Gutkovskiy_, Feb 10 2022

%e a(5) = 2, using (i,j) = (1,1) and (2,0).

%p f:= proc(n) local j,t,s;

%p t:= 0;

%p for j from 0 to floor(log[3](n)) do

%p s:= n - 3^j;

%p if s = 2^padic:-ordp(s,2) then t:= t+1 fi

%p od;

%p t

%p end proc:

%p map(f, [$1..200]); # _Robert Israel_, Jun 08 2020

%Y Cf. A085634, A141748.

%K nonn

%O 1,5

%A _Clark Kimberling_, Jul 01 2008