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

A357327 a(n) is the unique nonnegative integer k <= A058084(n)/2 such that binomial(A058084(n),k) = n.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1
Offset: 1

Views

Author

Pontus von Brömssen, Sep 24 2022

Keywords

Examples

			The first occurrence of 6 in Pascal's triangle is in row 4 = A058084(6) and binomial(4,2) = 6, so a(6) = 2.
		

Crossrefs

Programs

  • PARI
    a(n) = my(k=0); while (!vecsearch(vector((k+2)\2, i, binomial(k, i-1)), n), k++); select(x->(x==n), vector((k+2)\2, i, binomial(k, i-1)), 1)[1] - 1; \\ Michel Marcus, Sep 24 2022

Formula

A007318(A058084(n),a(n)) = n.

A006987 Binomial coefficients: C(n,k), 2 <= k <= n-2, sorted, duplicates removed.

Original entry on oeis.org

6, 10, 15, 20, 21, 28, 35, 36, 45, 55, 56, 66, 70, 78, 84, 91, 105, 120, 126, 136, 153, 165, 171, 190, 210, 220, 231, 252, 253, 276, 286, 300, 325, 330, 351, 364, 378, 406, 435, 455, 462, 465, 495, 496, 528, 560, 561, 595, 630, 666, 680, 703, 715, 741, 780, 792, 816, 820
Offset: 1

Views

Author

Keywords

Comments

Complement of A137905; a(n) > A058084(a(n)). - Reinhard Zumkeller, Mar 20 2009
Or numbers l which, for the first time, appear in m-th row of the Pascal triangle for m < l. - Vladimir Shevelev, Apr 28 2010
Appears to be the set of simplex numbers of order > 2 and dimension > 1. - Dylan Hamilton, Nov 05 2010
This is correct (assuming the notational choice of giving the first n-simplicial number index 1), as the n-th diagonal or antidiagonal of Pascal's triangle gives the n-simplicial numbers. - Thomas Anton, Dec 04 2018

Examples

			Pascal's triangle (A007318) with the outer two layers removed:
             6
          10  10
        15  20  15
      21  35  35  21
    28  56  70  56  28
  36  84 126 126  84  36
  ...
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    Take[ Union[ Flatten[ Table[ Binomial[n, k], {n, 2, 45}, {k, 2, n - 2}]]], 58] (* Robert G. Wilson v, May 25 2004 *)
  • PARI
    list(lim)=my(v=List(), t); for(n=4, sqrtint(2*lim)+1, for(k=2, n\2, t=binomial(n, k); if(t>lim, break, listput(v, t)))); vecsort(Vec(v), , 8) \\ Charles R Greathouse IV, Apr 03 2012

Extensions

More terms from David W. Wilson
Spelling corrected by Jason G. Wurtzel, Aug 22 2010

A137905 Numbers that appear as binomial coefficients exactly twice.

Original entry on oeis.org

3, 4, 5, 7, 8, 9, 11, 12, 13, 14, 16, 17, 18, 19, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 37, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 53, 54, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 85, 86, 87, 88
Offset: 1

Views

Author

David Wasserman, Feb 21 2008

Keywords

Comments

Complement of A006987; a(n) = A058084(a(n)). - Reinhard Zumkeller, Mar 20 2009

Examples

			7 is a member because 7 = binomial(7, 1) = binomial(7, 6) and no other binomial coefficient equals 7. [clarified by _Jonathan Sondow_, Jan 12 2018]
		

Crossrefs

Programs

  • PARI
    isok(n) = (sum(i=0, n, sum(j=0, i, binomial(i,j)==n)) == 2) \\ Michel Marcus, Jun 16 2013

Formula

a(n) = A185024(n+1). - Elijah Beregovsky, May 14 2019

A349958 a(n) is the index of the first row in Pascal's triangle that contains a multiple of n.

Original entry on oeis.org

0, 2, 3, 4, 5, 4, 7, 8, 9, 5, 11, 9, 13, 8, 6, 16, 17, 9, 19, 6, 7, 11, 23, 10, 25, 13, 27, 8, 29, 10, 31, 32, 11, 17, 7, 9, 37, 19, 13, 10, 41, 9, 43, 12, 10, 23, 47, 16, 49, 25, 18, 13, 53, 27, 11, 8, 19, 29, 59, 10, 61, 32, 9, 64, 13, 11, 67, 17, 23, 8, 71, 12, 73, 37, 25
Offset: 1

Views

Author

Nathan M Epstein, Dec 06 2021

Keywords

Comments

a(n) is the minimum j such that binomial(j,k) is divisible by n for some k in 0..j.
a(n) is at most equal to A058084(n), the least m such that binomial(m,k) = n for some k.

Examples

			In the table below, the k value shown is the minimum k such that n divides binomial(a(n), k).
.
   n  a(n)  k  C(a(n), k)
  --  ----  -  ----------
   1    0   0       1
   2    2   1       2
   3    3   1       3
   4    4   1       4
   5    5   1       5
   6    4   2       6
   7    7   1       7
   8    8   1       8
   9    9   1       9
  10    5   2      10
  11   11   1      11
  12    9   2      36
