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.

Showing 1-9 of 9 results.

A062318 Numbers of the form 3^m - 1 or 2*3^m - 1; i.e., the union of sequences A048473 and A024023.

Original entry on oeis.org

0, 1, 2, 5, 8, 17, 26, 53, 80, 161, 242, 485, 728, 1457, 2186, 4373, 6560, 13121, 19682, 39365, 59048, 118097, 177146, 354293, 531440, 1062881, 1594322, 3188645, 4782968, 9565937, 14348906, 28697813, 43046720, 86093441, 129140162
Offset: 1

Views

Author

Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 05 2001

Keywords

Comments

WARNING: The offset of this sequence has been changed from 0 to 1 without correcting the formulas and programs, many of them correspond to the original indexing a(0)=0, a(1)=1, ... - M. F. Hasler, Oct 06 2014
Numbers n such that no entry in n-th row of Pascal's triangle is divisible by 3, i.e., such that A062296(n) = 0.
The base 3 representation of these numbers is 222...222 or 122...222.
a(n+1) is the smallest number with ternary digit sum = n: A053735(a(n+1)) = n and A053735(m) <> n for m < a(n+1). - Reinhard Zumkeller, Sep 15 2006
A138002(a(n)) = 0. - Reinhard Zumkeller, Feb 26 2008
Also, number of terms in S(n), where S(n) is defined in A114482. - N. J. A. Sloane, Nov 13 2014
a(n+1) is also the Moore lower bound on the order of a (4,g)-cage. - Jason Kimberley, Oct 30 2011

Examples

			The first rows in Pascal's triangle with no multiples of 3 are:
row 0: 1;
row 1: 1, 1;
row 2: 1, 2,  1;
row 5: 1, 5, 10, 10,  5,  1;
row 8: 1, 8, 28, 56, 70, 56, 28, 8, 1;
		

Crossrefs

Cf. A062296, A024023, A048473, A114482. Pairwise sums of A052993.
Moore lower bound on the order of a (k,g) cage: A198300 (square); rows: A000027 (k=2), A027383 (k=3), this sequence (k=4), A061547 (k=5), A198306 (k=6), A198307 (k=7), A198308 (k=8), A198309 (k=9), A198310 (k=10), A094626 (k=11); columns: A020725 (g=3), A005843 (g=4), A002522 (g=5), A051890 (g=6), A188377 (g=7). - Jason Kimberley, Oct 30 2011
Cf. A037233 (actual order of a (4,g)-cage).
Smallest number whose base b sum of digits is n: A000225 (b=2), this sequence (b=3), A180516 (b=4), A181287 (b=5), A181288 (b=6), A181303 (b=7), A165804 (b=8), A140576 (b=9), A051885 (b=10).

Programs

  • Magma
    I:=[0,1,2]; [n le 3 select I[n] else Self(n-1)+3*Self(n-2) -3*Self(n-3): n in [1..40]]; // Vincenzo Librandi, Apr 20 2012
    
  • Maple
    A062318 :=proc(n)
        if n mod 2 = 1 then
            3^((n-1)/2)-1
        else
            2*3^(n/2-1)-1
        fi
    end proc:
    seq(A062318(n), n=1..37); # Emeric Deutsch, Feb 03 2005, offset updated
  • Mathematica
    CoefficientList[Series[x^2*(1+x)/((1-x)*(1-3*x^2)),{x,0,40}],x] (* Vincenzo Librandi, Apr 20 2012 *)
    A062318[n_]:= (1/3)*(Boole[n==0] -3 +3^(n/2)*(2*Mod[n+1,2] +Sqrt[3] *Mod[n, 2]));
    Table[A062318[n], {n, 50}] (* G. C. Greubel, Apr 17 2023 *)
  • PARI
    a(n)=3^(n\2)<M. F. Hasler, Oct 06 2014
    
  • SageMath
    def A062318(n): return (1/3)*(int(n==0) - 3 + 2*((n+1)%2)*3^(n/2) + (n%2)*3^((n+1)/2))
    [A062318(n) for n in range(1,41)] # G. C. Greubel, Apr 17 2023

Formula

