login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A130249 Maximal index k of a Jacobsthal number such that A001045(k)<=n (the 'lower' Jacobsthal inverse). 13

%I #16 Jun 09 2022 02:24:54

%S 0,2,2,3,3,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,

%T 6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,

%U 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8

%N Maximal index k of a Jacobsthal number such that A001045(k)<=n (the 'lower' Jacobsthal inverse).

%C Inverse of the Jacobsthal sequence (A001045), nearly, since a(A001045(n))=n except for n=1 (see A130250 for another version). a(n)+1 is equal to the partial sum of the Jacobsthal indicator sequence (see A105348).

%H G. C. Greubel, <a href="/A130249/b130249.txt">Table of n, a(n) for n = 0..10000</a>

%F a(n) = floor(log_2(3n+1)).

%F a(n) = A130250(n+1) - 1 = A130253(n) - 1.

%F G.f.: 1/(1-x)*(Sum_{k>=1} x^A001045(k)).

%e a(12)=5, since A001045(5)=11<=12, but A001045(6)=21>12.

%t Table[Floor[Log[2, 3*n + 1]], {n, 0, 50}] (* _G. C. Greubel_, Jan 08 2018 *)

%o (PARI) for(n=0, 30, print1(floor(log(3*n+1)/log(2)), ", ")) \\ _G. C. Greubel_, Jan 08 2018

%o (Magma) [Floor(Log(3*n+1)/Log(2)): n in [0..30]]; // _G. C. Greubel_, Jan 08 2018

%o (Python)

%o def A130249(n): return (3*n+1).bit_length()-1 # _Chai Wah Wu_, Jun 08 2022

%Y For partial sums see A130251.

%Y Other related sequences A130250, A130253, A105348. A001045, A130233, A130241.

%K nonn

%O 0,2

%A _Hieronymus Fischer_, May 20 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 13:19 EDT 2024. Contains 371254 sequences. (Running on oeis4.)