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.

A293902 If n = p_1^e_1 * ... * p_k^e_k, p_1, ..., p_k primes, then a(n) = Product c! where c ranges over products of all combinations of exponents e_1, ..., e_k as {e_1, e_1*e_2, e_1*e_3, e_2*e_3, e_1*e_2*e_3, ..., e_1*e_2*...*e_k}.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 1, 6, 2, 1, 1, 4, 1, 1, 1, 24, 1, 4, 1, 4, 1, 1, 1, 36, 2, 1, 6, 4, 1, 1, 1, 120, 1, 1, 1, 96, 1, 1, 1, 36, 1, 1, 1, 4, 4, 1, 1, 576, 2, 4, 1, 4, 1, 36, 1, 36, 1, 1, 1, 16, 1, 1, 4, 720, 1, 1, 1, 4, 1, 1, 1, 8640, 1, 1, 4, 4, 1, 1, 1, 576, 24, 1, 1, 16, 1, 1, 1, 36, 1, 16, 1, 4, 1, 1, 1, 14400, 1, 4, 4, 96, 1, 1, 1, 36, 1
Offset: 1

Views

Author

Antti Karttunen, Oct 22 2017

Keywords

Comments

a(1) = 1 (an empty product).

Examples

			For n = 36 = 2^2 * 3^2 the combinations of the exponents are [], [2] (as exponent of 2), [2] (as exponent of 3) and [2, 2]. Taking products of these multisets we get 1 (as an empty product), 2, 2 and 4. Thus a(36) = 1! * 2! * 2! * 4! = 1*2*2*24 = 96.
For n = 72 = 2^3 * 3^2 the combinations of the exponents are [], [2], [3] and [2, 3]. Taking products of these multisets we get 1, 2, 3 and 6. Thus a(72) = 1! * 2! * 3! * 6! = 1*2*6*720 = 8640.
		

Crossrefs

Programs

  • Mathematica
    Array[Apply[Times, Map[Times @@ # &, Subsets@ FactorInteger[#][[All, -1]]]!] &, 105] (* Michael De Vlieger, Oct 23 2017 *)
  • PARI
    A293902(n) = { my(exp_combos=powerset(factor(n)[, 2]), m=1); for(i=1,#exp_combos,m *= vecproduct(exp_combos[i])!); m; };
    vecproduct(v) = { my(m=1); for(i=1,#v,m *= v[i]); m; };
    powerset(v) = { my(siz=2^length(v),pv=vector(siz)); for(i=0,siz-1,pv[i+1] = choosebybits(v,i)); pv; };
    choosebybits(v,m) = { my(s=vector(hammingweight(m)),i=j=1); while(m>0,if(m%2,s[j] = v[i];j++); i++; m >>= 1); s; };
    
  • Scheme
    (define (A293902 n) (if (= 1 n) n (/ (A163820 n) (A293900 n))))

Formula

For n = p^k * q * ... * r (with only one of the prime factors occurring multiple times), a(n) = A000142(k)^(2^(A001221(n)-1)).
a(p^n) = A000142(n), for any prime p.
For n > 1, a(n) = A163820(n) / A293900(n).