A211704 a(n) = n + [n/2] + [n/3] + [n/4] + [n/5], where []=floor.
1, 3, 5, 8, 10, 13, 14, 17, 19, 22, 23, 27, 28, 30, 33, 36, 37, 40, 41, 45, 47, 49, 50, 54, 56, 58, 60, 63, 64, 68, 69, 72, 74, 76, 78, 82, 83, 85, 87, 91, 92, 95, 96, 99, 102, 104, 105, 109, 110, 113, 115, 118, 119, 122, 124, 127, 129, 131, 132, 137, 138
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (-1,-1,0,1,2,2,1,0,-1,-1,-1).
Crossrefs
Cf. A211701.
Programs
-
Magma
[n+Floor(n/2)+Floor(n/3)+Floor(n/4)+Floor(n/5): n in [1..70]]; // Vincenzo Librandi, Jun 23 2015
-
Mathematica
f[n_, m_] := Sum[Floor[n/k], {k, 1, m}] t = Table[f[n, 5], {n, 1, 90}] (* A211704 *) FindLinearRecurrence[t] Table[Total[Table[Floor[n/i],{i,5}]],{n,70}] (* or *) LinearRecurrence[ {-1,-1,0,1,2,2,1,0,-1,-1,-1},{1,3,5,8,10,13,14,17,19,22,23},70] (* Harvey P. Dale, Jan 19 2015 *)
Formula
a(n) = -a(n-1)-a(n-2)+a(n-4)+2*a(n-5)+2*a(n-6)+a(n-7)-a(n-9)-a(n-10)-a(n-11) for n>=12.
Comments