A166986 a(n) = 2*floor((n+2)/log(2)) - 4.
4, 6, 10, 12, 16, 18, 20, 24, 26, 30, 32, 36, 38, 42, 44, 46, 50, 52, 56, 58, 62, 64, 68, 70, 72, 76, 78, 82, 84, 88, 90, 94, 96, 98, 102, 104, 108, 110, 114, 116, 120, 122, 124, 128, 130, 134, 136, 140, 142, 146, 148, 150, 154, 156, 160, 162, 166, 168, 172, 174, 176
Offset: 1
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- R. Israel, Re: Differences between linear recurrence, program(s) and b-file, SeqFan list, Apr 11 2019
Crossrefs
Cf. A022934.
Programs
-
Magma
[2*Floor((n+2)/Log(2)) - 4: n in [1..80]]; // Vincenzo Librandi, Jul 06 2015
-
Maple
seq(2*floor((n+2)/log(2))-4, n=1..100); # Robert Israel, Apr 11 2019
-
Mathematica
Table[2 Floor[(n + 2)/Log[2]] - 4, {n, 1, 70}] (* Vincenzo Librandi, Jul 06 2015 *)
-
PARI
vector( 80, n, 2*floor((n+2)/log(2)) - 4) \\ Michel Marcus, Jul 06 2015
-
PARI
A166986(n)=(n+2)\log(2)*2-4 \\ M. F. Hasler, Apr 11 2019, corrected by Charles R Greathouse IV, Oct 19 2022
Formula
a(n) = 2*floor((n+2)/log(2)) - 4.
a(n) = 2*Sum_{k=2,..,n+1} A022934(k).
Comments