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.

Previous Showing 31-40 of 40 results.

A382722 Number of entries in the n-th row of Pascal's triangle not divisible by 13.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, 78, 7, 14, 21
Offset: 0

Views

Author

N. J. A. Sloane, Apr 23 2025

Keywords

Crossrefs

Programs

  • Python
    from math import prod
    from gmpy2 import digits
    def A382722(n): return prod(int(d,13)+1 for d in digits(n,13)) # Chai Wah Wu, Aug 10 2025

A387051 Number of entries in the n-th row of Pascal's triangle not divisible by 32.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 17, 34, 27, 36, 29, 38, 35, 40, 33, 42, 39, 44, 41, 46, 45, 48, 41, 50, 47, 52, 49, 54, 53, 56, 53, 58, 57, 60, 59, 62, 62, 64, 17, 34, 43, 68
Offset: 0

Views

Author

Chai Wah Wu, Aug 15 2025

Keywords

Crossrefs

Programs

  • Python
    def A387051(n):
        n1 = n>>1
        n2 = n1>>1
        n3 = n2>>1
        n4 = n3>>1
        np = ~n
        n10, n100, n110 = (k1:=n1&np).bit_count(), (k2:=(k1>>1)&np).bit_count(), (k3:=n2&k1).bit_count()
        n1100, n1000, n1010, n1110 = (k5:=n3&k2).bit_count(), (k4:=(k2>>1)&np).bit_count(), (k6:=(k1>>2)&k1).bit_count(), (k7:=n3&k3).bit_count()
        n10000, n11000, n10100, n11100 = ((k4>>1)&np).bit_count(), (n4&k4).bit_count(), ((k6>>1)&np).bit_count(), (n4&k5).bit_count()
        n10010, n11010, n10110, n11110 = ((k2>>2)&k1).bit_count(), (n4&k6).bit_count(), ((k1>>3)&k3).bit_count(), (n4&k7).bit_count()
        c = n10*(n10*(n10*(n10+2)+((n100<<2)+n110)*12+35)+((((((n1000<<2)+n1010+n1100<<1)+n100<<1)+n1110<<1)+n110)*12+154))//24
        c += n100*((n100<<1)+n110+1<<2)+(((n10000<<2)+n1000+n10010+n10100+n11000+1<<2)+n10110+n11010+n11100<<2)+n1110+n11110+(n110*(n110+5)>>1)
        return c<>4

A206427 Square array 2^(m-1)*(3^n+1), read by antidiagonals.

Original entry on oeis.org

1, 2, 2, 5, 4, 4, 14, 10, 8, 8, 41, 28, 20, 16, 16, 122, 82, 56, 40, 32, 32, 365, 244, 164, 112, 80, 64, 64, 1094, 730, 488, 328, 224, 160, 128, 128, 3281, 2188, 1460, 976, 656, 448, 320, 256, 256, 9842, 6562, 4376, 2920, 1952, 1312, 896, 640, 512, 512
Offset: 0

Views

Author

Marcus Jaiclin, Feb 07 2012

Keywords

Comments

Rectangular array giving the number of 1's in any row of Pascal's Triangle (mod 3) whose row number has exactly m 1's and n 2's in its ternary expansion (listed by antidiagonals).
a(m,n) is independent of the number of zeros in the ternary expansion of the row number.
a(m,n) gives a non-recursive formula for A206424.

Examples

			Initial 5 X 5 block of entries (upper corner is (m,n)=(0,0), m increases down, n increases across):
