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.

Previous Showing 11-20 of 2943 results. Next

A152656 Triangle read by rows: denominators of polynomials from A000142: P(0,x) = 1, P(n,x) = 1/n! + x*Sum_{i=0..n-1} P(n-i-1)/i!. Numerators are A152650.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 6, 1, 1, 1, 24, 3, 2, 1, 1, 120, 3, 2, 1, 1, 1, 720, 15, 8, 3, 2, 1, 1, 5040, 45, 40, 3, 6, 1, 1, 1, 40320, 315, 80, 15, 24, 1, 2, 1, 1, 362880, 315, 560, 45, 24, 1, 6, 1, 1, 1, 3628800, 2835, 4480, 315, 144, 5, 24, 3, 2, 1, 1
Offset: 0

Views

Author

Paul Curtz, Dec 10 2008

Keywords

Comments

a(n) is the last sequence of a trio with, first, A141412 and, second, A142048 (denominators).

Examples

			Contribution from _Vincenzo Librandi_, Dec 16 2012: (Start)
Triangle begins:
        1,
        1,    1,
        2,    1,    1,
        6,    1,    1,   1,
       24,    3,    2,   1,   1,
      120,    3,    2,   1,   1, 1,
      720,   15,    8,   3,   2, 1,  1,
     5040,   45,   40,   3,   6, 1,  1, 1,
    40320,  315,   80,  15,  24, 1,  2, 1, 1,
   362880,  315,  560,  45,  24, 1,  6, 1, 1, 1,
  3628800, 2835, 4480, 315, 144, 5, 24, 3, 2, 1, 1,
  ...
First column: A000142; second column: A049606. (End)
		

Crossrefs

Programs

  • Mathematica
    ClearAll[u, p]; u[n_] := 1/n!; p[0][x_] := u[0]; p[n_][x_] := p[n][x] = u[n] + x*Sum[u[i]*p[n-i-1][x] , {i, 0, n-1}] // Expand; row[n_] := CoefficientList[p[n][x], x]; Table[row[n], {n, 0, 10}] // Flatten // Denominator (* Jean-François Alcover, Oct 02 2012 *)

Extensions

More terms from Jean-François Alcover, Oct 02 2012

A081401 Pseudologarithm (A056239) of n!: a(n) = A056239(A000142(n)).

Original entry on oeis.org

0, 1, 3, 5, 8, 11, 15, 18, 22, 26, 31, 35, 41, 46, 51, 55, 62, 67, 75, 80, 86, 92, 101, 106, 112, 119, 125, 131, 141, 147, 158, 163, 170, 178, 185, 191, 203, 212, 220, 226, 239, 246, 260, 267, 274, 284, 299, 305, 313, 320, 329, 337, 353, 360, 368, 375, 385, 396, 413
Offset: 1

Views

Author

Labos Elemer, Mar 31 2003

Keywords

Comments

As A056239 is fully additive sequence, this sequence gives its partial sums. - Antti Karttunen, Jun 28 2020

Examples

			n=8: 8! = 40320 = 2*2*2*2*2*2*2*3*3*5*7, p-indices = {1,2,3,4}, exponents = {7,2,1,1}; a(8) = 1*7 + 2*2 + 3*1 + 4*1 = 7 + 4 + 3 + 4 = 18.
		

Crossrefs

Cf. also A335860.

