A130253 Number of Jacobsthal numbers (A001045) <=n.
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, 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, 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
Offset: 0
Examples
a(9)=5 because there are 5 Jacobsthal numbers <=9 (0,1,1,3 and 5).
Links
- G. C. Greubel, Table of n, a(n) for n = 0..10000
- Dorin Andrica, Ovidiu Bagdasar, and George Cătălin Tųrcąs, On some new results for the generalised Lucas sequences, An. Şt. Univ. Ovidius Constanţa (Romania, 2021) Vol. 29, No. 1, 17-36.
Crossrefs
Programs
-
Magma
[Ceiling(Log(3*n+2)/Log(2)): n in [0..30]]; // G. C. Greubel, Jan 08 2018
-
Mathematica
Table[1+Floor[Log[2,3n+1]],{n,0,100}] (* Harvey P. Dale, Jul 03 2013 *)
-
PARI
a(n)=logint(3*n+1,2)+1 \\ Charles R Greathouse IV, Oct 03 2016
-
Python
def A130253(n): return (3*n+1).bit_length() # Chai Wah Wu, Apr 17 2025
Comments