1    2    5   14   41
2    4   10   28   82
4    8   20   56  164
8   16   40  112  328
16  32   80  224  656
Pascal's Triangle (mod 3), row numbers in ternary:
1     <=  Row 0, m = 0, n = 0, 2^(-1)(3^0 + 1) = #1's = 1
1 1     <=  Row 1, m = 1, n = 0, 2^0(3^0 + 1) = #1's = 2
1 2 1     <=  Row 2, m = 0, n = 1, 2^(-1)(3^1 + 1) = #1's = 2
1 0 0 1     <=  Row 10, m = 1, n = 0, 2^0(3^0 + 1) = #1's = 2
1 1 0 1 1     <=  Row 11, m = 2, n = 0, 2^1(3^0 + 1) = #1's = 4
1 2 1 1 2 1     <=  Row 12, m = 1, n = 1, 2^0(3^1 + 1) = #1's = 4
1 0 0 2 0 0 1     <=  Row 20, m = 0, n = 1, 2^(-1)(3^1 + 1) = #1's = 2
1 1 0 2 2 0 1 1     <=  Row 21, m = 1, n = 1, 2^0(3^1 + 1) = #1's = 4
1 2 1 2 1 2 1 2 1     <=  Row 22, m = 0, n = 2, 2^(-1)(3^2 + 1) = #1's = 5
1 0 0 0 0 0 0 0 0 1     <=  Row 100, m = 1, n = 0, 2^0(3^0 + 1) = #1's = 2
		

Crossrefs

Formula

a(m, n) = 2^(m - 1)(3^n + 1).

A206428 Rectangular array, a(m,n) = 2^(m-1)*(3^n-1), read by antidiagonals.

Original entry on oeis.org

0, 1, 0, 4, 2, 0, 13, 8, 4, 0, 40, 26, 16, 8, 0, 121, 80, 52, 32, 16, 0, 364, 242, 160, 104, 64, 32, 0, 1093, 728, 484, 320, 208, 128, 64, 0, 3280, 2186, 1456, 968, 640, 416, 256, 128, 0, 9841, 6560, 4372, 2912, 1936, 1280, 832, 512, 256, 0
Offset: 0

Views

Author

Marcus Jaiclin, Feb 07 2012

Keywords

Comments

Number of 2's in any row of Pascal's triangle (mod 3) whose row number has exactly m 1's and n 2's in its ternary expansion.
a(m,n) is independent of the number of zeros in the ternary expansion of the row number.
a(m,n) gives a non-recursive formula for A227428.

Examples

			Initial 5 X 5 block of array (upper left corner is (0,0), row index m, column index n):
0    1    4   13   40
0    2    8   26   80
0    4   16   52  160
0    8   32  104  320
0   16   64  208  640
Pascal's Triangle (mod 3), row numbers in ternary:
1     <= Row 0, m=0, n=0, 2^(-1)(3^0-1) = #2's = 0
1 1     <= Row 1, m=1, n=0, 2^0(3^0-1) = #2's = 0
1 2 1     <= Row 2, m=0, n=1, 2^(-1)(3^1-1) = #2's = 1
1 0 0 1     <= Row 10, m=1, n=0, 2^0(3^0-1) = #2's = 0
1 1 0 1 1     <= Row 11, m=2, n=0, 2^1(3^0-1) = #2's = 0
1 2 1 1 2 1     <= Row 12, m=1, n=1, 2^0(3^1-1) = #2's = 2
1 0 0 2 0 0 1     <= Row 20, m=0, n=1, 2^(-1)(3^1-1) = #2's = 1
1 1 0 2 2 0 1 1     <= Row 21, m=1, n=1, 2^0(3^1-1) = #2's = 2
1 2 1 2 1 2 1 2 1     <= Row 22, m=0, n=2, 2^(-1)(3^2-1) = #2's = 4
1 0 0 0 0 0 0 0 0 1     <= Row 100, m=1, n=0, 2^0(3^0-1) = #2's = 0
		

Crossrefs

A382724 Number of entries in the n-th row of Pascal's triangle not divisible by 6.

Original entry on oeis.org

1, 2, 3, 4, 4, 6, 5, 8, 9, 4, 6, 8, 6, 10, 14, 16, 12, 18, 5, 10, 11, 12, 16, 22, 11, 20, 27, 16, 10, 18, 18, 32, 12, 8, 14, 18, 6, 12, 16, 20, 18, 26, 18, 30, 36, 18, 24, 38, 14, 28, 38, 28, 38, 54, 17, 34, 15, 20, 26, 40, 23, 42, 45, 64, 12, 18, 14, 26, 36, 24, 38, 54, 11, 20, 29, 28, 38, 56, 37, 64, 81
Offset: 0

