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-2 of 2 results.

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

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Cf. A208278 (row sums), A208279 (central terms), A208134 (number of zeros per row), A208280 (distinct terms per row).
Sequences based on the triangles formed by reading Pascal's triangle mod m: A047999 (m = 2), A083093 (m = 3), A034931 (m = 4), A095140 (m = 5), A095141 (m = 6), A095142 (m = 7), A034930 (m = 8), A095143 (m = 9), (this sequence) (m = 10), A095144 (m = 11), A095145 (m = 12), A275198 (m = 14), A034932 (m = 16).

Programs

  • Haskell
    a008975 n k = a008975_tabl !! n !! k
    a008975_row n = a008975_tabl !! n
    a008975_tabl = iterate
       (\row -> map (`mod` 10) $ zipWith (+) ([0] ++ row) (row ++ [0])) [1]
    -- Reinhard Zumkeller, Feb 24 2012
    
  • Mathematica
    Mod[ Flatten[ Table[ Binomial[n, k], {n, 0, 13}, {k, 0, n}]], 10] (* Robert G. Wilson v, May 26 2004 *)
  • Python
    from math import isqrt, comb
    from sympy.ntheory.modular import crt
    def A008975(n):
        w, c = n-((r:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)))*(r+1)>>1), 1
        d = int(not ~r & w)
        while True:
            r, a = divmod(r,5)
            w, b = divmod(w,5)
            c = c*comb(a,b)%5
            if r<5 and w<5:
                c = c*comb(r,w)%5
                break
        return crt([5,2],[c,d])[0] # Chai Wah Wu, May 01 2025

Formula

T(i, j) = binomial(i, j) mod 10.

A368077 Numbers k such that row k of Pascal's triangle mod 10 contains all the numbers 0 to 9.

Original entry on oeis.org

47, 59, 89, 94, 117, 118, 119, 123, 147, 173, 189, 198, 214, 219, 221, 222, 223, 233, 237, 238, 239, 243, 244, 247, 248, 297, 298, 309, 313, 317, 318, 319, 323, 339, 344, 345, 346, 347, 348, 363, 366, 367, 368, 369, 373, 397, 398, 409, 413, 414, 417, 418, 421, 422, 423, 429, 433, 437, 438, 439
Offset: 1

Views

Author

Robert Israel, Dec 10 2023

Keywords

Comments

Numbers k such that A208280(k) = 10.

Examples

			a(3) = 89 is a term because
  binomial(89,15) = 38163061637050680 == 0 (mod 10),
  binomial(89,0) = 1 == 1 (mod 10),
  binomial(89,5) = 41507642 == 2 (mod 10),
  binomial(89,8) = 70625252863 == 3 (mod 10),
  binomial(89,3) = 113564 == 4 (mod 10),
  binomial(89,16) = 176504160071359395 == 5 (mod 10),
  binomial(89,2) = 3916 == 6 (mod 10),
  binomial(89,9) = 635627275767 == 7 (mod 10),
  binomial(89,6) = 581106988 == 8 (mod 10), and
  binomial(89,1) = 89 == 9 (mod 10).
		

Crossrefs

Cf. A208280.

Programs

  • Maple
    filter:= proc(n) local k,S;
      S:= {$0..9}:
      for k from 0 to n/2 do
        S:= S minus {(binomial(n,k) mod 10)};
        if S = {} then return true fi
      od;
      false
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Dec 10 2023
  • Python
    from itertools import count, islice
    def A368077_gen(): # generator of terms
        a, b = [], set(range(10))
        for i in count(0):
            c, d = 0, []
            for k in a:
                d.append((c+k)%10)
                c = k
            a = d+[1]
            if b.issubset(set(a)): yield i
    A368077_list = list(islice(A368077_gen(),30)) # Chai Wah Wu, May 01 2025
Showing 1-2 of 2 results.