a(n) = 2*3^(n/2-1)-1 if n is even; a(n) = 3^(n/2-1/2)-1 if n is odd. - Emeric Deutsch, Feb 03 2005, offset updated.
From Paul Curtz, Feb 21 2008: (Start)
a(n) = a(n-1) + 3*a(n-2) - 3*a(n-3).
Partial sums of A108411. (End)
G.f.: x^2*(1+x)/((1-x)*(1-3*x^2)). - Colin Barker, Apr 02 2012
a(2n+1) = 3*a(2n-1) + 2; a(2n) = ( a(2n-1) + a(2n+1) )/2. See A060647 for case where a(1)= 1. - Richard R. Forberg, Nov 30 2013
a(n) = 2^((1+(-1)^n)/2) * 3^((2*n-3-(-1)^n)/4) - 1. - Luce ETIENNE, Aug 29 2014
a(n) = A052993(n-1) + A052993(n-2). - R. J. Mathar, Sep 10 2021
E.g.f.: (1 - 3*cosh(x) + 2*cosh(sqrt(3)*x) - 3*sinh(x) + sqrt(3)*sinh(sqrt(3)*x))/3. - Stefano Spezia, Apr 06 2022
a(n) = (1/3)*([n=0] - 3 + (1+(-1)^n)*3^(n/2) + ((1-(-1)^n)/2)*3^((n+1)/2)). - G. C. Greubel, Apr 17 2023

Extensions

More terms from Emeric Deutsch, Feb 03 2005
Entry revised by N. J. A. Sloane, Jul 29 2011

A083093 Triangle, read by rows, formed by reading Pascal's triangle (A007318) mod 3.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 2, 1, 1, 0, 0, 2, 0, 0, 1, 1, 1, 0, 2, 2, 0, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, 1, 2, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 1, 1
Offset: 0

Views

Author

Benoit Cloitre, Apr 22 2003

Keywords

Comments

Start with [1], repeatedly apply the map 0 -> [000/000/000], 1 -> [111/120/100], 2 -> [222/210/200]. - Philippe Deléham, Apr 16 2009
{T(n,k)} is a fractal gasket with fractal (Hausdorff) dimension log(A000217(3))/log(3) = log(6)/log(3) = 1.63092... (see Reiter reference). Replacing values greater than 1 with 1 produces a binary gasket with the same dimension (see Bondarenko reference). - Richard L. Ollerton, Dec 14 2021

Examples

			.            Rows 0 .. 3^3:
.    0:                             1
.    1:                            1 1
.    2:                           1 2 1
.    3:                          1 0 0 1
.    4:                         1 1 0 1 1
.    5:                        1 2 1 1 2 1
.    6:                       1 0 0 2 0 0 1
.    7:                      1 1 0 2 2 0 1 1
.    8:                     1 2 1 2 1 2 1 2 1
.    9:                    1 0 0 0 0 0 0 0 0 1
.   10:                   1 1 0 0 0 0 0 0 0 1 1
.   11:                  1 2 1 0 0 0 0 0 0 1 2 1
.   12:                 1 0 0 1 0 0 0 0 0 1 0 0 1
.   13:                1 1 0 1 1 0 0 0 0 1 1 0 1 1
.   14:               1 2 1 1 2 1 0 0 0 1 2 1 1 2 1
.   15:              1 0 0 2 0 0 1 0 0 1 0 0 2 0 0 1
.   16:             1 1 0 2 2 0 1 1 0 1 1 0 2 2 0 1 1
.   17:            1 2 1 2 1 2 1 2 1 1 2 1 2 1 2 1 2 1
.   18:           1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 1
.   19:          1 1 0 0 0 0 0 0 0 2 2 0 0 0 0 0 0 0 1 1
.   20:         1 2 1 0 0 0 0 0 0 2 1 2 0 0 0 0 0 0 1 2 1
.   21:        1 0 0 1 0 0 0 0 0 2 0 0 2 0 0 0 0 0 1 0 0 1
.   22:       1 1 0 1 1 0 0 0 0 2 2 0 2 2 0 0 0 0 1 1 0 1 1
.   23:      1 2 1 1 2 1 0 0 0 2 1 2 2 1 2 0 0 0 1 2 1 1 2 1
.   24:     1 0 0 2 0 0 1 0 0 2 0 0 1 0 0 2 0 0 1 0 0 2 0 0 1
.   25:    1 1 0 2 2 0 1 1 0 2 2 0 1 1 0 2 2 0 1 1 0 2 2 0 1 1
.   26:   1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1
.   27:  1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 .
- _Reinhard Zumkeller_, Jul 11 2013
		

