A267489 a(n) = n^2 - 4*floor(n^2/6).
0, 1, 4, 5, 8, 9, 12, 17, 24, 29, 36, 41, 48, 57, 68, 77, 88, 97, 108, 121, 136, 149, 164, 177, 192, 209, 228, 245, 264, 281, 300, 321, 344, 365, 388, 409, 432, 457, 484, 509, 536, 561, 588, 617, 648, 677, 708, 737, 768, 801, 836, 869, 904
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Kival Ngaokrajang, Illustration of initial terms
- Index entries for linear recurrences with constant coefficients, signature (2,-1,0,0,0,1,-2,1).
Programs
-
Magma
[0] cat [n^2-4*Floor(n^2/6): n in [1..70]]; // Vincenzo Librandi, Jan 16 2016
-
Maple
A267489:=n->n^2-4*floor(n^2/6): seq(A267489(n), n=0..100); # Wesley Ivan Hurt, Apr 11 2017
-
Mathematica
Table[n^2 - 4 Floor[n^2 / 6], {n, 0, 70}] (* Vincenzo Librandi, Jan 16 2016 *)
-
PARI
for (n = 0, 100, a = n^2-4*floor(n^2/6); print1(a, ", "))
-
PARI
concat(0, Vec(x*(1+2*x-2*x^2+2*x^3-2*x^4+2*x^5+x^6)/((1-x)^3*(1+x)*(1-x+x^2)*(1+x+x^2)) + O(x^100))) \\ Colin Barker, Jan 16 2016
-
PARI
a(n)=n^2 - n^2\6*4 \\ Charles R Greathouse IV, Mar 22 2017
Formula
a(n) = n^2 - 4*floor(n^2/6) for n >= 0.
From Colin Barker, Jan 16 2016: (Start)
a(n) = 2*a(n-1) - a(n-2) + a(n-6) - 2*a(n-7) + a(n-8) for n>7.
G.f.: x*(1+2*x-2*x^2+2*x^3-2*x^4+2*x^5+x^6) / ((1-x)^3*(1+x)*(1-x+x^2)*(1+x+x^2)).
(End)
Comments