Programs

  • Maple
    a:= n-> add (numtheory[pi](i[1])*i[2], i=ifactors(n!)[2]):
    seq (a(n), n=1..100);  # Alois P. Heinz, Aug 09 2012
  • Mathematica
    Array[Total[FactorInteger[#!] /. {p_, c_} /; p > 0 :> PrimePi[p] c] &, 59] (* Michael De Vlieger, Jun 26 2020 *)

Formula

a(n) = Sum(k*e(k)) where k runs through indices of prime factors of n!, while e(k) is the exponent of the corresponding prime factor.

A230961 Boustrophedon transform of factorials beginning with 1, cf. A000142.

Original entry on oeis.org

1, 3, 11, 50, 273, 1746, 12823, 106462, 986689, 10103074, 113309991, 1381835454, 18209834849, 257911743506, 3907538236631, 63066584719982, 1080340925760129, 19577690297352258, 374214932301757255, 7524626434657416286, 158783753482817132065
Offset: 0

Views

Author

Reinhard Zumkeller, Nov 05 2013

Keywords

Crossrefs

Cf. A230960.

Programs

  • Haskell
    a230961 n = sum $ zipWith (*) (a109449_row n) $ tail a000142_list
    
  • Mathematica
    T[n_, k_] := (n!/k!) SeriesCoefficient[(1 + Sin[x])/Cos[x], {x, 0, n - k}];
    a[n_] := Sum[T[n, k] (k + 1)!, {k, 0, n}];
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jul 23 2019 *)
  • Python
    from itertools import accumulate, count, islice
    def A230961_gen(): # generator of terms
        blist, m = tuple(), 1
        for i in count(1):
            yield (blist := tuple(accumulate(reversed(blist),initial=(m := m*i))))[-1]
    A230961_list = list(islice(A230961_gen(),40)) # Chai Wah Wu, Jun 12 2022

Formula

a(n) = sum(A109449(n,k)*A000142(k+1): k=0..n).
E.g.f.: conjecture: (tan(x)+sec(x))/(1-2*x+x^2) = (1- 12*x/ (Q(0)+6*x+3*x^2))/(1-x)^2, where Q(k) = 2*(4*k+1)*(32*k^2+16*k - x^2-6) - x^4*(4*k-1)*(4*k+7)/Q(k+1) ; (continued fraction). - Sergei N. Gladkovskii, Nov 18 2013
a(n) ~ n! * n * (1+sin(1))/cos(1). - Vaclav Kotesovec, Jun 12 2015

A082083 a(n)=A082081[n! ]=A082081[A000142[n]] Fixed points of iterated A008475 function initiated at factorials as initial values.

Original entry on oeis.org

0, 2, 5, 11, 16, 7, 37, 149, 7, 27, 11, 11, 23, 2389, 49, 11, 31, 19, 67, 109, 13, 8, 25, 8, 461, 179, 1319, 9, 193, 16, 7, 4931, 121, 7, 9, 8, 7, 8, 2895630887, 25, 19, 13, 19, 41, 2209493509721, 32, 5939, 23, 43, 11
Offset: 1

Views

Author

Labos Elemer, Apr 08 2003

Keywords

Examples

			Fixed point is always a prime or a true power of prime:
a term from A000961.
n=20!=2432902008176640000, a(20)=109 because
fixed point list={2432902008176640000,269439,214,109}}
		

Crossrefs

Programs

  • Mathematica
    ffi[x_] := Flatten[FactorInteger[x]] lf[x_] := Length[FactorInteger[x]] ba[x_] := Table[Part[ffi[x], 2*w-1], {w, 1, lf[x]}] ep[x_] := Table[Part[ffi[x], 2*w], {w, 1, lf[x]}] sex[x_] := Apply[Plus, ba[x]^ep[x]] Table[FixedPoint[sex, w! ], {w, 1, 128}]

A108552 Integer values of (1*2*...*k)/(1+2+...+k) = k!/T(k) = A000142(k)/A000217(k), k>=1.

Original entry on oeis.org

1, 1, 8, 180, 1120, 8064, 604800, 68428800, 830269440, 10897286400, 2324754432000, 640237370572800, 11585247657984000, 221172909834240000, 93666727314800640000, 2068161339110798131200, 47726800133326110720000, 1148978521728221184000000, 28806532937614688256000000
Offset: 1

Views

Author

Rick L. Shepherd, Jun 09 2005

Keywords

Comments

A000142(n)/A000217(n) = n!/(n*(n+1)/2) = 2*(n-1)!/(n+1) is an integer iff n = 1 or n + 1 is composite; i.e., iff n is a term of A060462.

Crossrefs

Cf. A060462 (corresponding k), A000142 (factorials), A000217 (triangular numbers).

Programs

  • Maple
    select(x-> denom(x)=1, [k!/(k*(k+1)/2)$k=1..30])[];  # Alois P. Heinz, Dec 11 2020
  • Mathematica
    Select[Table[(n - 1)!/((n (n - 1))/2), {n, 2, 50}], IntegerQ[#] &] (* Geoffrey Critzer, May 02 2015 *)
  • PARI
    for(n=1,50, r=2*(n-1)!/(n+1); if(denominator(r)==1, print1(r,",")))

Formula

a(m) = 2*(A060462(m)-1)!/(A060462(m)+1) = A000142(A060462(m))/A000217(A060462(m)).

Extensions

Offset corrected by Alois P. Heinz, Dec 11 2020

A139004 Number of operations A000142 (i.e., x!) or A000196 (i.e., floor(sqrt(x))) needed to get n, starting with 4.

Original entry on oeis.org

2, 1, 10, 0, 7, 11, 24, 27, 29, 9, 36, 40, 36, 17, 37, 31, 22, 31, 37, 42, 19, 37, 21, 1, 26, 13, 51, 41, 36, 6, 30, 41, 44, 33, 16, 33, 31, 64, 35, 50, 25, 43, 12, 18, 41, 18, 42, 55, 39, 23, 71, 65, 45, 43, 52, 39, 49, 44, 51, 60, 57, 59, 24, 66, 26, 36, 46, 51, 46, 26, 48, 76
Offset: 1

Views

Author

M. F. Hasler, Apr 09 2008

Keywords

Comments

Knuth conjectured that any number can be obtained in this way, starting from 4.
This sequence gives the minimal number of operations needed to do so.
To ensure the sequence is well-defined, define a(n)=-1 if it is not possible to get n in the given way.
If we are allowed to use tan(x) just once, then a single 2 is enough to get any positive integer, if Knuth's conjecture that one 4 is enough is true. From 2, (((-tan(2.))!)!)! = 5.592..., then floor, factorial gets 120, then sqrt, sqrt gives 3.162..., and floor gives 3, or negate, floor, negate gives 4. - N. J. A. Sloane, Feb 26 2025
The article by Bendersky is relevant because it gives an explicit formula for n using four 2's (and some logs). Good illustration of techniques. - N. J. A. Sloane, Feb 26 2025

Examples

			Representing the operation x -> floor(sqrt(x)) by "s" and x -> x! by "f", we have:
a(1) = 2 since 1 = ss4 is clearly the shortest way to obtain 1, starting with 4.
a(2) = 1 since 2 = s4 is clearly the shortest way to obtain 2, starting with 4.
a(4) = 0 since no operation is required to get 4.
a(3) = 10 = 3+a(5) since 3 = ssf5 and it cannot be obtained from 4 with fewer operations.
a(5) = 7 since 5 = sssssff4.
a(6) = 11 = 1+a(3) since 6 = f3. a(10) = 9 since 10 = sfsssssff4 is the shortest way to obtain 9, starting with 4.
		

Crossrefs

Programs

  • PARI
    A139004( n, S=Set(4), LIM=10^4 )={ for( i=0,LIM, setsearch( S, n) & return(i); S=setunion( S, setunion( Set( vector( #S, j, sqrtint(eval(S[j])))), Set( vector( #S, j, if( LIM > j=eval(S[j]), j!))))))}
    
  • PARI
    { search(x,r,l=0) = local(ll,xx); ll=l; xx=x; while(llMax Alekseyev, Nov 01 2008

Formula

a(4) = 0, a(n) = min { a(k)+1 ; n^2 <= k < (n+1)^2 or k! = n }

Extensions

a(7)-a(9) from Max Alekseyev, Oct 17, Nov 01 2008
More terms from Jon E. Schoenfield, Nov 10 2008

A240993 A000142 (n+1) * A002109(n), a product of factorials and hyperfactorials.

Original entry on oeis.org

1, 2, 24, 2592, 3317760, 62208000000, 20316635136000000, 133852981198454784000000, 20211123400293732996612096000000, 78302033109811407811828935756349440000000, 8613223642079254859301182933198438400000000000000000
Offset: 0

Views

Author

Reinhard Zumkeller, Aug 31 2014

Keywords

Comments

a(n+1) / a(n) = A055897(n+2);
row products of the triangle A245334.

Crossrefs

Programs

  • Haskell
    a240993 n = a000142 (n + 1) * a002109 n
  • Mathematica
    Table[(n+1)!*Hyperfactorial[n], {n, 0, 10}] (* Vaclav Kotesovec, Nov 14 2014 *)
    Table[(n+1)*(n!)^(n+1)/BarnesG[n+1], {n, 0, 10}] (* Vaclav Kotesovec, Nov 14 2014 *)

Formula

a(n) ~ A * sqrt(2*Pi) * n^(n^2/2+3*n/2+19/12) / exp(n*(n+4)/4), where A = 1.2824271291... is the Glaisher-Kinkelin constant (see A074962). - Vaclav Kotesovec, Nov 14 2014

A353969 Lexicographically earliest sequence of distinct positive integers with no finite subset summing to a factorial number (A000142).

Original entry on oeis.org

3, 4, 5, 7, 11, 18, 22, 23, 25, 26, 96, 103, 107, 114, 118, 158, 600, 696, 703, 707, 714, 718, 782, 4320, 4920, 5016, 5023, 5027, 5034, 5038, 5222, 35280, 39600, 40200, 40296, 40303, 40307, 40314, 40318, 41222, 322560, 357840, 362160, 362760, 362856, 362863
Offset: 1

Views

Author

Rémy Sigrist, May 12 2022

Keywords

Comments

The sequence is well defined:
- a(1) = 3,
- for n > 0, let k be such that A000142(k) + 1 + a(1) + ... + a(n) < A000142(k+1),
- then a(n+1) <= A000142(k) + 1.

Crossrefs

See A353889 for similar sequences.

A072480 Shadow transform of factorials A000142.

Original entry on oeis.org

0, 1, 0, 0, 0, 0, 3, 0, 4, 3, 5, 0, 8, 0, 7, 10, 10, 0, 12, 0, 15, 14, 11, 0, 20, 15, 13, 18, 21, 0, 25, 0, 24, 22, 17, 28, 30, 0, 19, 26, 35, 0, 35, 0, 33, 39, 23, 0, 42, 35, 40, 34, 39, 0, 45, 44, 49, 38, 29, 0, 55, 0, 31, 56, 56, 52, 55, 0, 51, 46, 63, 0, 66, 0, 37, 65, 57, 66, 65
Offset: 0

Views

Author

N. J. A. Sloane and Vladeta Jovovic, Aug 02 2002

Keywords

Comments

For n > 1, a(n) is the number of solutions (n,k) of k! = n! (mod n) where 1 <= k < n. - Clark Kimberling, Feb 11 2012
For n > 1, a(n) is the smallest number k such that n divides (n - k)! but not (n - k - 1)!. - Jianing Song, Aug 29 2018

Crossrefs

Programs

  • Maple
    a:= n-> add(`if`(modp(j!, n)=0, 1, 0), j=0..n-1):
    seq(a(n), n=0..120);  # Alois P. Heinz, Sep 16 2019
  • Mathematica
    s[k_] := k!;
    f[n_, k_] := If[Mod[s[n] - s[k], n] == 0, 1, 0];
    t[n_] := Flatten[Table[f[n, k], {k, 1, n - 1}]]
    a[n_] := Count[Flatten[t[n]], 1]
    Table[a[n], {n, 2, 420}] (* A072480 *)
    Flatten[Position[%, 0]]  (* A006093, primes-1 *)
    (* Agrees with A072480 for n > 1, from Clark Kimberling, Feb 12 2012 *)
  • PARI
    A002034(n) = if(1==n,n,my(s=factor(n)[, 1], k=s[#s], f=Mod(k!, n)); while(f, f*=k++); (k)); \\ From A002034
    A072480(n) = if(n<2,n,(n-A002034(n))); \\ Antti Karttunen, Oct 01 2018

Formula

For n > 1, a(n) = n - A002034(n).

A101751 Table (read by rows) giving the coefficients of sum formulas of n-th Factorials (A000142). The k-th row (k>=1, n>=2) contains T(i,k) for i=1 to k+1, where k=[2*n+1+(-1)^(n-1)]/4 and T(i,k) satisfies Fact(n) = Sum_{i=1..k+1} T(i,k) * (n-1)^(k-i+1) / (2*k-2)!.

Original entry on oeis.org

1, 0, 1, 3, -6, 32, 264, -2024, 2400, 3420, 55800, -666540, 909720, 2570400, 90440, 13101144, 72406040, -3757930680, 13117344800, 72965762016, -261763004160
Offset: 1

Views

Author

André F. Labossière, Dec 17 2004

Keywords

Examples

			Fact(8) = 5040; substituting n=8 in the formula of the k-th row we obtain k=4 and the coefficients
T(i,4) will be the following: 3420,55800,-666540,909720,2570400, => Fact(8) = [ 3420*7^4 +55800*7^3 -666540*7^2 +909720*7 +2570400 ]/6! = 7! =5040.
		

Crossrefs

Previous Showing 11-20 of 2943 results. Next