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.

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

This page as a plain text file.
%I A130249 #21 May 12 2024 08:55:40
%S A130249 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 A130249 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 A130249 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 A130249 Maximal index k of a Jacobsthal number such that A001045(k)<=n (the 'lower' Jacobsthal inverse).
%C A130249 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 A130249 G. C. Greubel, <a href="/A130249/b130249.txt">Table of n, a(n) for n = 0..10000</a>
%F A130249 a(n) = floor(log_2(3n+1)).
%F A130249 a(n) = A130250(n+1) - 1 = A130253(n) - 1.
%F A130249 G.f.: 1/(1-x)*(Sum_{k>=1} x^A001045(k)).
%F A130249 a(n) = A000523(3*n+1). - _Ruud H.G. van Tol_, May 12 2024
%e A130249 a(12)=5, since A001045(5)=11<=12, but A001045(6)=21>12.
%t A130249 Table[Floor[Log[2, 3*n + 1]], {n, 0, 50}] (* _G. C. Greubel_, Jan 08 2018 *)
%o A130249 (PARI) for(n=0, 30, print1(floor(log(3*n+1)/log(2)), ", ")) \\ _G. C. Greubel_, Jan 08 2018
%o A130249 (PARI) a(n) = logint(3*n+1, 2); \\ _Ruud H.G. van Tol_, May 12 2024
%o A130249 (Magma) [Floor(Log(3*n+1)/Log(2)): n in [0..30]]; // _G. C. Greubel_, Jan 08 2018
%o A130249 (Python)
%o A130249 def A130249(n): return (3*n+1).bit_length()-1 # _Chai Wah Wu_, Jun 08 2022
%Y A130249 For partial sums see A130251.
%Y A130249 Other related sequences A130250, A130253, A105348, A001045, A130233, A130241.
%Y A130249 Cf. A000523, A078008 (runlengths).
%K A130249 nonn
%O A130249 0,2
%A A130249 _Hieronymus Fischer_, May 20 2007