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.

User: Chai Wah Wu

Chai Wah Wu's wiki page.

Chai Wah Wu has authored 419 sequences. Here are the ten most recent ones:

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

Author

Chai Wah Wu, Aug 15 2025

Keywords

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

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

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 9, 18, 15, 20, 17, 22, 21, 24, 21, 26, 25, 28, 27, 30, 30, 32, 9, 18, 23, 36, 21, 30, 33, 40, 25, 34, 35, 44, 37, 42, 44, 48, 21, 42, 37, 52, 37, 50, 48, 56, 43, 54, 52, 60, 54, 60, 60, 64, 9, 18, 23, 36, 29
Offset: 0

Author

Chai Wah Wu, Aug 15 2025

Keywords

Programs

  • Python
    def A387050(n):
        n1 = n>>1
        n2 = n1>>1
        n3 = n2>>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 = (n3&k2).bit_count(), ((k2>>1)&np).bit_count(), ((k1>>2)&k1).bit_count(), (n3&k3).bit_count()
        return n10*(n10*(n10+3)+6*((n100<<2)+n110)+20)//6+((n1000<<2)+n100+n1010+n1100<<2)+n110+n1110+8<>3

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

Author

Chai Wah Wu, Aug 16 2025

Keywords

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

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

Author

Chai Wah Wu, Aug 16 2025

Keywords

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

A386953 Total number of entries in rows 0,1,...,n of Pascal's triangle not divisible by 9.

Original entry on oeis.org

1, 3, 6, 10, 15, 21, 28, 36, 45, 49, 57, 69, 78, 90, 105, 119, 135, 153, 160, 174, 195, 209, 228, 252, 273, 297, 324, 328, 336, 348, 360, 378, 402, 422, 450, 486, 495, 513, 540, 560, 588, 624, 655, 693, 738, 752, 780, 822, 850, 888, 936, 978, 1026, 1080, 1087
Offset: 0

Author

Chai Wah Wu, Aug 10 2025

Keywords

Crossrefs

Programs

  • Python
    import re
    from gmpy2 import digits
    def A386953(n):
        c = 0
        for m in range(n+1):
            s = digits(m,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')
            c += ((3*((1+n01<<2)+n11)+((n02<<2)+n12<<2))*3**n2<>2
        return c

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

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 4, 8, 12, 9, 12, 15, 14, 16, 18, 7, 14, 21, 14, 19, 24, 21, 24, 27, 4, 8, 12, 12, 18, 24, 20, 28, 36, 9, 18, 27, 20, 28, 36, 31, 38, 45, 14, 28, 42, 28, 38, 48, 42, 48, 54, 7, 14, 21, 20, 31, 42, 33, 48, 63, 14, 28, 42, 31, 44, 57, 48
Offset: 0

Author

Chai Wah Wu, Aug 10 2025

Keywords

Crossrefs

Programs

  • Python
    import re
    from gmpy2 import digits
    def A386952(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 ((3*((1+n01<<2)+n11)+((n02<<2)+n12<<2))*3**n2<>2

A386858 a(n) = floor(5*n^2/8).

Original entry on oeis.org

0, 2, 5, 10, 15, 22, 30, 40, 50, 62, 75, 90, 105, 122, 140, 160, 180, 202, 225, 250, 275, 302, 330, 360, 390, 422, 455, 490, 525, 562, 600, 640, 680, 722, 765, 810, 855, 902, 950, 1000, 1050, 1102, 1155, 1210, 1265, 1322, 1380, 1440, 1500, 1562, 1625, 1690, 1755
Offset: 1

Author

Chai Wah Wu, Aug 05 2025

Keywords

Crossrefs

Programs

Formula

a(2n) = A032526(n).
a(2n+1) = A028895(n).
a(n) = 2*a(n-1) - a(n-2) + a(n-4) - 2*a(n-5) + a(n-6) for n > 6.
G.f.: -x^2*(2*x^2 + x + 2)/((x - 1)^3*(x + 1)*(x^2 + 1)).
Sum_{n>=2} 1/a(n) = 2/5 + Pi^2/60 + tan(Pi/(2*sqrt(5)))*Pi/(2*sqrt(5)). - Amiram Eldar, Aug 15 2025

A386851 a(n) = floor(5*n^2/6).

Original entry on oeis.org

0, 3, 7, 13, 20, 30, 40, 53, 67, 83, 100, 120, 140, 163, 187, 213, 240, 270, 300, 333, 367, 403, 440, 480, 520, 563, 607, 653, 700, 750, 800, 853, 907, 963, 1020, 1080, 1140, 1203, 1267, 1333, 1400, 1470, 1540, 1613, 1687, 1763, 1840, 1920, 2000, 2083, 2167, 2253
Offset: 1

Author

Chai Wah Wu, Aug 05 2025

Keywords

Crossrefs

Cf. A227347 (partial sums), A330451.

Programs

  • Mathematica
    a[n_]:=Floor[5n^2/6];Array[a,52] (* or *)  Rest[CoefficientList[Series[-x^2*(3*x^2 + 4*x + 3)/((x - 1)^3*(x + 1)*(x^2 + x + 1)),{x,0,52}],x]] (* or *) LinearRecurrence[{1,1,0,-1,-1,1},{0, 3, 7, 13, 20, 30, 40},52] (* James C. McMahon, Aug 12 2025 *)
  • Python
    def A386851(n): return 5*n**2//6

Formula

a(n) = A227347(n)-A227347(n-1) for n>1.
a(n) = a(n-1) + a(n-2) - a(n-4) - a(n-5) + a(n-6) for n > 6.
a(2n) = A330451(n).
G.f.: -x^2*(3*x^2 + 4*x + 3)/((x - 1)^3*(x + 1)*(x^2 + x + 1)).

A385683 Complement of A030511.

Original entry on oeis.org

1, 3, 4, 5, 7, 8, 9, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76
Offset: 1

Author

Chai Wah Wu, Aug 04 2025

Keywords

Comments

Positive numbers not of the form floor(2*k^2/3).

Crossrefs

Cf. A030511.

Programs

  • Mathematica
    m[n_]:=Floor[Sqrt[3(n-1)/2]];a[n_]:=If[n+m[n]>Floor[2(m[n]+1)^2/3],n+m[n],n+m[n]-1];Array[a,67] (* James C. McMahon, Aug 06 2025 *)
  • Python
    from math import isqrt
    def A385683(n): return n+(m:=isqrt(3*(n-1)>>1))-(n+m<=((m+1)**2<<1)//3)

Formula

a(n) = n+m if n+m>floor(2*(m+1)^2/3) and a(n) = n+m-1 otherwise where m = floor(sqrt(3*(n-1)/2)).

A385704 Complement of A184535.

Original entry on oeis.org

3, 4, 6, 7, 8, 10, 11, 12, 13, 14, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 78
Offset: 1

Author

Chai Wah Wu, Aug 04 2025

Keywords

Comments

Numbers > 1 not of the form floor(3*k^2/5).

Crossrefs

Cf. A184535.

Programs

  • Mathematica
    m[n_]:=Floor[Sqrt[5n/3]];a[n_]:=If[n+m[n]>=Floor[3(m[n]+1)^2/5],n+m[n]+1,n+m[n]];Array[a,67] (* James C. McMahon, Aug 06 2025 *)
  • Python
    from math import isqrt
    def A385704(n): return n+(m:=isqrt(5*n//3))+(n+m>=3*(m+1)**2//5)

Formula

a(n) = n+m+1 if n+m>=floor(3*(m+1)^2/5) and a(n) = n+m otherwise where m = floor(sqrt(5*n/3)).