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

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A270438 a(n) is the number of entries == 1 mod 4 in row n of Pascal's triangle. 2
1, 2, 2, 2, 2, 4, 2, 4, 2, 4, 4, 4, 2, 4, 4, 8, 2, 4, 4, 4, 4, 8, 4, 8, 2, 4, 4, 8, 4, 8, 8, 16, 2, 4, 4, 4, 4, 8, 4, 8, 4, 8, 8, 8, 4, 8, 8, 16, 2, 4, 4, 8, 4, 8, 8, 16, 4, 8, 8, 16, 8, 16, 16, 32, 2, 4, 4, 4, 4, 8, 4, 8, 4, 8, 8, 8, 4, 8, 8, 16, 4, 8, 8 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

All entries are powers of 2.

LINKS

Robert Israel, Table of n, a(n) for n = 0..10000

Kenneth S. Davis and William A. Webb, Pascal's triangle modulo 4, Fib. Quart., 29 (1991), 79-83.

A. Granville, Zaphod Beeblebrox's Brain and the Fifty-ninth Row of Pascal's Triangle, The American Mathematical Monthly, 99(4) (1992), 318-331.

FORMULA

a(n) = 2^(A000120(n) - min(1, A014081(n))). [Davis & Webb]

EXAMPLE

Row 3 of Pascal's triangle is (1,3,3,1) and has two entries == 1 (mod 4), so a(3) = 2.

MAPLE

f:= proc(n) local L, m;

  L:= convert(n, base, 2);

  m:= convert(L, `+`);

  if has(L[1..-2]+L[2..-1], 2) then 2^(m-1) else 2^m fi

end proc:

map(f, [$0..1000]);

MATHEMATICA

Count[#, 1] & /@ Table[Mod[Binomial[n, k], 4], {n, 0, 120}, {k, 0, n}] (* Michael De Vlieger, Feb 26 2017 *)

PROG

(PARI) a(n) = 2^(hammingweight(n) - min(hammingweight(bitand(n, n>>1)), 1)) \\ Charles R Greathouse IV, Jul 13 2016

CROSSREFS

Cf. A034931, A163000, A000120, A007318, A014081.

Sequence in context: A318472 A186643 A286575 * A318836 A003036 A089818

Adjacent sequences:  A270435 A270436 A270437 * A270439 A270440 A270441

KEYWORD

nonn,easy

AUTHOR

Robert Israel, Jul 12 2016

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 January 21 05:39 EST 2020. Contains 331104 sequences. (Running on oeis4.)