.
The table below shows the left half (and middle column) of rows j = 0..12 of Pascal's triangle; each number in parentheses there is the first term encountered in Pascal's triangle (read by rows from left to right) that is a multiple of some number n in 1..12, and the corresponding term of {a(n)} whose value is j appears in the column at the right.
E.g., the first multiple of 12 encountered in Pascal's triangle is binomial(9,2) = 36; it appears in row 9, so a(12) = 9, and the column at the right includes a(12) in row 9.
                                               | terms in a(1)..a(12)
   j | left half of row j of Pascal's triangle | that are equal to j
  ---+-----------------------------------------+---------------------
   0 |                                    (1)  |        a(1)  =  0
   1 |                                  1      |
   2 |                               1    (2)  |        a(2)  =  2
   3 |                            1    (3)     |        a(3)  =  3
   4 |                         1    (4)   (6)  |  a(4), a(6)  =  4
   5 |                      1    (5)  (10)     |  a(5), a(10) =  5
   6 |                   1     6    15    20   |
   7 |                1    (7)   21    35      |        a(7)  =  7
   8 |             1    (8)   28    56    70   |        a(8)  =  8
   9 |          1    (9)  (36)   84   126      |  a(9), a(12) =  9
  10 |       1    10    45   120   210   252   |
  11 |    1   (11)   55   165   330   462      |        a(11) = 11
  12 | 1    12    66   210   496   792   924   |
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = 0}, While[!AnyTrue[Binomial[k, Range[0, Floor[k/2]]], Divisible[#, n] &], k++]; k]; Array[a, 75] (* Amiram Eldar, Dec 07 2021 *)
  • PARI
    a(n) = my(k=0); while (!#select(x->(x==1), apply(denominator, vector((k+2)\2, i, binomial(k, i-1))/n)), k++); k; \\ Michel Marcus, Dec 07 2021
    
  • PARI
    a(n) = { my (r = [1 % n]); for (i = 0, oo, if (vecmin(r)==0, return (i), r = (concat(0, r) + concat(r, 0)) % n;);); }
  • Python
    import numpy as np
    def pascals(n):
      a = np.ones(1)
      f = np.ones(2)
      triangle = [a]
      for i in range(n):
        a = np.convolve(a,f)
        triangle.append(a)
      return triangle
    def test(n,tri):
      for i, element in enumerate(tri):
        for sub_e in element:
          if sub_e % n == 0:
            return i
    tri = pascals(500)
    for i in range(1,50):
      print(test(i,tri),end=',')
    
  • Python
    from math import comb
    def A349958(n):
        for j in range(n+1):
            for k in range(j+1):
                if comb(j,k) % n == 0: return j # Chai Wah Wu, Dec 10 2021
    

Extensions

More terms from Michel Marcus, Dec 07 2021

A199424 Index of first row in triangle A199333 containing n-th prime.

Original entry on oeis.org

2, 3, 4, 4, 6, 5, 8, 9, 6, 6, 12, 7, 14, 15, 16, 7, 18, 19, 20, 9, 22, 23, 24, 25, 8, 27, 28, 8, 30, 31, 11, 33, 34, 35, 36, 9, 12, 39, 40, 41, 42, 43, 13, 45, 46, 47, 9, 10, 50, 14, 52, 53, 54, 55, 56, 57, 58, 15, 60, 61, 62, 63, 64, 65, 66, 16, 11, 69, 70
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 09 2011

Keywords

Comments

a(n) <= n + 1.

Crossrefs

Programs

  • Haskell
    import Data.List (findIndex)
    import Data.Maybe (fromJust)
    a199424 n = fromJust $ findIndex (elem $ a000040 n) a199333_tabl

A375570 Smallest m such that A008949(m,k) = n for some k.

Original entry on oeis.org

0, 1, 2, 2, 4, 5, 3, 3, 8, 9, 4, 11, 12, 13, 4, 4, 16, 17, 18, 19, 20, 6, 22, 23, 24, 5, 26, 27, 7, 29, 5, 5, 32, 33, 34, 35, 8, 37, 38, 39, 40, 6, 42, 43, 44, 9, 46, 47, 48, 49, 50, 51, 52, 53, 54, 10, 6, 57, 58, 59, 60, 61, 6, 6, 64, 65, 11, 67, 68, 69, 70
Offset: 1

Views

Author

Pontus von Brömssen, Aug 19 2024

Keywords

Crossrefs

Formula

A008949(a(n),A375571(n)) = n.
a(n) <= n-1.
a(2^n) = n.
a(2^n-1) = n for n >= 2.

A257646 Index of first row of triangle A103284 containing n.

Original entry on oeis.org

0, 2, 3, 4, 4, 5, 5, 9, 5, 11, 6, 13, 6, 7, 16, 6, 18, 7, 20, 7, 22, 23, 24, 7, 26, 27, 9, 29, 7, 8, 32, 33, 34, 8, 10, 37, 38, 8, 40, 41, 42, 43, 44, 8, 46, 47, 48, 49, 9, 51, 52, 53, 8, 12, 56, 57, 58, 59, 9, 61, 62, 63, 64, 9, 13, 67, 68, 69, 70, 71, 72
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 19 2015

Keywords

Comments

a(n) <= n + 1.

Crossrefs

Programs

  • Haskell
    import Data.List (findIndex); import Data.Maybe (fromJust)
    a257646 n = fromJust $ findIndex (elem n) a103284_tabl

A264856 Index of first row of triangle A125605 containing n.

Original entry on oeis.org

0, 2, 3, 4, 5, 6, 7, 6, 9, 10, 11, 8, 11, 10, 15, 16, 17, 18, 14, 12, 15, 22, 12, 18, 12, 22, 27, 18, 13, 20, 15, 32, 33, 34, 13, 36, 37, 14, 15, 14, 38, 42, 43, 44, 45, 16, 24, 13, 25, 50, 51, 52, 53, 54, 31, 56, 45, 58, 59, 60, 19, 62, 63, 64, 65, 66, 67
Offset: 1

Views

Author

Reinhard Zumkeller, Nov 26 2015

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (findIndex); import Data.Maybe (fromJust)
    a264856 n = fromJust $ findIndex (elem n) a125605_tabl
Showing 1-8 of 8 results.