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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A227428 Number of twos in row n of triangle A083093. 9
0, 0, 1, 0, 0, 2, 1, 2, 4, 0, 0, 2, 0, 0, 4, 2, 4, 8, 1, 2, 4, 2, 4, 8, 4, 8, 13, 0, 0, 2, 0, 0, 4, 2, 4, 8, 0, 0, 4, 0, 0, 8, 4, 8, 16, 2, 4, 8, 4, 8, 16, 8, 16, 26, 1, 2, 4, 2, 4, 8, 4, 8, 13, 2, 4, 8, 4, 8, 16, 8, 16, 26, 4, 8, 13, 8, 16, 26, 13, 26, 40 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,6

COMMENTS

"The number of entries with value r in the n-th row of Pascal's triangle modulo k is found to be 2^{#_r^k (n)}, where now #_r^k (n) gives the number of occurrences of the digit r in the base-k representation of the integer n." [Wolfram] - R. J. Mathar, Jul 26 2017 [This is not correct: there are entries in the sequence that are not powers of 2. - Antti Karttunen, Jul 26 2017]

LINKS

Reinhard Zumkeller (terms 0..1000) & Antti Karttunen, Table of n, a(n) for n = 0..19683

R. Garfield, H. S. Wilf, The distribution of the binomial coefficients modulo p, J. Numb. Theory 41 (1) (1992) 1-5

Marcus Jaiclin, et al. Pascal's Triangle, Mod 2,3,5

D. L. Wells, Residue counts modulo three for the fibonacci triangle, Appl. Fib. Numbers, Proc. 6th Int Conf Fib. Numbers, Pullman, 1994 (1996) 521-536

A. Wilson, Pascal's Triangle Modulo 3, (2015)

S. Wolfram, Geometry of binomial coefficients, Am. Math. Monthly 91 (9) (1984) 566-571

FORMULA

a(n) = A006047(n) - A206424(n) = n + 1 - A062296(n) - A206424(n).

a(n) = 2^(N_1-1)*(3^N_2-1) where N_1 = A062756(n), N_2 = A081603(n). [Wilson, Theorem 2, Wells] - R. J. Mathar, Jul 26 2017

a(n) = A206424(n) * ((3^A081603(n))-1) / ((3^A081603(n))+1). - Antti Karttunen, Jul 27 2017

EXAMPLE

Example of Wilson's formula: a(26) = 13 = 2^(0-1)*(3^3-1) = 26/2, where A062756(26)=0, A081603(26)=3, 26=(222)_3. - R. J. Mathar, Jul 26 2017

MAPLE

A227428 := proc(n)

    local a;

    a := 0 ;

    for k from 0 to n do

        if A083093(n, k) = 2 then

            a := a+1 ;

        end if;

    end do:

    a ;

end proc:

seq(A227428(n), n=0..20) ; # R. J. Mathar, Jul 26 2017

MATHEMATICA

Table[Count[Mod[Binomial[n, Range[0, n]], 3], 2], {n, 0, 99}] (* Alonso del Arte, Feb 07 2012 *)

PROG

(Haskell)

a227428 = sum . map (flip div 2) . a083093_row

(PARI) A227428(n) = sum(k=0, n, 2==(binomial(n, k)%3)); \\ (Naive implementation, from the description) Antti Karttunen, Jul 26 2017

(Python)

from sympy import binomial

def a(n): return sum([1 for k in xrange(n + 1) if binomial(n, k)%3==2])

print map(a, xrange(101)) # Indranil Ghosh, Jul 26 2017

(Scheme) (define (A227428 n) (* (A000079 (- (A062756 n) 1)) (+ -1 (A000244 (A081603 n))))) ;; After Wilson's direct formula, Antti Karttunen, Jul 26 2017

CROSSREFS

Cf. A006047, A062296, A062756, A083093, A081603, A206424, A206428.

Sequence in context: A118888 A061678 A206425 * A265255 A131022 A137408

Adjacent sequences:  A227425 A227426 A227427 * A227429 A227430 A227431

KEYWORD

nonn

AUTHOR

Reinhard Zumkeller, Jul 11 2013

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 March 24 14:04 EDT 2019. Contains 321448 sequences. (Running on oeis4.)