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.

A037453 Positive numbers whose base-5 representation contains no 3 or 4.

Original entry on oeis.org

1, 2, 5, 6, 7, 10, 11, 12, 25, 26, 27, 30, 31, 32, 35, 36, 37, 50, 51, 52, 55, 56, 57, 60, 61, 62, 125, 126, 127, 130, 131, 132, 135, 136, 137, 150, 151, 152, 155, 156, 157, 160, 161, 162, 175, 176, 177, 180, 181, 182, 185, 186, 187
Offset: 1

Views

Author

Keywords

Comments

5 divides neither C(2s-1,s) = A001700(s) (nor C(2s,s) = A000984(s), central column of Pascal's Triangle) if and only if s is one of the terms in this sequence.
k such that binomial(2k,k) != 0 (mod 10). - Benoit Cloitre, Aug 18 2002
Let us recall the plan of Apery's irrationality proof. Consider the recurrence (n+1)^3 * u_(n+1) = (34n^3 + 51n^2 + 27n + 5)u_n - n^3 * u_(n-1). The solution with starting values u_0 = 1; u_1 = 5 has the peculiar property that it has integral terms, despite the fact that at every recursion step we divide by (n+1)^3. The n-th term is given by f(n) = Sum_{i=0..n} binomial(n+i,i)^2 * binomial(n,i)^2 = A005259(n) (see Beukers link) and m such that f(m) mod 5 <> 0 equals 2*a(m). - Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 08 2004
Numbers k such that A208279(k) <> 0. A073095 is a subsequence. - Chai Wah Wu, Dec 08 2023

Examples

			From _David A. Corneth_, Dec 23 2023: (Start)
27_10 = 102_5 is a term since its base-5 representation contains no 3 and no 4.
28_10 = 103_5 is not a term since its base-5 representation contains a 3.
(End)
		

Crossrefs

Programs

  • Julia
    function a(n)
        m, r, b = n, 0, 1
        while m > 0
            m, q = divrem(m, 3)
            r += b * q
            b *= 5
        end
    r end; [a(n) for n in 1:53] |> println # Peter Luschny, Jan 03 2021
    
  • Maple
    a:= proc(t) option remember; 5*procname(floor(t/3))+ (t mod 3) end proc:
    a(0):= 0:
    seq(a(n),n=1..100); # Robert Israel, Sep 02 2014
  • Mathematica
    Table[FromDigits[IntegerDigits[k,3],5], {k,60}] (* T. D. Noe, Apr 18 2007 *)
    Rest[FromDigits[#,5]&/@Tuples[{0,1,2},4]] (* Harvey P. Dale, Aug 31 2016 *)
    Select[Range[187], !Divisible[Binomial[2#, #], 10]&] (* Stefano Spezia, Dec 09 2023 *)
  • PARI
    f(n)=sum(i=0,n,binomial(n+i,i)^2*binomial(n,i)^2); for (i=1,1000,if(Mod(f(i),5)<>0,print1(i/2,",")))
    
  • PARI
    isok(k) = binomial(2*k, k) % 10; \\ Michel Marcus, Dec 08 2023
    
  • PARI
    is(n) = my(s = Set(digits(n, 5))); s[#s] < 3 \\ David A. Corneth, Dec 23 2023
    
  • PARI
    a(n) = fromdigits(digits(n, 3), 5) \\ David A. Corneth, Dec 23 2023
    
  • Python
    from itertools import count, islice
    from sympy.ntheory.factor_ import digits
    def A037453_gen(startvalue=1): # generator of terms >= startvalue
        if startvalue <= 0: yield 0
        yield from filter(lambda n: all(x<3 for x in digits(n, 5)[1:]), count(max(startvalue, 1)))
    A037453_list = list(islice(A037453_gen(), 30)) # Chai Wah Wu, Dec 08 2023
    
  • Python
    from gmpy2 import digits
    def A037453(n): return int(digits(n,3),5) # Chai Wah Wu, Aug 10 2025

Formula

a(3n)=5a(n), a(3n+1)=5a(n)+1, a(3n+2)=5a(n)+2, where by definition a(0)=0. - Emeric Deutsch, Mar 23 2004
G.f. satisfies g(x) = 5*(1+x+x^2)*g(x^3) + (x + 2*x^2)/(1-x^3). - Robert Israel, Sep 02 2014

Extensions

Better definition from T. D. Noe, Apr 18 2007
Showing 1-2 of 2 results.