OFFSET
0,2
COMMENTS
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.
FORMULA
EXAMPLE
a(9)=5 because there are 5 Jacobsthal numbers <=9 (0,1,1,3 and 5).
MATHEMATICA
Table[1+Floor[Log[2, 3n+1]], {n, 0, 100}] (* Harvey P. Dale, Jul 03 2013 *)
PROG
(PARI) a(n)=logint(3*n+1, 2)+1 \\ Charles R Greathouse IV, Oct 03 2016
(Magma) [Ceiling(Log(3*n+2)/Log(2)): n in [0..30]]; // G. C. Greubel, Jan 08 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Hieronymus Fischer, May 20 2007
STATUS
approved