cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A206424 The number of 1's in row n of Pascal's Triangle (mod 3).

This page as a plain text file.
%I A206424 #61 Jul 24 2025 17:03:12
%S A206424 1,2,2,2,4,4,2,4,5,2,4,4,4,8,8,4,8,10,2,4,5,4,8,10,5,10,14,2,4,4,4,8,
%T A206424 8,4,8,10,4,8,8,8,16,16,8,16,20,4,8,10,8,16,20,10,20,28,2,4,5,4,8,10,
%U A206424 5,10,14,4,8,10,8,16,20,10,20,28,5,10,14,10,20,28
%N A206424 The number of 1's in row n of Pascal's Triangle (mod 3).
%C A206424 A006047(n) = a(n) + A227428(n).
%C A206424 a(n) = n + 1 - A062296(n) - A227428(n); number of ones in row n of triangle A083093. - _Reinhard Zumkeller_, Jul 11 2013
%H A206424 Reinhard Zumkeller (terms 0..1000) & Antti Karttunen, <a href="/A206424/b206424.txt">Table of n, a(n) for n = 0..19683</a>
%H A206424 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 A206424 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 A206424 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 A206424 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.
%F A206424 From _Antti Karttunen_, Jul 27 2017: (Start)
%F A206424 a(n) = (3^k + 1)*2^(y-1), where y = A062756(n) and k = A081603(n). [See e.g. Wells or Wilson references.]
%F A206424 a(n) = A006047(n) - A227428(n).
%F A206424 (End)
%F A206424 From _David A. Corneth_ and _Antti Karttunen_, Jul 27 2017: (Start)
%F A206424 Based on the first formula above, we have following identities:
%F A206424 a(3n) = a(n).
%F A206424 a(3n+1) = 2*a(n).
%F A206424 a(9n+4) = 4*a(n).
%F A206424 (End)
%F A206424 a(n) = (1/2)*Sum_{k = 0..n} mod(C(n,k) + C(n,k)^2, 3). - _Peter Bala_, Dec 17 2020
%e A206424 Rows 0-8 of Pascal's Triangle (mod 3) are:
%e A206424   1                   So a(0) = 1
%e A206424   1 1                 So a(1) = 2
%e A206424   1 2 1               So a(2) = 2
%e A206424   1 0 0 1                 .
%e A206424   1 1 0 1 1               .
%e A206424   1 2 1 1 2 1             .
%e A206424   1 0 0 2 0 0 1
%e A206424   1 1 0 2 2 0 1 1
%e A206424   1 2 1 2 1 2 1 2 1
%t A206424 Table[Count[Mod[Binomial[n, Range[0, n]], 3], 1], {n, 0, 99}] (* _Alonso del Arte_, Feb 07 2012 *)
%o A206424 (Haskell)
%o A206424 a206424 = length . filter (== 1) . a083093_row
%o A206424 -- _Reinhard Zumkeller_, Jul 11 2013
%o A206424 (PARI) A206424(n) = sum(k=0,n,1==(binomial(n,k)%3)); \\ (naive way) _Antti Karttunen_, Jul 26 2017
%o A206424 (Scheme) (define (A206424 n) (* (+ (A000244 (A081603 n)) 1) (A000079 (- (A062756 n) 1)))) ;; (fast way) _Antti Karttunen_, Jul 27 2017
%o A206424 (Python)
%o A206424 from sympy.ntheory import digits
%o A206424 def A206424(n):
%o A206424     s = digits(n,3)[1:]
%o A206424     return (3**s.count(2)+1)<<s.count(1)>>1 # _Chai Wah Wu_, Jul 24 2025
%Y A206424 Cf. A083093, A062296, A006047, A062756, A081603, A206427, A227428.
%K A206424 nonn,easy
%O A206424 0,2
%A A206424 _Marcus Jaiclin_, Feb 07 2012