The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A087620 #{0<=k<=n: k*n is divisible by 4}. 2
1, 1, 2, 1, 5, 2, 4, 2, 9, 3, 6, 3, 13, 4, 8, 4, 17, 5, 10, 5, 21, 6, 12, 6, 25, 7, 14, 7, 29, 8, 16, 8, 33, 9, 18, 9, 37, 10, 20, 10, 41, 11, 22, 11, 45, 12, 24, 12, 49, 13, 26, 13, 53, 14, 28, 14, 57, 15, 30, 15, 61, 16, 32, 16, 65, 17, 34, 17, 69, 18, 36, 18, 73, 19, 38, 19, 77, 20 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
With the similar remainder 1, 2 and 3 sequences provides a four-fold partition of A000027.
LINKS
FORMULA
a(n) = Sum_{k=0..n} if (k*n mod 4 = 0, 1, 0).
From Colin Barker, May 03 2015: (Start)
a(n) = (6+4*n+i^n*(-i+n)+(-i)^n*(i+n)+2*(-1)^n*(1+n))/8 where i=sqrt(-1).
a(n) = 2*a(n-4)-a(n-8) for n>7.
G.f.: (3*x^4+x^3+2*x^2+x+1) / ((x-1)^2*(x+1)^2*(x^2+1)^2).
(End)
MATHEMATICA
CoefficientList[Series[(3 x^4 + x^3 + 2 x^2 + x + 1)/((x - 1)^2 (x + 1)^2 (x^2 + 1)^2), {x, 0, 80}], x] (* Vincenzo Librandi, May 03 2015 *)
PROG
(PARI) Vec((3*x^4+x^3+2*x^2+x+1)/((x-1)^2*(x+1)^2*(x^2+1)^2) + O(x^100)) \\ Colin Barker, May 03 2015
(Magma) I:=[1, 1, 2, 1, 5, 2, 4, 2]; [n le 8 select I[n] else 2*Self(n-4)-Self(n-8): n in [1..80]]; // Vincenzo Librandi, May 03 2015
CROSSREFS
Sequence in context: A085045 A093664 A298212 * A253809 A262213 A178913
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Sep 13 2003
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 20 11:25 EDT 2024. Contains 372712 sequences. (Running on oeis4.)