%I #16 Nov 19 2015 01:56:27
%S 1,3,5,9,11,15,21,25,27,33,43,45,55,63,75,81,85,99,105,121,125,129,
%T 135,165,171,189,215,225,231,243,255,275,297,315,341,363,375,387,405,
%U 425,441,473,495,513,525,567,605,625,645,675,683,693,729,765,825,855,891,903,935,945
%N Positive integers n that can be expressed as a product of Jacobsthal numbers (A001045), not necessarily distinct.
%H Robert Israel, <a href="/A261141/b261141.txt">Table of n, a(n) for n = 1..10000</a>
%e 15 is in the sequence because Jacobsthal numbers 3 and 5 multiply to 15.
%p N:= 10000: # to get all terms <= N
%p J:= gfun:-rectoproc({a(n)=a(n-1)+2*a(n-2),a(0)=0,a(1)=1},a(n), remember):
%p P:= {1};
%p for j from 3 to ilog2(N*3+1) do
%p x:= J(j);
%p P:= `union`(seq(select(`<=`,map(`*`,P,x^k),N),k=0..floor(log[x](N))))
%p od:
%p sort(convert(P,list)); # _Robert Israel_, Nov 19 2015
%t max = 11; jacobProds = Table[(2^n - (-1)^n)/3, {n, 2, max]; curr = 2; While[jacobProds[[curr]] < 2^max/3, jacobProds = Union[jacobProds, jacobProds[[curr]] * jacobProds]; curr++]; Select[jacobProds, # < 2^max/3 &] (* _Alonso del Arte_, Nov 18 2015 *)
%Y Cf. A001045.
%K nonn
%O 1,2
%A _Jeffrey Shallit_, Nov 18 2015
|