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-10 of 13 results. Next

A249723 Numbers n such that there is a multiple of 9 on row n of Pascal's triangle with property that all multiples of 4 on the same row (if they exist) are larger than it.

Original entry on oeis.org

9, 10, 13, 15, 18, 19, 21, 27, 29, 31, 37, 39, 43, 45, 46, 47, 54, 55, 59, 63, 75, 79, 81, 82, 83, 85, 87, 90, 91, 93, 95, 99, 103, 109, 111, 117, 118, 119, 123, 126, 127, 135, 139, 151, 153, 154, 157, 159, 162, 163, 165, 167, 171, 175, 181, 183, 187, 189, 190, 191, 198, 199, 207, 219, 223, 225, 226, 229, 231, 234, 235, 237, 239, 243, 245, 247, 251, 253, 255
Offset: 1

Views

Author

Antti Karttunen, Nov 04 2014

Keywords

Comments

All n such that on row n of A095143 (Pascal's triangle reduced modulo 9) there is at least one zero and the distance from the edge to the nearest zero is shorter than the distance from the edge to the nearest zero on row n of A034931 (Pascal's triangle reduced modulo 4), the latter distance taken to be infinite if there are no zeros on that row in the latter triangle.
A052955 from its eight term onward, 31, 47, 63, 95, 127, ... seems to be a subsequence. See also the comments at A249441.

Examples

			Row 13 of Pascal's triangle (A007318) is: {1, 13, 78, 286, 715, 1287, 1716, 1716, 1287, 715, 286, 78, 13, 1} and the term binomial(13, 5) = 1287 = 9*11*13 occurs before any term which is a multiple of 4. Note that one such term occurs right next to it, as binomial(13, 6) = 1716 = 4*3*11*13, but 1287 < 1716, thus 13 is included.
		

Crossrefs

Complement: A249724.
Natural numbers (A000027) is a disjoint union of the sequences A048278, A249722, A249723 and A249726.

