login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A121262 The characteristic function of the multiples of four. 17
1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0 (list; graph; refs; listen; history; internal format)
OFFSET

0,1

COMMENTS

Periodic 4: repeat [1, 0, 0, 0] (with offset 0).

This sequence can be used to produce a periodic sequence of 4 numbers b,c,d,e: a(n) = b*(1/4)*(2*cos(n*Pi/2)+1+(-1)^n)+c*(1/4)*(2*cos((n+3)*Pi/2)+ 1+(-1)^(n+3))+d*(1/4)*(2*cos((n+2)*Pi/2)+ 1+(-1)^(n+2))+ e*(1/4)* (2*cos((n+1)*Pi/2)+ 1+(-1)^(n+1)).

a(n) is also the number of partitions of n where each part is four (Since the empty partition has no parts, a(0)=1). Hence a(n) is also the number of 2-regular graphs on n vertices such that each component has girth exactly four. - Jason Kimberley, Oct 01 2011

This sequence is the Euler transformation of A185014. - Jason Kimberley, Oct 01 2011

REFERENCES

G. Balzarotti and P. P. Lava, Le sequenze di numeri interi, Hoepli, 2008, p. 82.

LINKS

Index entries for characteristic functions

Index to sequences with linear recurrences with constant coefficients, signature (0,0,0,1).

FORMULA

a(n) = (1/4)*(2*cos(n*Pi/2)+1+(-1)^n).

Additive with a(p^e) = 1 if p = 2 and e > 1, 0 otherwise.

Sequence shifted right by 2 is additive with a(p^e) = 1 if p = 2 and e = 1, 0 otherwise.

a(n) = 1-(C(n+1,n+(-1)^(n+1)) mod 2)

a(n) = 0^(n mod 4). - Reinhard Zumkeller, Sep 30 2008

a(n) = (1/24)*(-5*(n mod 4)+((n+1) mod 4)+((n+2) mod 4)+7*((n+3) mod 4)). - Paolo P. Lava, Feb 06 2009

a(n) = (1/4)*(1+I^n+(-1)^n+(-I)^n), with I=sqrt(-1). - Paolo P. Lava, May 04 2010

a(n) = ((n-1)^k mod 4 - (n-1)^(k-1) mod 4)/2, k>2. - Gary Detlefs, Feb 21 2011

a(n) = floor(1/2*cos(n*Pi/2)+1/2). -Gary Detlefs, May 16 2011

G.f.: 1/(1-x^4). a(n) = (1+(-1)^n)*(1+i^((n-1)*n))/4, where i=sqrt(-1). - Bruno Berselli, Sep 28 2011

a(n) = floor(((n+3) mod 4)/3). [From Gary Detlefs, Dec 29 2011]

EXAMPLE

a(0) = (1/4)*(2*cos(0)+1+1) = (1/4)*(2+2) = 1

a(1) = (1/4)*(2*cos(Pi/2)+1-1) = (1/4)*(0+0) = 0

a(2) = (1/4)*(2*cos(Pi)+1+1) = (1/4)*(-2+2) = 0

a(3) = (1/4)*(2*cos(3*Pi/2)+1-1) = (1/4)*(0+0) = 0

a(n) =!(n%4) [From Jaume Oliver Lafont, Mar 01 2009]

PROG

(Haskell)

a121262 n = a121262_list !! n

a121262_list = cycle [1, 0, 0, 0]  -- Reinhard Zumkeller, Jan 06 2012

CROSSREFS

A011765 is another version of the same sequence.

Characteristic function of multiples of g: A000007 (g=0), A000012 (g=1), A059841 (g=2), A079978 (g=3), this sequence (g=4), A079998 (g=5), A079979 (g=6), A082784 (g=7). - Jason Kimberley, Oct 14 2011

Sequence in context: A015985 A015777 A014017 * A102243 A173859 A202108

Adjacent sequences:  A121259 A121260 A121261 * A121263 A121264 A121265

KEYWORD

nonn,easy,changed

AUTHOR

Paolo P. Lava and Giorgio Balzarotti (paoloplava(AT)gmail.com), Aug 23 2006, Aug 30 2007

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 17:48 EST 2012. Contains 205939 sequences.