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.

A238002 Count with multiplicity of prime factors of n in (n - 1)!.

This page as a plain text file.
%I A238002 #29 Jan 23 2016 16:12:05
%S A238002 0,0,1,0,4,0,4,2,8,0,12,0,11,7,11,0,21,0,19,10,19,0,28,4,23,10,26,0,
%T A238002 44,0,26,16,32,11,47,0,35,19,43,0,61,0,42,28,42,0,63,6,56,24,50,0,72,
%U A238002 16,58,28,54,0,94,0,57,37,57,18,98,0,67,33,91,0,99,0,71,50,74,17,113,0,92
%N A238002 Count with multiplicity of prime factors of n in (n - 1)!.
%H A238002 Alois P. Heinz, <a href="/A238002/b238002.txt">Table of n, a(n) for n = 2..10000</a>
%F A238002 a(p) = 0 for p prime.
%F A238002 a(2n) > a(2n + 1) for all n > 2.
%e A238002 a(4) = 1 because 3! = 6 = 2 * 3, which has one prime factor (2) in common with 4.
%e A238002 a(5) = 0 because gcd(4!, 5) = 1.
%e A238002 a(6) = 4 because 5! = 120 = 2^3 * 3 * 5, which has four factors (2 thrice and 3 once) in common with 6.
%p A238002 with(numtheory):
%p A238002 a:= n-> add(add(`if`(i[1] in factorset(n), i[2], 0),
%p A238002         i=ifactors(j)[2]), j=1..n-1):
%p A238002 seq(a(n), n=2..100);  # _Alois P. Heinz_, Mar 17 2014
%t A238002 cmpf[n_]:=Count[Flatten[Table[#[[1]],{#[[2]]}]&/@FactorInteger[ (n-1)!]], _?( MemberQ[Transpose[FactorInteger[n]][[1]],#]&)]; Array[cmpf,80] (* _Harvey P. Dale_, Jan 23 2016 *)
%o A238002 (Sage)
%o A238002 m=100 # change n for more terms
%o A238002 [sum(valuation(factorial(n-1),p) for p in prime_divisors(n) if p in prime_divisors(factorial(n-1))) for n in [2..m]] # _Tom Edgar_, Mar 14 2014
%o A238002 (PARI) a(n) = {nm = (n-1)!; fn = factor(n); sum (i=1, #fn~, valuation(nm, fn[i,1]));} \\ _Michel Marcus_, Mar 15 2014
%Y A238002 Cf. A061006, A181569, A226198, A022559.
%K A238002 nonn,easy
%O A238002 2,5
%A A238002 _Alonso del Arte_, Feb 16 2014