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.

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

Original entry on oeis.org

1, 3, 6, 10, 15, 21, 28, 30, 34, 40, 48, 58, 70, 84, 87, 93, 102, 114, 129, 147, 168, 172, 180, 192, 208, 228, 252, 280, 285, 295, 310, 330, 355, 385, 420, 426, 438, 456, 480, 510, 546, 588, 595, 609, 630, 658, 693, 735, 784, 786, 790, 796, 804, 814, 826, 840, 844, 852, 864, 880, 900, 924, 952, 958, 970, 988, 1012, 1042, 1078
Offset: 0

Views

Author

N. J. A. Sloane, Apr 23 2025

Keywords

Comments

Partial sums of A382720. - James C. McMahon, Aug 15 2025

Crossrefs

Programs

  • Mathematica
    a[n_]:=(n^2+3n+2)/2-Count[Mod[Flatten[Table[Binomial[m, k], {m, 0,n}, {k, 0,m}]] ,7],0];Array[a,69,0] (* James C. McMahon, Aug 15 2025 *)
  • Python
    from math import prod
    from gmpy2 import digits
    def A382726(n): return sum(prod(int(d)+1 for d in digits(m,7)) for m in range(n+1)) # Chai Wah Wu, Aug 10 2025
    
  • Python
    from math import prod
    from gmpy2 import digits
    def A382726(n):
        d = list(map(lambda x:int(x)+1,digits(n+1,7)[::-1]))
        return sum((b-1)*prod(d[a:])*28**a for a, b in enumerate(d))>>1 # Chai Wah Wu, Aug 13 2025