A272574 a(n) = f(9, f(8, n)), where f(k,m) = floor(m*k/(k-1)).
0, 1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 14, 15, 18, 19, 20, 21, 22, 23, 24, 27, 28, 29, 30, 31, 32, 33, 36, 37, 38, 39, 40, 41, 42, 45, 46, 47, 48, 49, 50, 51, 54, 55, 56, 57, 58, 59, 60, 63, 64, 65, 66, 67, 68, 69, 72, 73, 74, 75, 76, 77, 78, 81, 82, 83, 84, 85, 86, 87, 90
Offset: 0
Links
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,1,-1).
Crossrefs
Programs
-
Magma
k:=9; f:=func
; [f(k,f(k-1,n)): n in [0..70]]; -
Maple
f := (k, m) -> floor(m*k/(k-1)): a := n -> f(9, f(8, n)): seq(a(n), n = 0..70); # Peter Luschny, May 03 2016
-
Mathematica
f[k_, m_] := Floor[m*k/(k-1)]; a[n_] := f[9, f[8, n]]; Table[a[n], {n, 0, 70}] (* Jean-François Alcover, May 09 2016 *) CoefficientList[Series[x (1 + x + x^2 + x^3 + x^4 + x^5 + 3 x^6)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)), {x, 0, 70}], x] (* or *) Table[(63 n - 12 - 12 Mod[n, 7] + 2 Mod[-n - 1, 7])/49, {n, 0, 70}] (* Michael De Vlieger, Dec 25 2016 *) LinearRecurrence[{1,0,0,0,0,0,1,-1},{0,1,2,3,4,5,6,9},90] (* Harvey P. Dale, May 08 2018 *)
-
Sage
f = lambda k, m: floor(m*k/(k-1)) a = lambda n: f(9, f(8, n)) [a(n) for n in range(71)] # Peter Luschny, May 03 2016
Formula
G.f.: x*(1 + x + x^2 + x^3 + x^4 + x^5 + 3*x^6)/((1 - x)^2*(1 + x + x^2 + x^3 + x^4 + x^5 + x^6)).
a(n) = a(n-1) + a(n-7) - a(n-8).
a(n) = (63*n - 12 - 12*(n mod 7) + 2*((-n-1) mod 7))/49. - Wesley Ivan Hurt, Dec 25 2016
Comments