login
The OEIS is supported by the many generous donors 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

%I #58 Mar 26 2021 09:25:13

%S 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,

%T 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,

%U 4,8,16,8,16,26,4,8,13,8,16,26,13,26,40

%N Number of twos in row n of triangle A083093.

%C "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]

%H Reinhard Zumkeller (terms 0..1000) & Antti Karttunen, <a href="/A227428/b227428.txt">Table of n, a(n) for n = 0..19683</a>

%H R. Garfield and H. S. Wilf, <a href="https://dx.doi.org/10.1016/0022-314X(92)90078-4">The distribution of the binomial coefficients modulo p</a>, J. Numb. Theory 41 (1) (1992) 1-5.

%H Marcus Jaiclin, et al. <a href="https://web.archive.org/web/20170823000349/http://pyrrho.wsc.ma.edu/math/faculty/jaiclin/writings/research/pascals_triangle/">Pascal's Triangle, Mod 2,3,5</a>

%H D. L. Wells, <a href="http://dx.doi.org/10.1007/978-94-009-0223-7_42">Residue counts modulo three for the fibonacci triangle</a>, Appl. Fib. Numbers, Proc. 6th Int Conf Fib. Numbers, Pullman, 1994 (1996) 521-536.

%H Avery Wilson, <a href="http://www.appliedprobability.org/data/files/MS%20issues/Vol47_No2.pdf">Pascal's Triangle Modulo 3</a>, Mathematics Spectrum, 47-2 - January 2015, pp. 72-75.

%H S. Wolfram, <a href="http://dx.doi.org/10.2307/2323743">Geometry of binomial coefficients</a>, Am. Math. Monthly 91 (9) (1984) 566-571.

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

%F 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

%F a(n) = A206424(n) * ((3^A081603(n))-1) / ((3^A081603(n))+1). - _Antti Karttunen_, Jul 27 2017

%F a(n) = (1/2)*Sum_{k = 0..n} mod(C(n,k)^2 - C(n,k), 3). - _Peter Bala_, Dec 17 2020

%e 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

%p A227428 := proc(n)

%p local a;

%p a := 0 ;

%p for k from 0 to n do

%p if A083093(n,k) = 2 then

%p a := a+1 ;

%p end if;

%p end do:

%p a ;

%p end proc:

%p seq(A227428(n),n=0..20) ; # _R. J. Mathar_, Jul 26 2017

%t Table[Count[Mod[Binomial[n, Range[0, n]], 3], 2], {n, 0, 99}] (* _Alonso del Arte_, Feb 07 2012 *)

%o (Haskell)

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

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

%o (Python)

%o from sympy import binomial

%o def a(n):

%o return sum(1 for k in range(n + 1) if binomial(n, k) % 3 == 2)

%o print([a(n) for n in range(101)]) # _Indranil Ghosh_, Jul 26 2017

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

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

%K nonn

%O 0,6

%A _Reinhard Zumkeller_, Jul 11 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 05:37 EDT 2024. Contains 371906 sequences. (Running on oeis4.)