OFFSET
0,3
COMMENTS
The sequence is multiplicative.
REFERENCES
J. M. Borwein, D. H. Bailey and R. Girgensohn, Experimentation in Mathematics, A K Peters, Ltd., Natick, MA, 2004. x+357 pp. See p. 195.
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,2,0,0,0,-1)
FORMULA
a(n) = n * A166486(n) = n * signum(n mod 4).
G.f.: (x + 2*x^2 + 3*x^3 + 3*x^5 + 2*x^6 + x^7)/(1 - 2*x^4 + x^8). - Robert Israel, Jan 13 2020
Dirichlet g.f.: (1-4^(1-s))*zeta(s-1). - R. J. Mathar, May 17 2023
MAPLE
seq(op([0, i, i+1, i+2]), i=1..100, 4); # Robert Israel, Jan 13 2020
# alternative
A190621 := proc(n)
if modp(n, 4) <> 0 then
n;
else
0;
end if;
end proc:
seq(A190621(n), n=0..40) ; # R. J. Mathar, May 17 2023
MATHEMATICA
Table[If[Divisible[n, 4], 0, n], {n, 0, 90}] (* Harvey P. Dale, Jan 04 2019 *)
PROG
(Magma) [n mod 4 ne 0 select n else 0:n in [0..86]]; // Marius A. Burtea, Jan 13 2020
CROSSREFS
KEYWORD
nonn,mult,easy
AUTHOR
N. J. A. Sloane, May 14 2011
STATUS
approved