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.

A163402 A Minkowski-type generalization of the factorial function: F(n,k) with k = 2.

Original entry on oeis.org

1, 1, 1, 3, 9, 135, 1215, 2835, 127575, 229635, 3444525, 1705039875, 107417512125, 13299311025, 4189282972875, 62839244593125, 188517733779375, 336504154796184375, 9085612179496978125, 2740105260483215625
Offset: 0

Views

Author

Peter Luschny, Jul 26 2009

Keywords

Comments

F(n,0) = n! (A000142)
F(n,1) = Minkowski(n)/n! (A163176)
F(n,2) = a(n)

Examples

			For n >= 0
F(n,0) 1, 1, 2, 6, 24, 120, 720, 5040, 40320, ...
F(n,1) 1, 1, 1, 4, 2, 48, 16, 576, 144, 3840, ...
F(n,2) 1, 1, 1, 3, 9, 135, 1215, 2835, 127575, ...
F(n,3) 1, 1, 1, 1, 1, 1, 1, 5, 1, 25, 5, 35, ...
F(n,4) 1, 1, 1, 1, 1, 5, 25, 175, 4375, 4375, ...
F(n,5) 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 49, ...
		

Crossrefs

Programs

  • Maple
    F := proc(n,k) local L,p,i;
    L := proc(n,u,r) local q,s,m; m:=n-r;
    q:=u-r; s:=0; do if q>m then break fi;
    s:=s+iquo(m,q); q:=q*u od; s end;
    mul(p^add((-1)^i*L(n,p,i),i=0..k),
    p = select(isprime,[$(k+1)..n]))^((-1)^k) end:
    a(n) := n -> F(n,2);
  • Mathematica
    F[n_, k_] := Module[{L, p, i}, L[n0_, u_, r_] := Module[{q, s, m}, m = n0-r; q = u-r; s = 0; While[True, If[q > m, Break[]]; s = s + Quotient[m, q]; q = q*u]; s]; Product[p^Sum[(-1)^i*L[n, p, i], {i, 0, k}], {p, Select[Range[k+1, n], PrimeQ]}]^((-1)^k)]; a[n_] := F[n, 2]; Table[a[n], {n, 0, 19}] (* Jean-François Alcover, Jan 15 2014, translated from Maple *)
  • Sage
    def A163402(n):
        def L(n, u, r):
            m = n - r; q = u - r
            s = 0
            while(q <= m):
                s += m//q
                q *= u
            return s
        P = filter(is_prime, [3..n])
        return mul(p^add((-1)^i*L(n, p, i) for i in (0..2)) for p in P)
    print([A163402(n) for n in range(20)]) # Peter Luschny, Mar 13 2016

Formula

P(n,k) = {p prime | k+1 <= p <= n }
L(n,p,r) = Sum_{i>=0} floor((n-r)/((p-r)*p^i))
A(n,k) = Prod_{p in P(n,k)} p^(Sum_{m=0..k} (-1)^m*L(n,p,m))
F(n,k) = A(n,k)^((-1)^k).