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.

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

This page as a plain text file.
%I A194458 #52 Aug 13 2025 21:27:45
%S A194458 1,3,6,10,15,17,21,27,35,45,48,54,63,75,90,94,102,114,130,150,155,165,
%T A194458 180,200,225,227,231,237,245,255,259,267,279,295,315,321,333,351,375,
%U A194458 405,413,429,453,485,525,535,555,585,625,675,678,684,693,705,720,726
%N A194458 Total number of entries in rows 0,1,...,n of Pascal's triangle not divisible by 5.
%C A194458 The number of zeros in the first n rows is binomial(n+1,2) - a(n).
%H A194458 Alois P. Heinz, <a href="/A194458/b194458.txt">Table of n, a(n) for n = 0..10000</a>
%H A194458 Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, <a href="https://arxiv.org/abs/2210.10968">Identities and periodic oscillations of divide-and-conquer recurrences splitting at half</a>, arXiv:2210.10968 [cs.DS], 2022, p. 53.
%H A194458 Hsien-Kuei Hwang, Svante Janson, and Tsung-Hsi Tsai, <a href="https://arxiv.org/abs/2408.06817">Periodic minimum in the count of binomial coefficients not divisible by a prime</a>, arXiv:2408.06817 [math.NT], 2024. See p. 1.
%F A194458 a(n) = ((C(d0+1,2)*15^0*(d1+1) + C(d1+1,2)*15^1)*(d1+1) + C(d1+1,2)*15^1)*(d2+1) + C(d2+1,2)*15^2 ..., where d_k...d_1d_0 is the base 5 expansion of n+1 and 15 = binomial(5+1,2). The formula generalizes to other prime bases p.
%e A194458 n = 38: n+1 = 39 = 124_5, thus a(38) = (C(5,2)*15^0*3 + C(3,2)*15^1)*2 + C(2,2)*15^2 = (10*1*3 + 3*15)*2 + 1*225 = 375.
%p A194458 a:= proc(n) local l, m, h, j;
%p A194458       m:= n+1;
%p A194458       l:= [];
%p A194458       while m>0 do l:= [l[], irem (m, 5, 'm')+1] od;
%p A194458       h:= 0;
%p A194458       for j to nops(l) do h:= h*l[j] +binomial (l[j], 2) *15^(j-1) od:
%p A194458       h
%p A194458     end:
%p A194458 seq(a(n), n=0..100);
%t A194458 a[n_] := Module[{l, m, r, h, j}, m = n+1; l = {}; While[m>0, l = Append[l, {m, r} = QuotientRemainder[m, 5]; r+1]]; h = 0; For[j = 1, j <= Length[l], j++, h = h*l[[j]] + Binomial [l[[j]], 2] *15^(j-1)]; h]; Table [a[n], {n, 0, 100}] (* _Jean-François Alcover_, Feb 26 2017, translated from Maple *)
%o A194458 (Python)
%o A194458 from math import prod
%o A194458 from gmpy2 import digits
%o A194458 def A194458(n): return sum(prod(int(d)+1 for d in digits(m,5)) for m in range(n+1)) # _Chai Wah Wu_, Aug 10 2025
%o A194458 (Python)
%o A194458 from math import prod
%o A194458 from gmpy2 import digits
%o A194458 def A194458(n):
%o A194458     d = list(map(lambda x:int(x)+1,digits(n+1,5)[::-1]))
%o A194458     return sum((b-1)*prod(d[a:])*15**a for a, b in enumerate(d))>>1 # _Chai Wah Wu_, Aug 13 2025
%Y A194458 A006046(n+1) = A006046(n) + A001316(n) for p=2.
%Y A194458 A006048(n+1) = A006048(n) + A006047(n+1) for p=3.
%Y A194458 a(n+1) = a(n) + A194459(n+1) for p=5.
%K A194458 nonn
%O A194458 0,2
%A A194458 _Paul Weisenhorn_, Aug 24 2011
%E A194458 Edited by _Alois P. Heinz_, Sep 06 2011