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 12 results. Next

A249719 Complement of A051382.

Original entry on oeis.org

5, 8, 14, 15, 16, 17, 20, 23, 24, 25, 26, 32, 35, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 56, 59, 60, 61, 62, 65, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 86, 89, 95, 96, 97, 98, 101, 104, 105, 106, 107, 113, 116, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131
Offset: 1

Views

Author

Antti Karttunen, Nov 05 2014

Keywords

Comments

Numbers n whose base 3 expansion does not match (0|1)*(02)?(0|1)*

Crossrefs

Complement: A051382.
Terms of A249720 halved.

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
    				

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.

A046097 Values of n for which binomial(2n-1, n) is squarefree.

Original entry on oeis.org

1, 2, 3, 4, 6, 9, 10, 12, 36
Offset: 1

Views

Author

Keywords

Comments

No more terms up to 2^300. The sequence is finite by results of Sander and of Granville and Ramaré (see links). - Robert Israel, Dec 10 2015

Crossrefs

Cf. A001700.
For a term to be here, it needs to be at least in the intersection of A048645, A051382, A050607, A050608 and an infinitude of similar sequences. The corresponding location in next-to-center column should be nonzero in A034931 (Pascal's triangle mod 4) and all similarly constructed fractal triangles (Pascal's triangle mod p^2).

Programs

  • Magma
    [n: n in [1..150] | IsSquarefree(Binomial(2*n-1,n))]; // Vincenzo Librandi, Dec 10 2015
  • Maple
    select(n -> numtheory:-issqrfree(binomial(2*n-1,n)), [$1..2000]); # Robert Israel, Dec 09 2015
    N:= 300: # to find all terms <= 2^N
    carries:= proc(n,m,p)
    # number of carries when adding n + m in base p.
    local A,B,C,j,nc, t;
       A:= convert(m,base,p);
       B:= convert(n,base,p);
    C:= 0; nc:= 0;
       if nops(A) < nops(B) then A = [op(A),0$(nops(B)-nops(A))]
       elif nops(A) > nops(B) then B:= [op(B), 0$(nops(A)-nops(B))]
       fi;
    for j from 1 to nops(A) do
        t:= C + A[j] + B[j];
        if t >= p then
           nc:= nc+1;
           C:= 1;
        else
           C:= 0
        fi
    od:
    nc;
    end proc:
    Cands:=  {seq(2^j,j=0..N), seq(seq(2^j + 2^k, k=0..j-1),j=1..N-1)}:
    for i from 2 to 10 do
      Cands:= select(n -> carries(n-1,n,ithprime(i)) <= 1, Cands)
    od:
    select(n -> numtheory:-issqrfree(binomial(2*n-1,n)),Cands); # Robert Israel, Dec 10 2015
  • Mathematica
    Select[ Range[1500], SquareFreeQ[ Binomial[ 2#-1, #]] &] (* Jean-François Alcover, Oct 25 2012 *)
  • PARI
    is(n)=issquarefree(binomial(2*n-1,n)) \\ Anders Hellström, Dec 09 2015
    

Extensions

James Sellers reports no further terms below 1500.
Michael Somos checked to 99999. Probably there are no more terms.
Mauro Fiorentini checked up to 2^64, as for n = 545259520, the binomial coefficient is a multiple of 5^4 and other possible exceptions have been checked (see Weisstein page for details).

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
    				

A050608 Numbers k such that base 7 expansion matches (0|1|2|3)*((0|1|2)(4|5|6))?(0|1|2|3)*.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 28, 29, 30, 31, 35, 36, 37, 38, 42, 43, 44, 45, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 77, 78, 79, 80, 84, 85, 86, 87, 91, 92, 93, 94, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113
Offset: 1

Views

Author

Keywords

Comments

49 does not divide 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.

Crossrefs

Programs

  • Perl
    # For conv_x_base_n function, see A050607.
    for($i=0; $i <= 1000; $i++) { if(("0" . conv_x_base_n($i,7)) =~ /^(0|1|2|3)*((0|1|2)(4|5|6))?(0|1|2|3)*$/) { print $i, ","; } }

Extensions

a(1)=0 inserted by Georg Fischer, Jun 26 2021

A249721 Numbers whose base-3 representation consists entirely of 0's and 2's, except possibly for a single pair of adjacent 1's among them.

Original entry on oeis.org

0, 2, 4, 6, 8, 12, 14, 18, 20, 22, 24, 26, 36, 38, 42, 44, 54, 56, 58, 60, 62, 66, 68, 72, 74, 76, 78, 80, 108, 110, 114, 116, 126, 128, 132, 134, 162, 164, 166, 168, 170, 174, 176, 180, 182, 184, 186, 188, 198, 200, 204, 206, 216, 218, 220, 222, 224, 228, 230, 234, 236, 238, 240, 242, 324
Offset: 0

Views

Author

Antti Karttunen, Nov 14 2014

Keywords

Comments

9 divides neither C(s-1,s/2) (= A001700(s/2)) nor C(s,s/2) (= A000984(s/2)) if and only if s = a(n).

Examples

			   2, which in base 3 is also '2', satisfies the condition, thus it is included;
   4, which in base 3 is  '11', is included;
   6, which in base 3 is  '20', is included;
   8, which in base 3 is  '22', is included;
  12, which in base 3 is '110', is included;
  14, which in base 3 is '112', is included;
however, e.g., 13, 40, and 130, whose ternary representations are '111', '1111' and '11211' respectively, are not included, because they all contain more than one pair of 1's.
		

Crossrefs

Formula

a(n) = 2 * A051382(n).

A050607 Numbers k such that base 5 expansion matches (0|1|2)*((0|1)(3|4))?(0|1|2)*.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 15, 16, 17, 20, 21, 22, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 40, 41, 42, 45, 46, 47, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 75, 76, 77, 80, 81, 82, 85, 86, 87, 100, 101, 102, 105, 106, 107, 110, 111, 112, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 140, 141, 142, 145
Offset: 1

Views

Author

Antti Karttunen, Oct 24 1999

Keywords

Comments

25 does not divide 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.

Crossrefs

Programs

  • Perl
    sub conv_x_base_n { my($x,$b) = @_; my ($r,$z) = (0,'');
    do { $r = $x % $b; $x = ($x - $r)/$b; $z = "$r" . $z; } while(0 != $x);
    return($z); }
    for($i=0; $i <= 201; $i++) { if(("0" . conv_x_base_n($i,5)) =~ /^(0|1|2)*((0|1)(3|4))?(0|1|2)*$/) { print $i, ","; } }

Extensions

a(1)=0 inserted by Georg Fischer, Jun 26 2021
Showing 1-10 of 12 results. Next