%I #47 Jan 01 2023 04:09:17
%S 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 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 15,6,12,18,24,30,9,18,27,36,45,12,24,36,48,60,15,30
%N Number of entries in the n-th row of Pascal's triangle not divisible by 5.
%C 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 Also number of ones in row n of triangle A254609. - _Reinhard Zumkeller_, Feb 04 2015
%H Alois P. Heinz, <a href="/A194459/b194459.txt">Table of n, a(n) for n = 0..10000</a>
%F 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 a(n) = A194458(n) - A194458(n-1).
%e n = 32 = 112|_5: b(32,1) = 2, b(32,2) = 1, thus a(32) = 2^2 * 3^1 = 12.
%p a:= proc(n) local l, m, t;
%p m:= n;
%p l:= [0$5];
%p while m>0 do t:= irem(m, 5, 'm')+1; l[t]:=l[t]+1 od;
%p mul(r^l[r], r=2..5)
%p end:
%p seq(a(n), n=0..100);
%t 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 (Haskell)
%o a194459 = sum . map (signum . flip mod 5) . a007318_row
%o -- _Reinhard Zumkeller_, Feb 04 2015
%Y Cf. A006046, A001316 (for p=2).
%Y Cf. A006048, A006047 (for p=3).
%Y Cf. A194458 (for p=5).
%Y Cf. A007318, A254609.
%K nonn,look
%O 0,2
%A _Paul Weisenhorn_, Aug 24 2011
%E Edited by _Alois P. Heinz_, Sep 06 2011
|