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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A004772 Numbers that are not congruent to 1 mod 4. 22
0, 2, 3, 4, 6, 7, 8, 10, 11, 12, 14, 15, 16, 18, 19, 20, 22, 23, 24, 26, 27, 28, 30, 31, 32, 34, 35, 36, 38, 39, 40, 42, 43, 44, 46, 47, 48, 50, 51, 52, 54, 55, 56, 58, 59, 60, 62, 63, 64, 66, 67, 68, 70, 71, 72, 74, 75, 76, 78, 79, 80, 82, 83, 84, 86, 87, 88, 90 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Numbers n whose binary expansion does not end in 01.

Equals partial sums of 0 together with 2, 1, 1, 2, 1, 1, ... (repeated, that is A131534 without the first term). - Bruno Berselli, Dec 06 2016

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..1000

Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).

FORMULA

G.f.: x^2*(2 + x + x^2)/((1 + x + x^2)*(x - 1)^2). - R. J. Mathar, Oct 08 2011

a(n) = floor((4*n-2)/3). - Gary Detlefs, Jan 02 2012

a(n) = n + ceiling((n-1)/3) - 1. - Arkadiusz Wesolowski, Sep 18 2012

From Ant King, Oct 19 2012: (Start)

a(n) = 4 + a(n-3).

a(n) = (12*n -9 - 3*cos(2*(n-1)*Pi/3) + sqrt(3)*sin(2*(n-1)*Pi/3))/9. (End)

a(n) = ceiling(4*(n-1)/3). - Jean-Fran├žois Alcover, Mar 07 2014

MAPLE

seq(seq(4*i+j, j=[0, 2, 3]), i=0..100); # Robert Israel, Sep 01 2015

MATHEMATICA

LinearRecurrence[{1, 0, 1, -1}, {0, 2, 3, 4}, 68] (* Ant King, Oct 19 2012 *)

DeleteCases[Range[0, 90], _?(Mod[#, 4]==1&)] (* Harvey P. Dale, Jun 11 2013 *)

CoefficientList[Series[x (2 + x + x^2)/((1 + x + x^2) (x - 1)^2), {x, 0, 100}], x] (* Vincenzo Librandi, Mar 08 2014 *)

PROG

(MAGMA) [n: n in [0..100] | not n  mod 4 eq 1 ]; // Vincenzo Librandi, Mar 09 2014

(MAGMA) [(4*n-2) div 3: n in [1..100]]; // Bruno Berselli, Dec 06 2016

(PARI) a(n) = (4*n-2)\3; \\ Michel Marcus, Sep 03 2015

CROSSREFS

Cf. A016813 (complement).

Sequence in context: A188188 A230319 A319371 * A029597 A188262 A099619

Adjacent sequences:  A004769 A004770 A004771 * A004773 A004774 A004775

KEYWORD

nonn,easy

AUTHOR

N. J. A. Sloane

EXTENSIONS

Corrected by Michael Somos, Jun 08 2000

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 21 10:49 EST 2019. Contains 320372 sequences. (Running on oeis4.)