References

  • Boris A. Bondarenko, Generalized Pascal Triangles and Pyramids (in Russian), FAN, Tashkent, 1990, ISBN 5-648-00738-8.
  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.

Crossrefs

Cf. A006996 (central terms), A173019, A206424, A227428.
Sequences based on the triangles formed by reading Pascal's triangle mod m: A047999 (m = 2), (this sequence) (m = 3), A034931 (m = 4), A095140 (m = 5), A095141 (m = 6), A095142 (m = 7), A034930(m = 8), A095143 (m = 9), A008975 (m = 10), A095144 (m = 11), A095145 (m = 12), A275198 (m = 14), A034932 (m = 16).

Programs

  • Haskell
    a083093 n k = a083093_tabl !! n !! k
    a083093_row n = a083093_tabl !! n
    a083093_tabl = iterate
       (\ws -> zipWith (\u v -> mod (u + v) 3) ([0] ++ ws) (ws ++ [0])) [1]
    -- Reinhard Zumkeller, Jul 11 2013
    
  • Magma
    /* As triangle: */ [[Binomial(n,k) mod 3: k in [0..n]]: n in [0.. 15]]; // Vincenzo Librandi, Feb 15 2016
    
  • Maple
    A083093 := proc(n,k)
        modp(binomial(n,k),3) ;
    end proc:
    seq(seq(A083093(n,k),k=0..n),n=0..10) ; # R. J. Mathar, Jul 26 2017
  • Mathematica
    Mod[ Flatten[ Table[ Binomial[n, k], {n, 0, 13}, {k, 0, n}]], 3] (* Robert G. Wilson v, Jan 19 2004 *)
  • Python
    from sympy import binomial
    def T(n, k):
        return binomial(n, k) % 3
    for n in range(21): print([T(n, k) for k in range(n + 1)]) # Indranil Ghosh, Jul 26 2017
    
  • Python
    from math import comb, isqrt
    def A083093(n):
        def f(m,k):
            if m<3 and k<3: return comb(m,k)%3
            c,a = divmod(m,3)
            d,b = divmod(k,3)
            return f(c,d)*f(a,b)%3
        return f(r:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)),n-comb(r+1,2)) # Chai Wah Wu, Apr 30 2025

Formula

T(i, j) = binomial(i, j) mod 3.
T(n+1,k) = (T(n,k) + T(n,k-1)) mod 3. - Reinhard Zumkeller, Jul 11 2013
T(n,k) = Product_{i>=0} binomial(n_i,k_i) mod 3, where n = Sum_{i>=0} n_i*3^i and k = Sum_{i>=0} k_i*3^i, 0<=n_i, k_i <=2 [Allouche et al.]. - R. J. Mathar, Jul 26 2017

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

Original entry on oeis.org

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, 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, 5, 10, 14, 4, 8, 10, 8, 16, 20, 10, 20, 28, 5, 10, 14, 10, 20, 28
Offset: 0

Views

Author

Marcus Jaiclin, Feb 07 2012

Keywords

Comments

A006047(n) = a(n) + A227428(n).
a(n) = n + 1 - A062296(n) - A227428(n); number of ones in row n of triangle A083093. - Reinhard Zumkeller, Jul 11 2013

Examples

			Rows 0-8 of Pascal's Triangle (mod 3) are:
  1                   So a(0) = 1
  1 1                 So a(1) = 2
  1 2 1               So a(2) = 2
  1 0 0 1                 .
  1 1 0 1 1               .
  1 2 1 1 2 1             .
  1 0 0 2 0 0 1
  1 1 0 2 2 0 1 1
  1 2 1 2 1 2 1 2 1
		

Crossrefs

Programs

Formula

