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.

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

This page as a plain text file.
%I A194459 #55 Jul 23 2025 18:40:49
%S A194459 1,2,3,4,5,2,4,6,8,10,3,6,9,12,15,4,8,12,16,20,5,10,15,20,25,2,4,6,8,
%T A194459 10,4,8,12,16,20,6,12,18,24,30,8,16,24,32,40,10,20,30,40,50,3,6,9,12,
%U A194459 15,6,12,18,24,30,9,18,27,36,45,12,24,36,48,60,15,30
%N A194459 Number of entries in the n-th row of Pascal's triangle not divisible by 5.
%C A194459 Pascal triangles modulo p with p prime have the dimension D = log(p*(p+1)/2)/log(p). [Corrected by _Connor Lane_, Nov 28 2022]
%C A194459 Also number of ones in row n of triangle A254609. - _Reinhard Zumkeller_, Feb 04 2015
%H A194459 Alois P. Heinz, <a href="/A194459/b194459.txt">Table of n, a(n) for n = 0..10000</a>
%H A194459 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.
%F A194459 a(n) = Product_{d=1..4} (d+1)^b(n,d) with b(n,d) = number of digits d in base 5 expansion of n. The formula generalizes to other prime bases p.
%F A194459 a(n) = A194458(n) - A194458(n-1).
%e A194459 n = 32 = 112|_5: b(32,1) = 2, b(32,2) = 1, thus a(32) = 2^2 * 3^1 = 12.
%p A194459 a:= proc(n) local l, m, t;
%p A194459       m:= n;
%p A194459       l:= [0$5];
%p A194459       while m>0 do t:= irem(m, 5, 'm')+1; l[t]:=l[t]+1 od;
%p A194459       mul(r^l[r], r=2..5)
%p A194459     end:
%p A194459 seq(a(n), n=0..100);
%t A194459 Nest[Join[#, 2#, 3#, 4#, 5#]&, {1}, 4] (* _Jean-François Alcover_, Apr 12 2017, after code by _Robert G. Wilson v_ in A006047 *)
%o A194459 (Haskell)
%o A194459 a194459 = sum . map (signum . flip mod 5) . a007318_row
%o A194459 -- _Reinhard Zumkeller_, Feb 04 2015
%o A194459 (Python)
%o A194459 from math import prod
%o A194459 from sympy.ntheory import digits
%o A194459 def A194459(n):
%o A194459     s = digits(n,5)[1:]
%o A194459     return prod((d+1)**s.count(d) for d in range(1,5)) # _Chai Wah Wu_, Jul 23 2025
%Y A194459 Cf. A006046, A001316 (for p=2).
%Y A194459 Cf. A006048, A006047 (for p=3).
%Y A194459 Cf. A194458 (for p=5).
%Y A194459 Cf. A007318, A254609.
%K A194459 nonn,look
%O A194459 0,2
%A A194459 _Paul Weisenhorn_, Aug 24 2011
%E A194459 Edited by _Alois P. Heinz_, Sep 06 2011