login
Integer parts of sqrt(2)^i * sqrt(3)^j with i,j >= 0, in natural order.
1

%I #4 Sep 14 2014 16:08:10

%S 1,1,1,2,2,2,3,3,4,4,4,5,5,6,6,7,8,8,9,9,10,11,12,12,13,14,15,16,16,

%T 18,19,20,22,22,24,25,27,27,29,31,32,33,36,38,39,41,44,45,46,48,50,54,

%U 55,58,62,64,66,67,72,76,78,81,83,88,90,93,96,101,108

%N Integer parts of sqrt(2)^i * sqrt(3)^j with i,j >= 0, in natural order.

%C Compare to 2^i * 3^j, the 3-smooth numbers, cf. A003586.

%H Reinhard Zumkeller, <a href="/A247366/b247366.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = floor(z*A003586(k)), k>0 and z in {1,sqrt(2),sqrt(3),sqrt(6)}.

%e . n | a(n) || i | j | u^i * v^j with u = sqrt(2), v = sqrt(3)

%e . ----+------++---+---+----------------------------------------

%e . 1 | 1 || 0 | 0 | u^0 * v^0 = 1.0

%e . 2 | 1 || 1 | 0 | u^1 * v^0 = 1 * u = 1.414213...

%e . 3 | 1 || 0 | 1 | u^0 * v^1 = 1 * v = 1.732050...

%e . 4 | 2 || 2 | 0 | u^2 * v^0 = 2 = 2.0

%e . 5 | 2 || 1 | 1 | u^1 * v^1 = 1 * sqrt(6) = 2.449489...

%e . 6 | 2 || 3 | 0 | u^3 * v^0 = 2 * u = 2.828427...

%e . 7 | 3 || 0 | 2 | u^0 * v^2 = 3 = 3.0

%e . 8 | 3 || 2 | 1 | u^2 * v^1 = 2 * v = 3.464101...

%e . 9 | 4 || 4 | 0 | u^4 * v^0 = 2^2 = 4.0

%e . 10 | 4 || 1 | 2 | u^1 * v^2 = 3 * u = 4.242640...

%e . 11 | 4 || 3 | 1 | u^3 * v^1 = 2 * sqrt(6) = 4.898979...

%e . 12 | 5 || 0 | 3 | u^0 * v^3 = 3 * v = 5.196152...

%e . 13 | 5 || 5 | 0 | u^5 * v^0 = 2^2 * u = 5.656854...

%e . 14 | 6 || 2 | 2 | u^2 * v^2 = 2 * 3 = 6.0

%e . 15 | 6 || 4 | 1 | u^4 * v^1 = 2^2 * v = 6.928203...

%e . 16 | 7 || 1 | 3 | u^1 * v^3 = 3 * sqrt(6) = 7.348469...

%e . 17 | 8 || 6 | 0 | u^6 * v^0 = 2^3 = 8.0

%e . 18 | 8 || 3 | 2 | u^3 * v^2 = 2 * 3 * u = 8.485281...

%e . 19 | 9 || 0 | 4 | u^0 * v^4 = 3^2 = 9.0

%e . 20 | 9 || 5 | 1 | u^5 * v^1 = 2^2 * sqrt(6) = 9.797958... .

%o (Haskell)

%o import Data.Set (Set, singleton, insert, deleteFindMin)

%o a247366 n = a247366_list !! (n-1)

%o a247366_list = h $ singleton (1, 0, 0) where

%o h :: Set (Double, Int, Int) -> [Integer]

%o h s = (floor x) : h (insert (f i (j + 1)) $ insert (f (i + 1) j) s')

%o where ((x, i, j), s') = deleteFindMin s

%o f :: Int -> Int -> (Double, Int, Int)

%o f u v = (2 ^^ uh * 3 ^^ vh * g ur vr, u, v) where

%o g 0 0 = 1; g 0 1 = sqrt 3; g 1 0 = sqrt 2; g 1 1 = sqrt 6

%o (uh, ur) = divMod u 2; (vh, vr) = divMod v 2

%Y Cf. A003586, A001951, A022838, A022840.

%K nonn

%O 1,4

%A _Reinhard Zumkeller_, Sep 14 2014