OFFSET
1,2
COMMENTS
0 3 4 7 8 11 12 15 ...: integers congruent to 0 or 3 mod 4.
1 2 5 6 9 10 13 14 ...: integers congruent to 1 or 2 mod 4.
Essentially the same as A067060. - Hugo Pfoertner, Jun 16 2024
REFERENCES
M. Cerasoli, F. Eugeni and M. Protasi, Elementi di Matematica Discreta, Bologna 1988.
Emanuele Munarini and Norma Zagaglia Salvi, Matematica Discreta, UTET, CittaStudiEdizioni, Milano 1997.
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
For n>0, a(n+4k) = a(n) + 4k, with k>=0.
G.f.: x^2*(3 - 2*x + 3*x^2 - 2*x^3 + 2*x^4)/(1 - x - x^4 + x^5). - Philippe Deléham, Dec 02 2016
MATHEMATICA
Join[{0}, LinearRecurrence[{1, 0, 0, 1, -1}, {3, 1, 4, 2, 7}, 70]] (* Vincenzo Librandi, Dec 02 2016 *)
PROG
(Magma) I:=[0, 3, 1, 4, 2, 7]; [n le 6 select I[n] else Self(n-1)+Self(n-4)-Self(n-5): n in [1..70]]; // Vincenzo Librandi, Dec 02 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Giovanni Teofilatto, Mar 18 2006
EXTENSIONS
Entries corrected by R. J. Mathar, Oct 25 2011
STATUS
approved