A300068 A sequence based on the period 6 sequence A300067.
0, 0, 0, 1, 2, 2, 3, 3, 3, 4, 5, 5, 6, 6, 6, 7, 8, 8, 9, 9, 9, 10, 11, 11, 12, 12, 12, 13, 14, 14, 15, 15, 15, 16, 17, 17, 18, 18, 18, 19, 20, 20, 21, 21, 21, 22, 23, 23, 24, 24, 24, 25, 26, 26, 27, 27, 27, 28, 29, 29, 30, 30, 30, 31, 32, 32, 33, 33, 33, 34, 35, 35, 36, 36, 36, 37, 38, 38, 39, 39, 39, 40, 41, 41
Offset: 0
Links
- Robert Israel, Table of n, a(n) for n = 0..10000
- Wolfdieter Lang, On a Conformal Mapping of Regular Hexagons and the Spiral of its Centers.
- Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,1,-1).
Programs
-
Maple
ListTools:-PartialSums(map(op, [[0],[0, 0, 1, 1, 0, 1]$30])); # Robert Israel, Mar 25 2018
-
Mathematica
CoefficientList[Series[x^3*(1 + x + x^3)/((1 - x^6) (1 - x)), {x, 0, 102}], x] (* or *) MapIndexed[#1 + 3 Floor[(First[#2] - 1)/6] &, PadRight[{}, 102, {0, 0, 0, 1, 2, 2}]] (* Michael De Vlieger, Feb 25 2018 *)
-
PARI
a300067(n) = my(v=[0, 0, 1, 2, 2]); v[if(n%6==0, 1, n%6)] a(n) = a300067(n) + 3*floor(n/6) \\ Felix Fröhlich, Feb 24 2018
-
PARI
concat([0, 0, 0], Vec(x^3*(1 + x + x^3)/((1 - x^6)*(1 - x)) + O(x^40))) \\ Felix Fröhlich, Feb 24 2018
Formula
a(n) = A300067(n) + 3*floor(n/6), n >= 0.
G.f.: x^3*(1 + x + x^3)/((1 - x^6)*(1 - x)).
a(n+2) = A300290(n) + 3*floor(n/6), n >= 0.
a(n) = (6*n - 5 + cos(n*Pi) + 4*cos((n+1)*Pi/3) - 4*cos(2*(n+1)*Pi/3))/12. - Wesley Ivan Hurt, Oct 04 2018
Comments