From Antti Karttunen, Jul 27 2017: (Start)
a(n) = (3^k + 1)*2^(y-1), where y = A062756(n) and k = A081603(n). [See e.g. Wells or Wilson references.]
a(n) = A006047(n) - A227428(n).
(End)
From David A. Corneth and Antti Karttunen, Jul 27 2017: (Start)
Based on the first formula above, we have following identities:
a(3n) = a(n).
a(3n+1) = 2*a(n).
a(9n+4) = 4*a(n).
(End)
a(n) = (1/2)*Sum_{k = 0..n} mod(C(n,k) + C(n,k)^2, 3). - Peter Bala, Dec 17 2020

A227428 Number of twos in row n of triangle A083093.

Original entry on oeis.org

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
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 11 2013

Keywords

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]

Examples

			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
		

Crossrefs

Programs

  • Haskell
    a227428 = sum . map (flip div 2) . a083093_row
    
  • 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 *)
  • 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 range(n + 1) if binomial(n, k) % 3 == 2)
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jul 26 2017
    
  • Python
    from sympy.ntheory import digits
    def A227428(n):
        s = digits(n,3)[1:]
        return 3**s.count(2)-1<>1 # Chai Wah Wu, Jul 24 2025
    
  • Scheme
    (define (A227428 n) (* (A000079 (- (A062756 n) 1)) (+ -1 (A000244 (A081603 n))))) ;; After Wilson's direct formula, Antti Karttunen, Jul 26 2017

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
a(n) = (1/2)*Sum_{k = 0..n} mod(C(n,k)^2 - C(n,k), 3). - Peter Bala, Dec 17 2020

A249733 Number of (not necessarily distinct) multiples of 9 on row n of Pascal's triangle.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 3, 0, 4, 2, 0, 2, 1, 0, 12, 6, 0, 8, 4, 0, 4, 2, 0, 24, 21, 18, 19, 14, 9, 14, 7, 0, 28, 20, 12, 20, 13, 6, 12, 6, 0, 32, 19, 6, 21, 12, 3, 10, 5, 0, 48, 42, 36, 38, 28, 18, 28, 14, 0, 50, 37, 24, 36, 24, 12, 22, 11, 0, 52, 32, 12, 34, 20, 6, 16, 8, 0
Offset: 0

Views

Author

Antti Karttunen, Nov 04 2014

Keywords

Comments

