A195904 Base-2 digits are, in order, the first n terms of the periodic sequence with initial period 1,0,0,0,0,0.
1, 2, 4, 8, 16, 32, 65, 130, 260, 520, 1040, 2080, 4161, 8322, 16644, 33288, 66576, 133152, 266305, 532610, 1065220, 2130440, 4260880, 8521760, 17043521, 34087042, 68174084, 136348168, 272696336, 545392672, 1090785345, 2181570690, 4363141380, 8726282760
Offset: 1
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (2,0,0,0,0,1,-2).
Programs
-
Mathematica
U[p_, n_, m_, v_]:=Block[{t}, t=Floor[(1+p-m+n-v)/p]; Sum[Binomial[n - v - p*z, m - 1], {z, 0, t - 1}]]; A[p_, n_, v_]:=Sum[U[p, n, k, v], {k, 1, n}]; (* Here we let p = 6 to produce the above sequence, but this code can produce A000975, A033138, A083593, A117302 for p = 2, 3, 4, 7. *) Table[A[6, n, 1], {n, 1, 20}] (* Ryohei Miyadera, Tomohide Hashiba, Yuta Nakagawa, Hiroshi Matsui, Jun 04 2006 *) Rest[CoefficientList[Series[x/(2*x^7 - x^6 - 2*x + 1), {x, 0, 50}], x]] (* G. C. Greubel, Sep 28 2017 *)
-
PARI
x='x+O('x^50); Vec(x/(2*x^7 - x^6 - 2*x + 1)) \\ G. C. Greubel, Sep 28 2017
Formula
From Colin Barker, Jun 09 2013: (Start)
a(n) = floor(2^(n+5)/63).
G.f.: x /(2*x^7 - x^6 - 2*x +1).
G.f.: x /((x-1)*(x+1)*(2*x-1)*(x^2-x+1)*( x^2+x+1)). (End)
Extensions
More terms from Colin Barker, Jun 09 2013
Comments