Views

Author

N. J. A. Sloane, Apr 23 2025

Keywords

Crossrefs

A387108 Number of entries in the n-th row of Pascal's triangle not divisible by 25.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 6, 12, 18, 24, 30, 15, 20, 25, 30, 35, 24, 28, 32, 36, 40, 33, 36, 39, 42, 45, 42, 44, 46, 48, 50, 11, 22, 33, 44, 55, 24, 33, 42, 51, 60, 37, 44, 51, 58, 65, 50, 55, 60
Offset: 0

Views

Author

Chai Wah Wu, Aug 16 2025

Keywords

Crossrefs

Programs

  • Python
    import re
    from gmpy2 import digits
    def A387108(n):
        s = digits(n,5)
        n1, n2, n3, n4 = s.count('1'), s.count('2'), s.count('3'), s.count('4')
        n10, n12, n13, n42, n43, n11 = s.count('10'), s.count('12'), s.count('13'), s.count('42'), s.count('43'), len(re.findall('(?=11)',s))
        n20, n21, n23, n30, n22 = s.count('20'), s.count('21'), s.count('23'), s.count('30'), len(re.findall('(?=22)',s))
        n31, n32, n40, n41, n33 = s.count('31'), s.count('32'), s.count('40'), s.count('41'), len(re.findall('(?=33)',s))
        return ((1440*n10+540*n11+240*n12+90*n13+1920*n20+720*(n21+1)+320*n22+120*n23+2160*n30+810*n31+360*n32+135*n33+2304*n40+864*n41+384*n42+144*n43)*3**n2*5**n4<<(n1+(n3<<1)))//45>>4

A382723 Number of entries in the n-th row of Pascal's triangle not divisible by 4.

Original entry on oeis.org

1, 2, 3, 4, 3, 6, 6, 8, 3, 6, 8, 12, 6, 12, 12, 16, 3, 6, 8, 12, 8, 16, 16, 24, 6, 12, 16, 24, 12, 24, 24, 32, 3, 6, 8, 12, 8, 16, 16, 24, 8, 16, 20, 32, 16, 32, 32, 48, 6, 12, 16, 24, 16, 32, 32, 48, 12, 24, 32, 48, 24, 48, 48, 64, 3, 6, 8, 12, 8, 16, 16, 24, 8, 16, 20, 32, 16, 32, 32, 48, 8
Offset: 0

Views

Author

N. J. A. Sloane, Apr 23 2025

Keywords

Crossrefs

Programs

  • PARI
    a(n) = sum(k=0, n, (binomial(n, k) % 4) != 0); \\ Michel Marcus, Apr 23 2025
    
  • Python
    def A382723(n): return bin(n)[2:].count('10')+2<Chai Wah Wu, Aug 10 2025

Formula

a(n) = (A033264(n)+2)*2^(A000120(n)-1). - Chai Wah Wu, Aug 10 2025

A387064 Total number of entries in rows 0 to n of Pascal's triangle multiple of n.

Original entry on oeis.org

0, 3, 1, 2, 2, 4, 3, 6, 4, 6, 10, 10, 12, 12, 21, 22, 8, 16, 18, 18, 30, 42, 47, 22, 38, 20, 74, 18, 65, 28, 81, 30, 16, 113, 136, 132, 94, 36, 147, 195, 140, 40, 162, 42, 199, 210, 217, 46, 126, 42, 146, 302, 261, 52, 110, 335, 243, 374, 394, 58, 363, 60, 465, 416
Offset: 0

Views

Author

Jean-Marc Rebert, Aug 15 2025

Keywords

