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.

A130250 Minimal index k of a Jacobsthal number such that A001045(k) >= n (the 'upper' Jacobsthal inverse).

This page as a plain text file.
%I A130250 #18 Apr 17 2025 23:20:44
%S A130250 0,1,3,3,4,4,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,
%T A130250 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,8,8,8,8,8,8,8,8,
%U A130250 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9
%N A130250 Minimal index k of a Jacobsthal number such that A001045(k) >= n (the 'upper' Jacobsthal inverse).
%C A130250 Inverse of the Jacobsthal sequence (A001045), nearly, since a(A001045(n))=n except for n=2 (see A130249 for another version). a(n+1) is equal to the partial sum of the Jacobsthal indicator sequence (see A105348).
%H A130250 G. C. Greubel, <a href="/A130250/b130250.txt">Table of n, a(n) for n = 0..5000</a>
%F A130250 a(n) = ceiling(log_2(3n-1)) = 1 + floor(log_2(3n-2)) for n >= 1.
%F A130250 a(n) = A130249(n-1) + 1 = A130253(n-1) for n >= 1.
%F A130250 G.f.: (x/(1-x))*Sum_{k>=0} x^A001045(k).
%e A130250 a(10)=5 because A001045(5) = 11 >= 10, but A001045(4) = 5 < 10.
%t A130250 Table[If[n==0, 0, Ceiling[Log[2, 3*n-1]]], {n,0,120}] (* _G. C. Greubel_, Mar 18 2023 *)
%o A130250 (Magma) [0] cat [Ceiling(Log(2,3*n-1)): n in [1..120]]; // _G. C. Greubel_, Mar 18 2023
%o A130250 (SageMath)
%o A130250 def A130250(n): return 0 if (n==0) else ceil(log(3*n-1, 2))
%o A130250 [A130250(n) for n in range(121)] # _G. C. Greubel_, Mar 18 2023
%o A130250 (Python)
%o A130250 def A130250(n): return (3*n-2).bit_length() if n else 0 # _Chai Wah Wu_, Apr 17 2025
%Y A130250 For partial sums see A130252.
%Y A130250 Cf. A001045, A105348, A130234, A130242, A130249, A130253.
%K A130250 nonn
%O A130250 0,3
%A A130250 _Hieronymus Fischer_, May 20 2007