The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Please make a donation to keep the OEIS running. We are now in our 56th year. In the past year we added 10000 new sequences and reached almost 9000 citations (which often say "discovered thanks to the OEIS"). Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A174571 a(4n)=n, a(4n+1)=4, a(4n+2)=1, a(4n+3)=4. 2
 0, 4, 1, 4, 1, 4, 1, 4, 2, 4, 1, 4, 3, 4, 1, 4, 4, 4, 1, 4, 5, 4, 1, 4, 6, 4, 1, 4, 7, 4, 1, 4, 8, 4, 1, 4, 9, 4, 1, 4, 10, 4, 1, 4, 11, 4, 1, 4, 12, 4, 1, 4, 13, 4, 1, 4, 14, 4, 1, 4, 15, 4, 1, 4, 16, 4, 1, 4, 17, 4, 1, 4, 18, 4, 1, 4, 19, 4, 1, 4, 20, 4, 1, 4 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 LINKS Antti Karttunen, Table of n, a(n) for n = 0..16383 FORMULA a(n) = A010685(n) if 4 does not divide n. a(n) = 2*a(n-4) - a(n-8). G.f.: -x*(-4 - x - 4*x^2 - x^3 + 4*x^4 + x^5 + 4*x^6) / ( (x-1)^2*(1+x)^2*(x^2+1)^2 ). MATHEMATICA Array[Which[OddQ@ Mod[#, 4], 4, Mod[#, 4] == 0, #/4, True, 1] &, 84, 0] (* or *) CoefficientList[Series[-x (-4 - x - 4 x^2 - x^3 + 4 x^4 + x^5 + 4 x^6)/((x - 1)^2*(1 + x)^2*(x^2 + 1)^2), {x, 0, 83}], x] (* Michael De Vlieger, Nov 06 2018 *) PROG (PARI) A174571(n) = if(!(n%4), n/4, if(2==(n%4), 1, 4)); \\ Antti Karttunen, Nov 06 2018 CROSSREFS Sequence in context: A331291 A080905 A010685 * A099301 A244971 A050347 Adjacent sequences:  A174568 A174569 A174570 * A174572 A174573 A174574 KEYWORD nonn,easy AUTHOR Paul Curtz, Nov 29 2010 STATUS approved

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

Last modified December 4 20:51 EST 2020. Contains 338938 sequences. (Running on oeis4.)