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.

A048278 Positive numbers n such that the numbers binomial(n,k) are squarefree for all k = 0..n.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 23
Offset: 1

Views

Author

Keywords

Comments

It has been shown by Granville and Ramaré that the sequence is complete.
These are all the positive integers m that, when m is represented in binary, contain no composites represented in binary as substrings. - Leroy Quet, Oct 30 2008
This is a number-theoretic sequence, so it automatically assumes that n is positive. To quote Granville and Ramaré, "From Theorem 2 it is evident that there are only finitely many rows of Pascal's Triangle in which all of the entries are squarefree. In section 2 we show that this only occurs in rows 1, 2, 3, 5, 7, 11 and 23 (a result proved by Erdős long ago)." - N. J. A. Sloane, Mar 06 2014
See also comment in A249441. - Vladimir Shevelev, Oct 29 2014
This sequence is equivalent to: Positive integers n such that Fibonacci(n+1) divides n!. This comment depends on the finiteness of A019532. - Altug Alkan, Mar 31 2016

Examples

			n=11: C[11,k] = 1, 11, 55, 165, 330, 462, ... are all squarefree (or 1).
		

Crossrefs

Programs

  • Maple
    select(n -> andmap(t -> numtheory:-issqrfree(binomial(n,t)),[$1..floor(n/2)]),[$1..100]); # Robert Israel, Oct 29 2014
  • Mathematica
    Do[m = Prime[n]; k = 2; While[k < m/2 + .5 && Union[ Transpose[ FactorInteger[ Binomial[m, k]]] [[2]]] [[ -1]] < 2, k++ ]; If[k >= m/2 + .5, Print[ Prime[n]]], {n, 1, PrimePi[10^6]} ]
    Select[Range[10^3], Function[n, AllTrue[Binomial[n, Range@ n], SquareFreeQ]]] (* Michael De Vlieger, Apr 01 2016, Version 10 *)
  • PARI
    is(n)=for(k=0,n\2,if(!issquarefree(binomial(n,k)),return(0))); 1 \\ Charles R Greathouse IV, Mar 06 2014

Formula

Integers n>0 in set difference between union (A000225, A055010) and A249452. - Vladimir Shevelev, Oct 30 2014
a(n) = A018253(n+1) - 1. - Altug Alkan, Apr 26 2016

Extensions

Edited by Ralf Stephan, Aug 03 2004

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.

A249442 a(n) is the smallest m such that binomial(n,m) is not squarefree, or a(n)=0, if there is no such m.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The sequence gives the position of the first zero on row n (both starting from zero) in the triangular table A103447, and zero if there is no zero on that row. After a(0) = 0, A048278 gives the positions of seven other zeros in the sequence.
Records are 0,1,3,5,7,8,21,... (A249439) in positions 0,4,6,13,15,43,47,... (A249440).

Crossrefs

A249439 gives the record values, A249440 the positions where they occur for the first time.
Differs from A249695 for the first time at n=9.

