A109045 a(n) = lcm(n,4).
0, 4, 4, 12, 4, 20, 12, 28, 8, 36, 20, 44, 12, 52, 28, 60, 16, 68, 36, 76, 20, 84, 44, 92, 24, 100, 52, 108, 28, 116, 60, 124, 32, 132, 68, 140, 36, 148, 76, 156, 40, 164, 84, 172, 44, 180, 92, 188, 48, 196, 100, 204, 52, 212, 108, 220, 56, 228, 116, 236, 60
Offset: 0
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
- Index entries for linear recurrences with constant coefficients, signature (0,0,0,2,0,0,0,-1).
- Index entries for sequences related to lcm's.
Programs
-
Haskell
a109045 = lcm 4 -- Reinhard Zumkeller, Nov 25 2013
-
Magma
[Lcm(n,4): n in [0..100]]; // Vincenzo Librandi, Apr 18 2011
-
Mathematica
Table[LCM[n,4],{n,0,80}] (* Harvey P. Dale, May 02 2011 *)
-
PARI
a(n) = lcm(n, 4); \\ Michel Marcus, Mar 07 2018
Formula
a(n) = 4n/gcd(n, 4).
a(n) = A084351(n), n > 1. - R. J. Mathar, Aug 20 2008
From R. J. Mathar, Apr 18 2011: (Start)
G.f.: 4*x*(1+x+3*x^2+x^3+3*x^4+x^5+x^6) / ( (x-1)^2*(1+x)^2*(x^2+1)^2 ).
Sum_{k=1..n} a(k) ~ (11/8) * n^2. - Amiram Eldar, Nov 26 2022