cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A090184 Number of partitions of the n-th 3-smooth number into parts 2 and 3.

This page as a plain text file.
%I A090184 #26 Oct 22 2024 17:53:07
%S A090184 0,1,1,1,2,2,2,3,3,4,5,5,6,7,9,10,11,13,14,17,19,22,25,28,33,37,41,43,
%T A090184 49,55,65,73,82,86,97,109,122,129,145,163,171,193,217,244,257,289,325,
%U A090184 342,365,385,433,487,513,577,649,683,730,769,865,973,1025,1094,1153
%N A090184 Number of partitions of the n-th 3-smooth number into parts 2 and 3.
%H A090184 Michael De Vlieger, <a href="/A090184/b090184.txt">Table of n, a(n) for n = 1..10000</a>
%F A090184 a(2^i * 3^j) = floor(2^(i-1) * 3^(j-1) + 1), i*j>0.
%F A090184 a(n) = A103221(A003586(n)).
%e A090184 n=11: A003586(11) = 2^3 * 3 = 24: 3+3+3+3+3+3+3+3 = 3+3+3+3+3+3+2+2+2 = 3+3+3+3+2+2+2+2+2+2 = 3+3+2+2+2+2+2+2+2+2+2 = 2+2+2+2+2+2+2+2+2+2+2+2: a(11)=5.
%t A090184 smooth3Q[n_] := n/2^IntegerExponent[n, 2]/3^IntegerExponent[n, 3] == 1;
%t A090184 Length[IntegerPartitions[#, All, {2, 3}]]& /@ Select[Range[10000], smooth3Q] (* _Jean-François Alcover_, Oct 13 2021 *)
%t A090184 With[{nn = 6^5}, Map[Floor[#/2] - Floor[#/3] &, Union@ Flatten@ Table[2^a * 3^b, {a, 0, Log2[#]}, {b, 0, Log[3, #/(2^a)]}] &[nn] + 2]] (* _Michael De Vlieger_, Oct 13 2021 *)
%o A090184 (Python)
%o A090184 from sympy import integer_log
%o A090184 def A090184(n):
%o A090184     def bisection(f,kmin=0,kmax=1):
%o A090184         while f(kmax) > kmax: kmax <<= 1
%o A090184         while kmax-kmin > 1:
%o A090184             kmid = kmax+kmin>>1
%o A090184             if f(kmid) <= kmid:
%o A090184                 kmax = kmid
%o A090184             else:
%o A090184                 kmin = kmid
%o A090184         return kmax
%o A090184     def f(x): return n+x-sum((x//3**i).bit_length() for i in range(integer_log(x,3)[0]+1))
%o A090184     return ((m:=bisection(f,n,n)+2)>>1)-m//3 # _Chai Wah Wu_, Oct 22 2024
%Y A090184 Cf. A022328, A022329.
%Y A090184 Cf. A003586, A008615.
%Y A090184 Cf. A103221, A117222, A117220, A117221.
%K A090184 nonn
%O A090184 1,5
%A A090184 _Reinhard Zumkeller_, Jan 21 2004
%E A090184 Offset changed to 1 by _Alois P. Heinz_, Oct 15 2021