Programs

  • Mathematica
    Table[If[#>n,0,#]&[NestWhile[#+1&,1,SquareFreeQ[Binomial[n,#]]&]],{n,0,100}] (* Peter J. C. Moses, Nov 04 2014 *)
  • PARI
    A249442(n) = { for(k=0,n\2,if(0==moebius(binomial(n,k)),return(k))); return(0); }
    for(n=0, 10000, write("b249442.txt", n, " ", A249442(n)));
    \\ Antti Karttunen, Nov 04 2014

Formula

Other identities:
A249716(n) = binomial(n, a(n)). [A249716(n) gives the corresponding minimal nonsquarefree binomial coefficient, or 1 when n is one of the terms of A048278].

Extensions

More terms from Peter J. C. Moses, Oct 28 2014

A048276 a(n) = number of squarefree numbers among C(n,k), k=0..n.

Original entry on oeis.org

1, 2, 3, 4, 3, 6, 6, 8, 3, 2, 6, 12, 4, 10, 12, 14, 2, 6, 2, 8, 8, 10, 12, 24, 4, 4, 8, 2, 4, 12, 6, 12, 2, 4, 8, 8, 2, 8, 14, 12, 4, 12, 14, 26, 16, 8, 20, 42, 2, 2, 2, 4, 6, 18, 4, 6, 2, 6, 10, 22, 8, 26, 40, 8, 2, 4, 6, 8, 8, 16, 12, 18, 2, 8, 18, 4, 6, 14, 18, 34, 2, 2, 4, 6, 4, 10, 12, 16, 4
Offset: 0

Views

Author

Keywords

Comments

The only odd numbers are at n = 0, 2, 4, and 8. So this sequence is essentially twice A238337. - T. D. Noe, Mar 07 2014

Examples

			If n=20, then C(20, k) is squarefree for k = 0,2,4,8,12,16,18,20, that is, for 8 cases of k, so a(20)=8.
		

Crossrefs

Programs

  • Maple
    A048276 := proc(n)
        local a,k ;
        a := 0 ;
        for k from 0 to n do
            if issqrfree(binomial(n,k)) then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc:
    seq(A048276(n),n=0..40) ; # R. J. Mathar, Jan 18 2018
  • Mathematica
    Table[Length[Select[Binomial[n, Range[0, n]], SquareFreeQ[#] &]], {n, 0, 100}]
  • PARI
    a(n) = sum(k=0, n, issquarefree(binomial(n, k))); \\ Michel Marcus, Dec 19 2013

Formula

a(n) = n+1-A048277(n). - R. J. Mathar, Jan 18 2018

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.

A249716 The least nonsquarefree number on row n of Pascal's triangle, or 1 if all the terms on that row are squarefree.

Original entry on oeis.org

1, 1, 1, 1, 4, 1, 20, 1, 8, 9, 45, 1, 12, 1287, 364, 6435, 16, 136, 18, 171, 20, 5985, 1540, 1, 24, 25, 325, 27, 28, 3654, 4060, 169911, 32, 528, 5984, 52360, 36, 666, 8436, 82251, 40, 820, 11480, 145008513, 44, 45, 1035, 12551759587422, 48, 49, 50, 1275, 52, 292825, 54, 1485, 56, 1596, 30856, 45057474, 60, 55525372, 37820, 63, 64, 2080
Offset: 0

Views

Author

Antti Karttunen, Nov 04 2014

Keywords

Comments

After a(0) = 1, A048278 gives the positions of seven other ones in the sequence.

Examples

			           Binomial coefficients     First squarefree     a(n)
                 A007318             occurs at index?      =
----------------------------------------------------------------------------
Row 0                1               no squarefrees        1 (by definition)
Row 1              1   1             no squarefrees        1
Row 2            1   2   1           no squarefrees        1
Row 3          1   3   3   1         no squarefrees        1
Row 4        1   4   6   4   1              1              4
Row 5      1   5  10  10   5   1     no squarefrees        1
Row 6    1   6  15  20  15   6   1          3             20
		

Crossrefs

A249717 and A249718 give the smallest and the largest prime whose square divides these numbers.

Programs

  • PARI
    A249716(n) = { my(b); for(k=0,n\2,if(0==moebius(b=binomial(n,k)),return(b))); return(1); }
    for(n=0, 10000, write("b249716.txt", n, " ", A249716(n)));
    
  • Scheme
    (define (A249716 n) (A007318tr n (A249442 n)))

Formula

a(n) = binomial(n, A249442(n)).

A064460 Number of distinct nonsquarefree entries in n-th row of Pascal's triangle.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 1, 0, 3, 4, 3, 0, 5, 2, 2, 1, 8, 6, 9, 6, 7, 6, 6, 0, 11, 11, 10, 13, 13, 9, 13, 10, 16, 15, 14, 14, 18, 15, 13, 14, 19, 15, 15, 9, 15, 19, 14, 3, 24, 24, 25, 24, 24, 18, 26, 25, 28, 26, 25, 19, 27, 18, 12, 28, 32, 31, 31, 30, 31, 27, 30, 27, 36
Offset: 0

Views

Author

Robert G. Wilson v, Oct 02 2001

Keywords

Examples

			a(13) = 2 because C(13,5) = 3^2*11*13 and C(13,6) = 2^2*3*11*13.
		

Crossrefs

Programs

  • Mathematica
    f[ n_ ] := (c = 0; k = 1; While[ k < n/2 + .5, If[ Union[ Transpose[ FactorInteger[ Binomial[ n, k ] ] ] [ [ 2 ] ] ] [ [ -1 ] ] > 1, c++ ]; k++ ]; c); Table[ f[ n ], {n, 0, 100} ]
  • PARI
    a(n) = sum(k=0, n\2, !issquarefree(binomial(n, k))); \\ Michel Marcus, Mar 05 2014

Formula

a(n) + A238337(n) = A008619(n). - R. J. Mathar, Jan 18 2018

A048279 Values of n for which no values of C(n,k) except k=0 and k=n are squarefree.

Original entry on oeis.org

0, 1, 9, 16, 18, 27, 32, 36, 48, 49, 50, 56, 64, 72, 80, 81, 96, 98, 99, 100, 108, 112, 121, 126, 128, 135, 136, 144, 147, 148, 153, 162, 169, 171, 175, 176, 180, 192, 196, 198, 200, 216, 225, 243, 244, 245, 248, 250, 252, 256, 264, 272, 276, 288, 289, 294, 300
Offset: 1

Views

Author

Keywords

Examples

			n=9, C(n,k) = (1),9,36,84,126,126,84,36,9,(1); all values include squares.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := (c = 0; k = 1; While[k < n, If[ Union[ Transpose[ FactorInteger[ Binomial[n, k]]] [[2]]] [[ -1]] > 1, c++ ]; k++ ]; c); Select[Range[150], f[ # ] == # - 1 &]
    a[ n_] := If[ n < 2, 0, Module[ {c = 1, k = 1}, While[ c < n, If[ {} == Select[ Table[ Binomial[k, i], {i, k - 1}], SquareFreeQ], c++]; k++]; k - 1]]; (* Michael Somos, Mar 07 2014 *)
    Join[{0,1},Select[Range[3,300],NoneTrue[Binomial[#,Range[2,#-1]], SquareFreeQ] &]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 29 2019 *)

Extensions

More terms from Robert G. Wilson v, Oct 02 2001

A064462 First row of Pascal's triangle that has n nonsquarefree entries, or -1 if no such row exists.

Original entry on oeis.org

0, 6, 4, 14, 13, 10, 8, -1, 9, 12, -1, 22, 17, 20, -1, 16, -1, 18, 29, 26, 31, 24, 25, 62, -1, 28, 27, 34, 35, 42, 33, 32, -1, -1, -1, 36, 53, 40, 45, -1, -1, -1, 95, -1, -1, -1, 79, 48, 49, 50, 55, 54, 57, 60, 69, 56, 63, 74, -1, 70, 67, 66, 65, 64, 77, -1
Offset: 0

Views

Author

Robert G. Wilson v, Oct 02 2001

Keywords

Comments

Numbers such that a(n) is -1: 7, 10, 14, 16, 24, 32, 33, 34, 39, 40, 41, 43, ... - Michel Marcus, Mar 05 2014

Examples

			a(4) = 13 because C(13,5) = C(13,8) = 3^2*11*13 and C(13,6) = C(13,7) = 2^2*3*11*13.
		

Crossrefs

Programs

  • Mathematica
    f[ n_ ] := (c = 0; k = 1; While[ k < n, If[ Union[ Transpose[ FactorInteger[ Binomial[ n, k ] ] ] [ [ 2 ] ] ] [ [ -1 ] ] > 1, c++ ]; k++ ]; c); Do[ m = 2; While[ f[ m ] != n, m++ ]; Print[ m ], {n, 0, 6} ]
  • PARI
    a(n, v) = {for (i=1, #v, if (v[i] == n, return (i-1));); return (-1);} \\ where v is vector A048277; Michel Marcus, Mar 05 2014

Extensions

Corrected and extended by Michel Marcus, Mar 05 2014
Showing 1-9 of 9 results.