Examples

			The first two rows of Pascal's triangle are [1] and [1, 1]. Since all elements are divisible by 1, a(1) equals the total number of such divisible terms: 1 + 2 = 3.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[Boole[Divisible[Binomial[k, i], n]], {k, 0, n}, {i, 0, k}]; a[0] = 0; Array[a, 100, 0] (* Amiram Eldar, Aug 17 2025 *)
  • PARI
    a(n) = if (n, sum(r=0, n, sum(k=0, r, !(binomial(r,k) % n))), 0); \\ Michel Marcus, Aug 15 2025
    
  • Python
    from sympy import isprime, integer_nthroot
    def A387064(n):
        if isprime(n): return n-1
        a, b = integer_nthroot(n,2)
        if b and isprime(a): return n-a
        r, c = [1], n==1
        for m in range(n):
            s = [1]
            for i in range(m):
                s.append((r[i]+r[i+1])%n)
                c += s[-1]==0
            r = s+[1]
            c += (n==1)<<1
        return int(c) # Chai Wah Wu, Aug 21 2025

Formula

a(p) = p-1, a(p^2) = p*(p-1) for p prime. Conjecture: a(p^k) = (p-1)*p^(k-1) for p prime. - Chai Wah Wu, Aug 21 2025

A387109 Number of entries in the n-th row of Pascal's triangle not divisible by 27.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 10, 20, 30, 19, 26, 33, 28, 32, 36, 25, 32, 39, 32, 37, 42, 39, 42, 45, 40, 44, 48, 45, 48, 51, 50, 52, 54, 19, 38, 57, 34, 47, 60, 49, 56, 63, 40, 53, 66, 51, 60
Offset: 0

Views

Author

Chai Wah Wu, Aug 16 2025

Keywords

Crossrefs

Programs

  • Python
    import re
    from gmpy2 import digits
    def A387109(n):
        s = digits(n,3)
        n1, n2, n10, n20, n21, n11 = s.count('1'), s.count('2'), s.count('10'), s.count('20'), s.count('21'), len(re.findall('(?=11)',s))
        n100, n110, n120, n101, n111, n121 = s.count('100'), s.count('110'), s.count('120'), len(re.findall('(?=101)',s)), len(re.findall('(?=111)',s)), len(re.findall('(?=121)',s))
        n200, n201, n210, n211, n220, n221 = s.count('200'), s.count('201'), s.count('210'), s.count('211'), s.count('220'), s.count('221')
        c = 144*n10+63*n11+128*(n20+n220)+80*n21+864*n100+216*(n101+n110)+54*n111+96*n120+24*n121+1152*n200+288*(n201+n210+1)+72*n211+32*n221
        c += (m:=4*n10+n11)*(96*n20+24*n21+9*m)+16*(4*n20+n21)**2
        return (c*3**n2<>5

A206425 Erroneous version of A227428.

Original entry on oeis.org

0, 0, 1, 0, 0, 2, 1, 2, 4, 0, 0, 2, 0, 0, 4, 2, 4, 8, 1, 2, 4, 2, 4, 8, 1, 2, 4, 2, 4, 8, 4, 8, 13, 0, 0, 2, 0, 0, 4, 2, 4, 8, 0, 0, 4, 0, 0, 8, 4, 8, 16, 2, 4, 8, 4, 8, 16, 8, 16, 26, 1, 2, 4, 2, 4, 8, 4, 8, 13, 2, 4, 8, 4, 8, 16, 8, 16, 26, 4, 8, 13, 8, 16, 26
Offset: 0

Views

Author

Marcus Jaiclin, Feb 07 2012

Keywords

Comments

A006047(n) = A206424(n) + a(n).

Examples

			Example: Rows 0-8 of Pascal's Triangle (mod 3) are:
1                   So a(0) = 0
1 1                 So a(1) = 0
1 2 1               So a(2) = 1
1 0 0 1                 .
1 1 0 1 1               .
1 2 1 1 2 1             .
1 0 0 2 0 0 1
1 1 0 2 2 0 1 1
1 2 1 2 1 2 1 2 1
		

Crossrefs

Programs

  • Mathematica
    Table[Count[Mod[Binomial[n, Range[0, n]], 3], 2], {n, 0, 99}] (* Alonso del Arte, Feb 07 2012 *)
Previous Showing 31-40 of 40 results.