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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A042963 Congruent to 1 or 2 mod 4. 18
1, 2, 5, 6, 9, 10, 13, 14, 17, 18, 21, 22, 25, 26, 29, 30, 33, 34, 37, 38, 41, 42, 45, 46, 49, 50, 53, 54, 57, 58, 61, 62, 65, 66, 69, 70, 73, 74, 77, 78, 81, 82, 85, 86, 89, 90, 93, 94, 97, 98, 101, 102, 105, 106, 109 (list; graph; refs; listen; history; internal format)
OFFSET

1,2

COMMENTS

A014493(n) = A000217(a(n)); complement of A014601. [Reinhard Zumkeller, Feb 14 2012, Oct 04 2004]

Equals partial sums of A153284: (1, 1, 3, 1, 3, 1, 3,...) [From Gary W. Adamson (qntmpkt(AT)yahoo.com), Jan 03 2009]

Let S(x) = (1, 2, 2, 2,...). Then A042963 = (1/2) * ((S(x)^2 + S(x^2))

= (1/2) * ((1, 4, 8, 12, 16, 20,...) + (1, 0, 2, 0, 2, 0, 2,...))

= (1, 2, 5, 6, 9, 10,...). [From Gary W. Adamson (qntmpkt(AT)yahoo.com), Jan 03 2011]

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..1000

FORMULA

G.f.: (1+x+2*x^2)/((1-x)*(1-x^2)). a(n)=a(n-1)+2+(-1)^n, a(0)=1 - Michael Somos, Jan 12 2000.

a(n)=sum{k=0..n, mod(A001045(k), 4) } - Paul Barry (pbarry(AT)wit.ie), Mar 12 2004

a(n)=A005843(n)+A059841(n) . [From Philippe DELEHAM (kolotoko(AT)wanadoo.fr), Mar 31 2009]

a(n)=4*n-a(n-1)-1 (with a(0)=1).

a(n)=a(n-1)+a(n-2)-a(n-3)[From Ant King, Nov 17 2010].

If we consider the offset as 1, then a(n)=1/2 (4n-3-(-1)^n)[From Ant King, Nov 17 2010].

MATHEMATICA

Select[Range[109], Or[Mod[#, 4] == 1, Mod[#, 4] == 2] &].[From Ant King, Nov 17 2010].

PROG

(PARI) a(n)=1+2*n-n%2

(MAGMA) [ n : n in [1..165] | n mod 4 eq 1 or n mod 4 eq 2 ] [From Vincenzo Librandi, Jan 25 2011]

(Haskell)

a042963 n = a042963_list !! (n-1)

a042963_list = [x | x <- [0..], mod x 4 `elem` [1, 2]]

-- Reinhard Zumkeller, Feb 14 2012

CROSSREFS

A042963(n)=1+A042948(n).

A153284 [From Gary W. Adamson (qntmpkt(AT)yahoo.com), Jan 03 2009]

Cf. A046712 (subsequence).

Union of A016813 and A016825.

Sequence in context: A085183 A133759 A188258 * A166097 A187583 A000277

Adjacent sequences:  A042960 A042961 A042962 * A042964 A042965 A042966

KEYWORD

nonn,changed

AUTHOR

N. J. A. Sloane (njas(AT)research.att.com).

EXTENSIONS

Offset corrected by Reinhard Zumkeller (reinhard.zumkeller(AT)gmail.com), Feb 14 2012

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 15 05:45 EST 2012. Contains 205694 sequences.