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.

Previous Showing 21-30 of 36 results. Next

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

A090174 Triangle read by rows, related to Pascal's triangle read mod 2.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jan 19 2004

Keywords

Examples

			1; 1,1; 0,1,0; 1,1,1,1; 1,1,1,1,1; ...
		

Crossrefs

Formula

a(n, k) = A091533(n, k) mod 2.

Extensions

Edited and extended by Christian G. Bower, Jan 19 2004

A083095 a(n) = A083094(n)/4.

Original entry on oeis.org

0, 2, 5, 6, 14, 15, 18, 20, 41, 42, 45, 47, 54, 56, 59, 60, 122, 123, 126, 128, 135, 137, 140, 141, 162, 164, 167, 168, 176, 177, 180, 182, 365, 366, 369, 371, 378, 380, 383, 384, 405, 407, 410, 411, 419, 420, 423, 425, 486, 488, 491, 492, 500
Offset: 1

Views

Author

Benoit Cloitre, Apr 22 2003

Keywords

Comments

Is this the same as A083097? - Andrew S. Plewe, May 30 2007

Crossrefs

Programs

  • Mathematica
    Select[Range[0,2000], OddQ[Sum[Mod[Binomial[#,j],3],{j,0,#}]]&]/4 (* Paul F. Marrero Romero, Dec 28 2024 *)
  • Python
    def A083095(n): return int(bin(((m:=n-1).bit_count()&1)+(m<<1))[2:],3)>>1 # Chai Wah Wu, Jun 26 2025

Formula

Apparently (2*a(n)) mod 3 = A010060(n-1), the Thue-Morse sequence.
Numbers k such that C(4*k, 2*k) == 1 (mod 3). - Benoit Cloitre, Jul 30 2003
Numbers k such that the base-3 digits of 2k contains no 2's, i.e. a(n) = A074939(n-1)/2. - Chai Wah Wu, Jun 26 2025

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 29 2003

A090171 Triangle read by rows, related to Pascal's triangle read mod 2, starting with 0, 1, 0.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Jan 19 2004

Keywords

Examples

			Triangle begins:
0
1 0
1 1 0
0 1 0 0
1 1 1 1 0
...
		

Crossrefs

Cf. A090172, A090173, A090174, A091533, A091562, A205575 (same recurrence).
a(n, k) = A090174(n-1, k), k

Formula

T(n, k) = T(n-1, k) + T(n-1, k-1) + T(n-2, k) + T(n-2, k-1) + T(n-2, k-2) for n >= 2, k >= 0, with initial conditions specified by first two rows.

Extensions

Edited and extended by Christian G. Bower, Jan 20 2004

A090172 Triangle read by rows, related to Pascal's triangle read mod 2.

Original entry on oeis.org

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

Author

N. J. A. Sloane, Jan 19 2004

Keywords

Examples

			1; 0,0; 1,1,1; 1,0,0,1; 0,1,1,1,0; ...
		

Crossrefs

Formula

a(n, k) = A091562(n, k) mod 2.

Extensions

Edited and extended by Christian G. Bower, Jan 20 2004

A083094 Numbers k such that Sum_{j=0..k} (binomial(k,j) mod 3) is odd.

Original entry on oeis.org

0, 8, 20, 24, 56, 60, 72, 80, 164, 168, 180, 188, 216, 224, 236, 240, 488, 492, 504, 512, 540, 548, 560, 564, 648, 656, 668, 672, 704, 708, 720, 728, 1460, 1464, 1476, 1484, 1512, 1520, 1532, 1536, 1620, 1628, 1640, 1644, 1676, 1680, 1692, 1700, 1944, 1952
Offset: 1

Author

Benoit Cloitre, Apr 22 2003

Keywords

Comments

Apparently a(n)/2 (mod 3) = A010060(n), the Thue-Morse sequence.

Crossrefs

Cf. A010060, A051638, A074939, A083093, A083095 (gives a b-file of 16384 terms).

Programs

  • Mathematica
    Select[Range[0, 2000],OddQ[Sum[Mod[Binomial[#, j], 3], {j, 0, #}]] &] (* Paul F. Marrero Romero, Dec 28 2024 *)
  • PARI
    isok(n) = sum(k=0, n, binomial(n,k) % 3) % 2; \\ Michel Marcus, Dec 05 2013
    
  • Python
    def A083094(n): return int(bin(((m:=n-1).bit_count()&1)+(m<<1))[2:],3)<<1 # Chai Wah Wu, Jun 26 2025

Formula

a(n) = 4*A083095(n). - Hugo Pfoertner, Jan 12 2025
Numbers that are multiples of 4 and such that base-3 digits contain no 1's, or equivalently, numbers such that base-3 digits contains an even number of 2's and no 1's, i.e. a(n) = 2*A074939(n-1). This characterization can be derived from the formula in A051638. - Chai Wah Wu, Jun 26 2025

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Apr 29 2003

A090173 Triangle read by rows, related to Pascal's triangle read mod 2, starting with 0, 0, 1.

Original entry on oeis.org

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

Author

N. J. A. Sloane, Jan 19 2004

Keywords

Examples

			Triangle begins
  0;
  0,1;
  0,1,1;
  0,0,1,0;
  0,1,1,1,1;
  ...
		

Crossrefs

Cf. A090171, A090172, A090174, A091533, A091562, A205575 (same recurrence).
a(n, k) = A090174(n-1, k-1), k>0, 0 otherwise.

Formula

T(n, k) = T(n-1, k) + T(n-1, k-1) + T(n-2, k) + T(n-2, k-1) + T(n-2, k-2) for n >= 2, k >= 0, with initial conditions specified by first two rows.

Extensions

Edited and extended by Christian G. Bower, Jan 20 2004

A006940 Rows of Pascal's triangle mod 3.

Original entry on oeis.org

1, 11, 121, 1001, 11011, 121121, 1002001, 11022011, 121212121, 1000000001, 11000000011, 121000000121, 1001000001001, 11011000011011, 121121000121121, 1002001001002001, 11022011011022011, 121212121121212121, 1000000002000000001, 11000000022000000011, 121000000212000000121
Offset: 0

Keywords

Comments

Subsequence of A118594. - Chai Wah Wu, Jul 30 2025

References

  • C. Pickover, Mazes for the Mind, St. Martin's Press, NY, 1992, p. 353.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    a[n_] := FromDigits[Table[Mod[Binomial[n, k], 3], {k, 0, n}]]; Array[a, 25, 0] (* Amiram Eldar, Nov 22 2018 *)
  • PARI
    a(n)=fromdigits(apply(x->x%3, binomial(n))); \\ Michel Marcus, Nov 21 2018
    
  • Python
    from math import prod, comb
    from gmpy2 import digits
    def A006940(n):
        if n==0: return 1
        c, l = '', len(s:=digits(n,3))
        for k in range(m:=n+2>>1):
            t = digits(k,3).zfill(l)
            c += str(prod(comb(int(s[i]),int(t[i]))%3 for i in range(l))%3)
        return int(c+c[m-2+(n&1)::-1]) # Chai Wah Wu, Jul 30 2025

Extensions

More terms from Michel Marcus, Nov 21 2018

A243759 Triangle T(m,k): exponent of the highest power of 3 dividing the binomial coefficient binomial(m,k).

Original entry on oeis.org

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

Author

Tom Edgar, Jun 10 2014

Keywords

Comments

T(m,k) is the number of 'carries' that occur when adding k and n-k in base 3 using the traditional addition algorithm.

Examples

			The triangle begins:
0,
0, 0,
0, 0, 0,
0, 1, 1, 0;
0, 0, 1, 0, 0;
0, 0, 0, 0, 0, 0;
0, 1, 1, 0, 1, 1, 0;
0, 0, 1, 0, 0, 1, 0, 0;
0, 0, 0, 0, 0, 0, 0, 0, 0;
0, 2, 2, 1, 2, 2, 1, 2, 2, 0;
		

Crossrefs

Programs

  • Maple
    A243759:= (m,k) -> padic[ordp](binomial(m,k),3);
    for m from 0 to 50 do
      seq(A243759(m,k),k=0..m)
    od;   # Robert Israel, Jun 15 2014
  • Mathematica
    T[m_, k_] := IntegerExponent[Binomial[m, k], 3];
    Table[T[m, k], {m, 0, 12}, {k, 0, m}] // Flatten (* Jean-François Alcover, Jun 05 2022 *)
  • Sage
    m=50
    T=[0]+[3^valuation(i, 3) for i in [1..m]]
    Table=[[prod(T[1:i+1])/(prod(T[1:j+1])*prod(T[1:i-j+1])) for j in [0..i]] for i in [0..m-1]]
    [log(Integer(x),base=3) for sublist in Table for x in sublist]
    
  • Scheme
    (define (A243759 n) (A007949 (A007318 n))) ;; Antti Karttunen, Oct 28 2014

Formula

T(m,k) = log_3(A242849(m,k)).
From Antti Karttunen, Oct 28 2014: (Start)
a(n) = A007949(A007318(n)).
a(n) * A083093(n) = 0 and a(n) + A083093(n) > 0 for all n.
(End)

Extensions

Name clarified by Antti Karttunen, Oct 28 2014

A153459 Decimal expansion of log_3 (6).

Original entry on oeis.org

1, 6, 3, 0, 9, 2, 9, 7, 5, 3, 5, 7, 1, 4, 5, 7, 4, 3, 7, 0, 9, 9, 5, 2, 7, 1, 1, 4, 3, 4, 2, 7, 6, 0, 8, 5, 4, 2, 9, 9, 5, 8, 5, 6, 4, 0, 1, 3, 1, 8, 8, 0, 4, 2, 7, 8, 7, 0, 6, 5, 4, 9, 4, 3, 8, 3, 8, 6, 8, 5, 2, 0, 1, 3, 8, 0, 9, 1, 4, 8, 0, 5, 0, 6, 1, 1, 7, 2, 6, 8, 8, 5, 4, 9, 4, 5, 1, 7, 4
Offset: 1

Author

N. J. A. Sloane, Oct 30 2009

Keywords

Comments

Equals the Hausdorff dimension of Pascal's triangle modulo 3 (A083093). In general, the dimension of Pascal's triangle modulo a prime p is log(p*(p+1)/2) / log(p) (see Reiter link, theorem 2 page 117). - Bernard Schott, Dec 01 2022

Examples

			1.6309297535714574370995271143427608542995856401318804278706...
		

Crossrefs

Programs

Formula

Equals A016629 / A002391 = 1 + A102525. - Bernard Schott, Dec 01 2022
Previous Showing 21-30 of 36 results. Next