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.

Showing 1-5 of 5 results.

A046654 Nearest integer to Sum_{k=1..n} log(k) = log(n!).

Original entry on oeis.org

0, 0, 1, 2, 3, 5, 7, 9, 11, 13, 15, 18, 20, 23, 25, 28, 31, 34, 36, 39, 42, 45, 48, 52, 55, 58, 61, 65, 68, 71, 75, 78, 82, 85, 89, 92, 96, 99, 103, 107, 110, 114, 118, 122, 125, 129, 133, 137, 141, 145, 148, 152, 156, 160, 164, 168, 172, 176, 180
Offset: 0

Views

Author

N. J. A. Sloane, Dec 27 1999

Keywords

Comments

a(n) is also the nearest integer to log(n!). - Eric M. Schmidt, Jun 19 2015
Log(n!) is asymptotic to A275341. - Mats Granvik, Aug 02 2016
Stirling's approximation s(n) = n*log(n) - n + log(2*Pi*n)/2 is known to be equal to log(n!) up to an error between 1/(12n + 1) and 1/12n. For all 0 < n < 10^6 except for n = 11, round(s(n)) = a(n). What is the next such exceptional index n? - M. F. Hasler, Dec 03 2018

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, Section 22.1.

Crossrefs

Cf. A025201.

Programs

  • Magma
    [Round(Log(Factorial(n))): n in [2..100]]; // Vincenzo Librandi, Jun 19 2015
    
  • Mathematica
    nn = 58; t = Accumulate[Log /@ Range[nn]]; Table[If[(y = Ceiling[x = t[[i]]]) - x <= x - (z = Floor[x]), a = y, a = z]; a, {i, nn}] (* Jayanta Basu, Jun 27 2013 *)
  • PARI
    A046654(n)=round(lngamma(n+1)) \\ M. F. Hasler, Dec 03 2018

Formula

a(n) = n*log(n) - n + O(log(n)). - Arkadiusz Wesolowski, Oct 18 2013
a(n) = round(LogGamma(n + 1)). - Mats Granvik, Roger L. Bagula, Aug 06 2016
a(n) = round(log(Product_{k=1..n} A139547(n,k))). - Mats Granvik, Aug 07 2016

Extensions

Name edited and a(0) = 0 prepended by M. F. Hasler, Dec 03 2018

A138618 Triangle of exponentials of Mangoldt function M(n) read by rows, in which row products give the natural numbers.

Original entry on oeis.org

1, 2, 1, 3, 1, 1, 2, 2, 1, 1, 5, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 2, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Mats Granvik, May 14 2008

Keywords

Comments

Row sums are A001414. This table is similar to A139547 and A120885.
Cumulative column products are A003418, A139550, A139552, A139554.

Examples

			1 = 1
2*1 = 2
3*1*1 = 3
2*2*1*1 = 4
5*1*1*1*1 = 5
1*3*2*1*1*1 = 6
7*1*1*1*1*1*1 = 7
2*2*1*2*1*1*1*1 = 8
3*1*3*1*1*1*1*1*1 = 9
1*5*1*1*2*1*1*1*1*1 = 10
11*1*1*1*1*1*1*1*1*1*1 = 11
1*1*2*3*1*2*1*1*1*1*1*1 = 12
13*1*1*1*1*1*1*1*1*1*1*1*1 = 13
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Table[If[Mod[n, k] == 0, Exp[MangoldtLambda[n/k]], 1], {k, 1, n}], {n, 1, 14}]] (* Mats Granvik, May 23 2013 *)
  • PARI
    M(n) = ispower(n, , &n); if(isprime(n), n, 1); \\ A014963
    T(n,k) = if (n % k, 1, M(n/k));
    row(n) = vector(n, k, T(n,k)); \\ Michel Marcus, Mar 03 2023

Formula

T(n,k) = A014963(n/k) if n mod k = 0, otherwise 1. - Mats Granvik, May 23 2013

A139553 Triangle read by rows: T(n,k) = if n>=4*k and n<4*k*A014963(k) then k else 1; T(n,0)=1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Mats Granvik, Apr 27 2008

Keywords

Comments

Row products give A139554.

Examples

			Row products of the triangle are:
1 = 1
1*1 = 1
1*1*1 = 1
1*1*1*1 = 1
1*1*1*1*1 = 1
1*1*1*1*1*1 = 1
1*1*1*1*1*1*1 = 1
1*1*1*1*1*1*1*1 = 1
1*1*2*1*1*1*1*1*1 = 2
		

Crossrefs

Programs

  • Excel
    =if(and(row()-1>=(column()-1)*4;row()-1 < A014963(k-1)*(column()-1)*4);column()-1;1)
    
  • PARI
    up_to = 23220; \\ binomial(215+1,2)
    A014963(n) = { ispower(n, , &n); if(isprime(n), n, 1); }; \\ From A014963 by Charles R Greathouse IV, Jun 10 2011
    A139553tr(n, k) = if(0==k,1,if((n>=(4*k))&&(n<(4*k*A014963(k))),k,1));
    A139553list(up_to) = { my(v = vector(up_to), i=0); for(n=1,oo, for(k=1,n, i++; if(i > up_to, return(v)); v[i] = A139553tr(n-1,k-1))); (v); };
    v139553 = A139553list(up_to);
    A139553(n) = v139553[1+n]; \\ Antti Karttunen, Jan 03 2019

Extensions

Typo in the definition corrected by Antti Karttunen, Jan 03 2019

A139549 Triangle read by rows: T(n,k) = if n>=2*k and n<2*k*A014963(k-1) then k else 1 T(n,0)=1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 3, 4, 1, 1, 1, 1, 1, 1, 1, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 5, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 5, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Mats Granvik, Apr 27 2008

Keywords

Comments

Row products give A139550.

Examples

			Row products of the triangle are:
1 = 1
1*1 = 1
1*1*1 = 1
1*1*1*1 = 1
1*1*2*1*1 = 2
1*1*2*1*1*1 = 2
1*1*2*3*1*1*1 = 6
1*1*2*3*1*1*1*1 = 6
1*1*1*3*4*1*1*1*1 = 12
		

Crossrefs

Programs

  • Excel
    =if(and(row()-1>=(column()-1)*2;row()-1 < A014963(k-1)*(column()-1)*2);column()-1;1)

A139551 Triangle read by rows: T(n,k) = if n>=3*k and n<3*k*A014963(k-1) then k else 1 T(n,0)=1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Mats Granvik, Apr 27 2008

Keywords

Comments

Row products give A139552.

Examples

			Row products of the triangle are:
1 = 1
1*1 = 1
1*1*1 = 1
1*1*1*1 = 1
1*1*1*1*1 = 1
1*1*1*1*1*1 = 1
1*1*2*1*1*1*1 = 2
1*1*2*1*1*1*1*1 = 2
1*1*2*1*1*1*1*1*1 = 2
		

Crossrefs

Programs

  • Excel
    =if(and(row()-1>=(column()-1)*3;row()-1 < A014963(k-1)*(column()-1)*3);column()-1;1)
Showing 1-5 of 5 results.