Programs

  • PARI
    A249723list(upto_n) = { my(i=0, n=0); while(i
    				

A249441 a(n) is the smallest prime whose square divides at least one entry in the n-th row of Pascal's triangle, or 0 if there is no such prime.

Original entry on oeis.org

0, 0, 0, 0, 2, 0, 2, 0, 2, 2, 2, 0, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 0

Views

Author

Vladimir Shevelev, Oct 28 2014

Keywords

Comments

a(n) = 3 for 15, 31, 47, 63, 95, 127, 191, 255, 383, 511, 767, 1023, 1535, 2047, 3071, etc.
The above values all occur in A249723 and from 31 onward seem to be given by A052955(n>=8). (Cf. also A249714 & A249715). - Antti Karttunen, Nov 04 2014
Using the Kummer theorem on carries, one can prove that, if a(n)>3 or 0, then n>23 takes the form of either 1...1 or 101...1 in base 2 and simultaneously 212...2 in base 3. However, it is easy to see that this leads to a contradiction. Thus there are no terms greater than 3 and only 8 zeros, i.e., there are only 8 rows in Pascal's triangle that contain all squarefree numbers. It turns out that the latter result has been known for a long time (see A048278).

Crossrefs

Programs

  • Maple
    a_list := proc(len) local s; s := proc(L,p) local n; seq(max(op(map(b-> padic[ordp](b,p),{seq(binomial(n,k),k=0..n)}))),n=0..L); map(k-> `if`(k<2,0,p),[%]) end: zip((x,y)-> `if`(x=0,y,x),s(len,2),s(len,3)) end: a_list(86); # Peter Luschny, Nov 01 2014
    # alternative
    A249441 := proc(n)
        local p,wrks,bi,k;
        if n in [0,1,2,3,5,7,11,23] then
            return 0 ;
        end if;
        p :=2 ;
        while true do
            wrks := false;
            bi := 1 ;
            for k from 0 to n do
                if modp(bi,p^2) = 0 then
                    wrks := true;
                    break;
                end if;
                bi := bi*(n-k)/(1+k) ;
            end do:
            if wrks then
                return p;
            end if;
            p := nextprime(p) ;
        end do:
    end proc: # R. J. Mathar, Nov 04 2014
  • Mathematica
    row[n_] := Table[Binomial[n, k], {k, 1, (n-Mod[n, 2])/2}];
    a[n_] := If[MemberQ[{0, 1, 2, 3, 5, 7, 11, 23}, n], 0, For[p = 2, True, p = NextPrime[p], If[AnyTrue[row[n], Divisible[#, p^2]&], Return[p]]]];
    Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Jul 30 2018 *)
  • PARI
    a(n) = my(o=0); for(k=1,n\2, o+=valuation((n-k+1)/k, 2); if(o>1, return(2))); if(n<24 && n!=15, 0, 3) \\ Charles R Greathouse IV, Nov 03 2014
    
  • PARI
    A249441(n) = { forprime(p=2,3,for(k=0,n\2,if((0==(binomial(n,k)%(p*p))),return(p)))); return(0); } \\ This is more straightforward, but a slower implementation - Antti Karttunen, Nov 03 2014
    
  • PARI
    a(n)=if((n+1)>>valuation(n+1,2)<5, if(n<24 && setsearch([1,2,3,5,7,11,23],n), 0, 3), 2) \\ Charles R Greathouse IV, Nov 06 2014

Extensions

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

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

A249695 a(n)=0, if A249441(n)=0; otherwise, a(n) is the smallest i such that A249441(n)^2 divides binomial(n,i).

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Nov 04 2014

Keywords

Comments

After a(0) = 0, A048278 gives the positions of seven other zeros in the sequence. - Antti Karttunen, Nov 04 2014

Crossrefs

A249714 and A249715 give the record values and their positions.
Differs from A249442 for the first time at n=9.

Programs

  • Maple
    A249695 := proc(n)
        a41n := A249441(n) ;
        if a41n = 0 then
            return 0;
        end if;
        bi := 1;
        for i from 0 do
            if modp(bi,a41n^2)= 0 then
                return i;
            end if;
            bi := bi*(n-i)/(1+i) ;
        end do:
    end proc: # R. J. Mathar, Nov 04 2014
  • Mathematica
    bb[n_] := Table[Binomial[n, k], {k, 1, (n - Mod[n, 2])/2}];
    a41[n_] := If[MemberQ[{0, 1, 2, 3, 5, 7, 11, 23}, n], 0, For[p = 2, True, p = NextPrime[p], If[AnyTrue[bb[n], Divisible[#, p^2]&], Return[p]]]];
    a[n_] := If[(a41n = a41[n]) == 0, 0, For[i = 1, True, i++, If[Divisible[ Binomial[n, i], a41n^2], Return[i]]]];
    a /@ Range[0, 100] (* Jean-François Alcover, Mar 27 2020 *)
  • PARI
    A249695(n) = { forprime(p=2,3,for(k=0,floor(n/2),if((0==(binomial(n,k)%(p*p))),return(k)))); return(0); } \\ Straightforward and unoptimized version. But fast enough for 10000 terms.
    A249695(n) = { for(p=2,3, my(o=0); for(k=1, n\2, o+=valuation((n-k+1)/k, p); if(o>1, return(k)))); return(0); } \\ This version is based on Charles R Greathouse IV's code for A249441.
    for(n=0, 10000, write("b249695.txt", n, " ", A249695(n)));
    \\ Antti Karttunen, Nov 04 2014

A319071 Number of integer partitions of n whose product of parts is a perfect power and whose parts all have the same number of prime factors, counted with multiplicity.

Original entry on oeis.org

1, 0, 0, 0, 2, 0, 2, 0, 3, 2, 3, 0, 4, 1, 4, 3, 7, 1, 7, 1, 8, 6, 8, 0, 15, 5, 12, 6, 15, 4, 22, 4, 24, 12, 22, 8, 35, 7, 30, 16, 42, 9, 50, 9, 50, 30, 53, 7, 79, 22, 72, 33, 87, 21, 109, 26, 111, 55, 117, 24, 168, 40, 149, 65, 178, 59
Offset: 0

Views

Author

Gus Wiseman, Oct 10 2018

Keywords

Comments

The positions of zeros appear to be A048278.

Examples

			The a(4) = 2 through a(16) = 7 integer partitions (G = 16):
  4   33   8     9    55     66      94  77       555     G
  22  222  44    333  3322   444         5522     33333   88
           2222       22222  3333        332222   333222  664
                             222222      2222222          4444
                                                          5533
                                                          333322
                                                          22222222
		

Crossrefs

Programs

  • Mathematica
    Table[Length[Select[IntegerPartitions[n],And[GCD@@FactorInteger[Times@@#][[All,2]]>1,SameQ@@PrimeOmega/@#]&]],{n,30}]

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)).

A249722 Numbers n such that there is a multiple of 4 on row n of Pascal's triangle with property that all multiples of 9 on the same row (if they exist) are larger than it.

Original entry on oeis.org

4, 6, 8, 12, 14, 16, 17, 20, 22, 24, 25, 26, 28, 30, 32, 33, 34, 35, 38, 40, 41, 42, 44, 48, 49, 50, 51, 52, 53, 56, 57, 58, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 74, 76, 77, 78, 80, 84, 86, 88, 89, 92, 94, 96, 97, 98, 100, 101, 102, 104, 105, 106, 107, 112, 113, 114, 115, 116, 120, 121, 122, 124, 125
Offset: 1

Views

Author

Antti Karttunen, Nov 04 2014

Keywords

Comments

All n such that on row n of A034931 (Pascal's triangle reduced modulo 4) there is at least one zero and the distance from the edge to the nearest zero is shorter than the distance from the edge to the nearest zero on row n of A095143 (Pascal's triangle reduced modulo 9), the latter distance taken to be infinite if there are no zeros on that row in the latter triangle.

Examples

			Row 4 of Pascal's triangle (A007318) is {1,4,6,4,1}. The least multiple of 4 occurs as C(4,1) = 4, and there are no multiples of 9 present, thus 4 is included among the terms.
Row 12 of Pascal's triangle is {1,12,66,220,495,792,924,792,495,220,66,12,1}. The least multiple of 4 occurs as C(12,1) = 12, which is less than the least multiple of 9 present at C(12,4) = 495 = 9*55, thus 12 is included among the terms.
		

Crossrefs

A subsequence of A249724.
Natural numbers (A000027) is a disjoint union of the sequences A048278, A249722, A249723 and A249726.

Programs

  • PARI
    A249722list(upto_n) = { my(i=0, n=0); while(i
    				

A249724 Numbers k such that on row k of Pascal's triangle there is no multiple of 9 which would be less than any (potential) multiple of 4 on the same row.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 11, 12, 14, 16, 17, 20, 22, 23, 24, 25, 26, 28, 30, 32, 33, 34, 35, 36, 38, 40, 41, 42, 44, 48, 49, 50, 51, 52, 53, 56, 57, 58, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 80, 84, 86, 88, 89, 92, 94, 96, 97, 98, 100, 101, 102, 104, 105, 106, 107, 108, 110, 112, 113, 114, 115, 116, 120, 121
Offset: 1

Views

Author

Antti Karttunen, Nov 04 2014

Keywords

Comments

Disjoint union of {0} and the following sequences: A048278 (gives 7 other cases where there are neither multiples of 4 nor 9 on row k), A249722 (rows where a multiple of 4 is found before a multiple of 9), A249726 (cases where the least term on row k which is a multiple of 4 is also a multiple of 9, and vice versa, i.e., such a term a multiple of 36).
If A249717(k) < 3 then k is included in this sequence. This is a sufficient but not necessary condition, e.g., A249717(25) = 5, but 25 is also included in this sequence.

Crossrefs

Programs

  • PARI
    A249724list(upto_n) = { my(i=0, n=0, dont_print=0); while(i
    				

A249726 Numbers n such that there is a multiple of 36 on row n of Pascal's triangle with property that it is also the least multiple of 4 and the least multiple of 9 on the same row.

Original entry on oeis.org

36, 72, 73, 108, 110, 144, 145, 147, 180, 216, 217, 218, 221, 252, 288, 289, 291, 295, 324, 326, 360, 361, 396, 432, 433, 434, 435, 437, 443, 468, 504, 505, 540, 542, 576, 577, 579, 583, 612, 648, 649, 650, 653, 684, 720, 721, 723, 756, 758, 792, 793, 828, 864, 865, 866, 867, 869, 871, 875, 887, 900, 936, 937, 972, 974, 1008, 1009, 1011, 1044, 1080
Offset: 1

Views

Author

Antti Karttunen, Nov 04 2014

Keywords

Comments

All n such that both on row n of A034931 (Pascal's triangle reduced modulo 4) and on row n of A095143 (Pascal's triangle reduced modulo 9) there is at least one zero and the distance from the edge to the nearest zero is same on both rows.

Crossrefs

Subsequence of A249724.
A044102 is a subsequence (after zero).
Natural numbers (A000027) is a disjoint union of the sequences A048278, A249722, A249723 and A249726.

Programs

  • PARI
    A249726list(upto_n) = { my(i=0, n=0); while(i
    				

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
Showing 1-10 of 13 results. Next