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.

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

Views

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