login
Complement of A056576.
7

%I #42 Oct 09 2024 21:25:45

%S 2,5,8,10,13,16,18,21,24,27,29,32,35,37,40,43,46,48,51,54,56,59,62,65,

%T 67,70,73,75,78,81,83,86,89,92,94,97,100,102,105,108,111,113,116,119,

%U 121,124,127,130,132,135,138,140,143,146,149,151,154,157,159,162,165

%N Complement of A056576.

%C A Beatty sequence.

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

%H <a href="/index/Be#Beatty">Index entries for sequences related to Beatty sequences</a>

%F a(n) = floor(n*log(3)/log(3/2)).

%F a(n) = A054414(n) - 1. - _Ruud H.G. van Tol_, May 10 2024

%p seq(floor(n*log[3/2](3)), n=1..100); # _Robert Israel_, Nov 09 2015

%t Table[Floor[n*Log[3/2, 3]], {n, 61}]

%o (Magma) [Floor(n*Log(3)/Log(3/2)): n in [1..80]]; // _Vincenzo Librandi_, Apr 17 2015

%o (PARI) vector(100, n, floor(n*log(3)/log(3/2))) \\ _Altug Alkan_, Nov 10 2015

%o (Python)

%o from operator import sub

%o from sympy import integer_log

%o def A117630(n):

%o def f(x): return n+sub(*integer_log(1<<x+1,3))

%o m, k = n, f(n)

%o while m != k: m, k = k, f(k)

%o return m # _Chai Wah Wu_, Oct 09 2024

%Y Cf. A054414, A056576.

%Y Cf. A102525 (decimal expansion of log_3(2)).

%Y Cf. A254312 (sequence arises as exponents in array definition).

%K nonn

%O 1,1

%A _Robert G. Wilson v_, Apr 08 2006