Number of zeros on row n of A095143 (Pascal's triangle reduced modulo 9).
This should have a formula. See for example A062296, A006047 and A048967.

Examples

			Row 9 of Pascal's triangle is {1, 9, 36, 84, 126, 126, 84, 36, 9, 1}. The terms 9, 36, and 126 are the only multiples of nine, and each of them occurs two times on that row, thus a(9) = 2*3 = 6.
Row 10 of Pascal's triangle is {1, 10, 45, 120, 210, 252, 210, 120, 45, 10, 1}. The terms 45 (= 9*5) and 252 (= 9*28) are the only multiples of nine, and the former occurs twice, while the latter is alone at the center, thus a(10) = 2+1 = 3.
		

Crossrefs

Programs

  • Mathematica
    Total/@Table[If[Mod[Binomial[n,k],9]==0,1,0],{n,0,80},{k,0,n}] (* Harvey P. Dale, Feb 12 2020 *)
  • PARI
    A249733(n) = { my(c=0); for(k=0,n\2,if(!(binomial(n,k)%9),c += (if(k<(n/2),2,1)))); return(c); } \\ Unoptimized.
    for(n=0, 6561, write("b249733.txt", n, " ", A249733(n)));
    
  • Python
    import re
    from gmpy2 import digits
    def A249733(n):
        s = digits(n,3)
        n1 = s.count('1')
        n2 = s.count('2')
        n01 = s.count('10')
        n02 = s.count('20')
        n11 = len(re.findall('(?=11)',s))
        n12 = s.count('21')
        return n+1-(((3*(n01+1)+(n02<<2)+n12<<2)+3*n11)*(3**n2<Chai Wah Wu, Jul 24 2025

Formula

For all n >= 0, the following holds:
a(n) <= A048277(n).
a(n) <= A062296(n).
a(2*A249719(n)) > 0 and a((2*A249719(n))-1) > 0.
a(n) is odd if and only if n is one of the terms of A249720.

A249732 Number of (not necessarily distinct) multiples of 4 on row n of Pascal's triangle.

Original entry on oeis.org

0, 0, 0, 0, 2, 0, 1, 0, 6, 4, 3, 0, 7, 2, 3, 0, 14, 12, 11, 8, 13, 6, 7, 0, 19, 14, 11, 4, 17, 6, 7, 0, 30, 28, 27, 24, 29, 22, 23, 16, 33, 26, 23, 12, 29, 14, 15, 0, 43, 38, 35, 28, 37, 22, 23, 8, 45, 34, 27, 12, 37, 14, 15, 0, 62, 60, 59, 56, 61, 54, 55, 48, 65, 58, 55, 44, 61, 46, 47, 32
Offset: 0

Views

Author

Antti Karttunen, Nov 04 2014

Keywords

Comments

a(n) = Number of zeros on row n of A034931 (Pascal's triangle reduced modulo 4).
This should have a formula (see A048967).

Examples

			Row 9 of Pascal's triangle is: {1,9,36,84,126,126,84,36,9,1}. The terms 36 and 84 are only multiples of four, and both of them occur two times on that row, thus a(9) = 2*2 = 4.
Row 10 of Pascal's triangle is: {1,10,45,120,210,252,210,120,45,10,1}. The terms 120 (= 4*30) and 252 (= 4*63) are only multiples of four, and the former occurs twice, while the latter is alone at the center, thus a(10) = 2+1 = 3.
		

Crossrefs

Programs

  • PARI
    A249732(n) = { my(c=0); for(k=0,n\2,if(!(binomial(n,k)%4),c += (if(k<(n/2),2,1)))); return(c); } \\ Slow...
    for(n=0, 8192, write("b249732.txt", n, " ", A249732(n)));
    
  • Python
    def A249732(n): return n+1-(2+((n>>1)&~n).bit_count()<>1) # Chai Wah Wu, Jul 24 2025

Formula

Other identities:
a(n) <= A048277(n) for all n.
a(n) <= A048967(n) for all n.

A206427 Square array 2^(m-1)*(3^n+1), read by antidiagonals.

Original entry on oeis.org

1, 2, 2, 5, 4, 4, 14, 10, 8, 8, 41, 28, 20, 16, 16, 122, 82, 56, 40, 32, 32, 365, 244, 164, 112, 80, 64, 64, 1094, 730, 488, 328, 224, 160, 128, 128, 3281, 2188, 1460, 976, 656, 448, 320, 256, 256, 9842, 6562, 4376, 2920, 1952, 1312, 896, 640, 512, 512
Offset: 0

Views

Author

Marcus Jaiclin, Feb 07 2012

Keywords

Comments

Rectangular array giving the number of 1's in any row of Pascal's Triangle (mod 3) whose row number has exactly m 1's and n 2's in its ternary expansion (listed by antidiagonals).
a(m,n) is independent of the number of zeros in the ternary expansion of the row number.
a(m,n) gives a non-recursive formula for A206424.

Examples

			Initial 5 X 5 block of entries (upper corner is (m,n)=(0,0), m increases down, n increases across):
1    2    5   14   41
2    4   10   28   82
4    8   20   56  164
8   16   40  112  328
16  32   80  224  656
Pascal's Triangle (mod 3), row numbers in ternary:
1     <=  Row 0, m = 0, n = 0, 2^(-1)(3^0 + 1) = #1's = 1
1 1     <=  Row 1, m = 1, n = 0, 2^0(3^0 + 1) = #1's = 2
1 2 1     <=  Row 2, m = 0, n = 1, 2^(-1)(3^1 + 1) = #1's = 2
1 0 0 1     <=  Row 10, m = 1, n = 0, 2^0(3^0 + 1) = #1's = 2
1 1 0 1 1     <=  Row 11, m = 2, n = 0, 2^1(3^0 + 1) = #1's = 4
1 2 1 1 2 1     <=  Row 12, m = 1, n = 1, 2^0(3^1 + 1) = #1's = 4
1 0 0 2 0 0 1     <=  Row 20, m = 0, n = 1, 2^(-1)(3^1 + 1) = #1's = 2
1 1 0 2 2 0 1 1     <=  Row 21, m = 1, n = 1, 2^0(3^1 + 1) = #1's = 4
1 2 1 2 1 2 1 2 1     <=  Row 22, m = 0, n = 2, 2^(-1)(3^2 + 1) = #1's = 5
1 0 0 0 0 0 0 0 0 1     <=  Row 100, m = 1, n = 0, 2^0(3^0 + 1) = #1's = 2
		

Crossrefs

Formula

a(m, n) = 2^(m - 1)(3^n + 1).

A206428 Rectangular array, a(m,n) = 2^(m-1)*(3^n-1), read by antidiagonals.

Original entry on oeis.org

0, 1, 0, 4, 2, 0, 13, 8, 4, 0, 40, 26, 16, 8, 0, 121, 80, 52, 32, 16, 0, 364, 242, 160, 104, 64, 32, 0, 1093, 728, 484, 320, 208, 128, 64, 0, 3280, 2186, 1456, 968, 640, 416, 256, 128, 0, 9841, 6560, 4372, 2912, 1936, 1280, 832, 512, 256, 0
Offset: 0

Views

Author

Marcus Jaiclin, Feb 07 2012

Keywords

Comments

Number of 2's in any row of Pascal's triangle (mod 3) whose row number has exactly m 1's and n 2's in its ternary expansion.
a(m,n) is independent of the number of zeros in the ternary expansion of the row number.
a(m,n) gives a non-recursive formula for A227428.

Examples

			Initial 5 X 5 block of array (upper left corner is (0,0), row index m, column index n):
0    1    4   13   40
0    2    8   26   80
0    4   16   52  160
0    8   32  104  320
0   16   64  208  640
Pascal's Triangle (mod 3), row numbers in ternary:
1     <= Row 0, m=0, n=0, 2^(-1)(3^0-1) = #2's = 0
1 1     <= Row 1, m=1, n=0, 2^0(3^0-1) = #2's = 0
1 2 1     <= Row 2, m=0, n=1, 2^(-1)(3^1-1) = #2's = 1
1 0 0 1     <= Row 10, m=1, n=0, 2^0(3^0-1) = #2's = 0
1 1 0 1 1     <= Row 11, m=2, n=0, 2^1(3^0-1) = #2's = 0
1 2 1 1 2 1     <= Row 12, m=1, n=1, 2^0(3^1-1) = #2's = 2
1 0 0 2 0 0 1     <= Row 20, m=0, n=1, 2^(-1)(3^1-1) = #2's = 1
1 1 0 2 2 0 1 1     <= Row 21, m=1, n=1, 2^0(3^1-1) = #2's = 2
1 2 1 2 1 2 1 2 1     <= Row 22, m=0, n=2, 2^(-1)(3^2-1) = #2's = 4
1 0 0 0 0 0 0 0 0 1     <= Row 100, m=1, n=0, 2^0(3^0-1) = #2's = 0
		

Crossrefs

A206425 Erroneous version of A227428.

Original entry on oeis.org

0, 0, 1, 0, 0, 2, 1, 2, 4, 0, 0, 2, 0, 0, 4, 2, 4, 8, 1, 2, 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
Offset: 0

Views

Author

Marcus Jaiclin, Feb 07 2012

Keywords

Comments

A006047(n) = A206424(n) + a(n).

Examples

			Example: Rows 0-8 of Pascal's Triangle (mod 3) are:
1                   So a(0) = 0
1 1                 So a(1) = 0
1 2 1               So a(2) = 1
1 0 0 1                 .
1 1 0 1 1               .
1 2 1 1 2 1             .
1 0 0 2 0 0 1
1 1 0 2 2 0 1 1
1 2 1 2 1 2 1 2 1
		

Crossrefs

Programs

  • Mathematica
    Table[Count[Mod[Binomial[n, Range[0, n]], 3], 2], {n, 0, 99}] (* Alonso del Arte, Feb 07 2012 *)
Showing 1-9 of 9 results.