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 35 results. Next

A007684 Prime(n)*...*prime(a(n)) is the least product of consecutive primes that is non-deficient.

Original entry on oeis.org

2, 6, 11, 21, 35, 51, 73, 98, 130, 167, 204, 249, 296, 347, 406, 471, 538, 608, 686, 768, 855, 950, 1050, 1156, 1266, 1377, 1495, 1621, 1755, 1898, 2049, 2194, 2347, 2504, 2670, 2837, 3013, 3194, 3380, 3573, 3771, 3974, 4187, 4401, 4625, 4856
Offset: 1

Views

Author

Keywords

Comments

Subscript of the smallest primorial number that when divided by the (n-1)-th primorial number gives an abundant number.
Products of consecutive primes started with prime(a) up to prime(b) result in abundant squarefree numbers if b is large enough and provides perhaps the least squarefree solutions to Rivera Puzzle 329 and its generalization.
Adding a new prime p to the product increases the relative abundancy sigma(N)/N by a factor 1+1/p. This leads to a simple and fast algorithm, see the PARI code. - M. F. Hasler, Jul 30 2016

Examples

			n=1: a(1)=2 means that primorial(2)=6 divided by primorial(1-1)=1 gives the quotient 6/1=6 which is just non-deficient (being a perfect number);
n=3: a(n)=11 because prime(3)=5, primorial(11) = 2*3*5*...*29*31, primorial(3-1) = 2*3 = 6.
p#(11)/p#(2) = 3*5*7*11*13*17*19*23*29*31 = 33426748355 = q and sigma(q)/q = 2.00097 > 2 so q is an abundant number. Also p#(10)/p#(3-1) is not yet abundant.
		

Crossrefs

Cf. A005100, A007686, A007702, A007707 (an essentially identical sequence).

Programs

  • Mathematica
    spr[x_, y_] :=Apply[Times, Table[(Prime[w]+1)/(Prime[w]), {w, x, y}]];
    Table[Min[Flatten[Position[Table[Floor[spr[n, w]], {w, 1, 1000}], 2]]], {n, 1, 20}] (* Labos Elemer, Sep 19 2005 *)
  • PARI
    a=1;i=0;for(n=1,99,while(2>a*=1+1/prime(i++),);print1(i",");a/=1+1/prime(n)) \\ M. F. Hasler, Jul 30 2016

Formula

a(n) is the minimal x such that floor(sigma(p#(x)/p#(n-1)) / (p#(x)/p#(n-1))) = 2, where p#(w) is the w-th primorial number, the product of first w prime numbers. For a>b, the p#(a)/p#(b)=A002110(a)/A002110(b) quotients are prime(b+1)*prime(b+2)*...*prime(a).

Extensions

Additional comments from Labos Elemer, Sep 19 2005
More terms from Don Reble, Nov 10 2005
Edited by N. J. A. Sloane, Dec 22 2006

A374427 Triangle read by rows: T(n, k) = n! * 2^k * hypergeom([-k], [-n], -1/2).

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 6, 10, 17, 29, 24, 42, 74, 131, 233, 120, 216, 390, 706, 1281, 2329, 720, 1320, 2424, 4458, 8210, 15139, 27949, 5040, 9360, 17400, 32376, 60294, 112378, 209617, 391285, 40320, 75600, 141840, 266280, 500184, 940074, 1767770, 3325923, 6260561
Offset: 0

Views

Author

Peter Luschny, Jul 28 2024

Keywords

Examples

			     1
     1      1
     2      3      5
     6     10     17     29
    24     42     74    131    233
   120    216    390    706   1281   2329
   720   1320   2424   4458   8210  15139  27949
  5040   9360  17400  32376  60294 112378 209617 391285
 40320  75600 141840 266280 500184 940074 1767770 3325923 6260561
362880 685440 1295280 2448720 4631160 8762136 16584198 31400626 59475329
		

Crossrefs

Cf. A000354 (main diagonal), A374428, A007680 (col k=0).

Programs

  • Maple
    A374427 := proc(n,k)
        (-1)^k*add((-2)^(k-j)*binomial(k,k-j)*(n-j)!,j=0..k) ;
    end proc:
    seq(seq(A374427(n,k),k=0..n),n=0..12) ; # R. J. Mathar, Aug 30 2024
  • Mathematica
    T[n_, k_] := n! 2^k Hypergeometric1F1[-k, -n, -1/2];
    (* Alternative: )
    T[n_, k_] := (-1)^k*Sum[(-2)^(k - j)*Binomial[k, k - j]*((n - j)!), {j, 0, k}];
    Table[T[n, k], {n, 0, 8}, {k, 0, n}] // Flatten (* Detlef Meya, Aug 12 2024 *)

Formula

T(n, k) = (-1)^k*Sum_{j=0..k} (-2)^(k - j)*binomial(k, k - j)*(n - j)!. - Detlef Meya, Aug 12 2024

A099286 Decimal expansion of the error function at 1.

Original entry on oeis.org

8, 4, 2, 7, 0, 0, 7, 9, 2, 9, 4, 9, 7, 1, 4, 8, 6, 9, 3, 4, 1, 2, 2, 0, 6, 3, 5, 0, 8, 2, 6, 0, 9, 2, 5, 9, 2, 9, 6, 0, 6, 6, 9, 9, 7, 9, 6, 6, 3, 0, 2, 9, 0, 8, 4, 5, 9, 9, 3, 7, 8, 9, 7, 8, 3, 4, 7, 1, 7, 2, 5, 4, 0, 9, 6, 0, 1, 0, 8, 4, 1, 2, 6, 1, 9, 8, 3, 3, 2, 5, 3, 4, 8, 1, 4, 4, 8, 8, 8, 4, 5, 4, 1, 5, 8
Offset: 0

Views

Author

Robert G. Wilson v, Oct 08 2004

Keywords

Examples

			0.84270079294971486934122063508260925929606699796630290845993789783...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[ Erf[1], 10, 105][[1]]
  • PARI
    1 - erfc(1)

Formula

Equals 1-A099287.
Equals (1/e) Sum_{n >= 0} (1/(n/2)!) - 1. - Jean-François Alcover, Jun 14 2020
From Amiram Eldar, Jul 22 2020: (Start)
Equals (2/sqrt(Pi)) * Integral_{x=0..1} exp(-x^2) dx.
Equals (2/sqrt(Pi)) * Sum_{k>=0} (-1)^k/(k! * (2*k + 1)) = (2/sqrt(Pi)) * Sum_{k>=0} (-1)^k/A007680(k).
Equals (1/e) * Sum_{k>=1} 1/Gamma(k + 1/2). (End)

A306506 Number T(n,k) of permutations p of [n] having at least one index i with |p(i)-i| = k; triangle T(n,k), n>=1, 0<=k<=n-1, read by rows.

Original entry on oeis.org

1, 1, 1, 4, 4, 3, 15, 19, 15, 10, 76, 99, 86, 67, 42, 455, 603, 544, 455, 358, 216, 3186, 4248, 3934, 3486, 2921, 2250, 1320, 25487, 34115, 32079, 29296, 25487, 21514, 16296, 9360, 229384, 307875, 292509, 272064, 245806, 214551, 179058, 133800, 75600
Offset: 1

Views

Author

Alois P. Heinz, Feb 20 2019

Keywords

Comments

T(n,k) is defined for n,k>=0. The triangle contains only the terms with k=n.

Examples

			The 6 permutations p of [3]: 123, 132, 213, 231, 312, 321 have absolute displacement sets {|p(i)-i|, i=1..3}: {0}, {0,1}, {0,1}, {1,2}, {1,2}, {0,2}, respectively. Number 0 occurs four times, 1 occurs four times, and 2 occurs thrice. So row n=3 is [4, 4, 3].
Triangle T(n,k) begins:
      1;
      1,     1;
      4,     4,     3;
     15,    19,    15,    10;
     76,    99,    86,    67,    42;
    455,   603,   544,   455,   358,   216;
   3186,  4248,  3934,  3486,  2921,  2250,  1320;
  25487, 34115, 32079, 29296, 25487, 21514, 16296, 9360;
  ...
		

Crossrefs

Columns k=0-3 give: A002467, A306511, A306524, A324366.
T(n+2,n+1) gives A007680 (for n>=0).
T(2n,n) gives A306675.

Programs

  • Maple
    b:= proc(s, d) option remember; (n-> `if`(n=0, add(x^j, j=d),
          add(b(s minus {i}, d union {abs(n-i)}), i=s)))(nops(s))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n-1))(b({$1..n}, {})):
    seq(T(n), n=1..9);
    # second Maple program:
    T:= proc(n, k) option remember; n!-LinearAlgebra[Permanent](
          Matrix(n, (i, j)-> `if`(abs(i-j)=k, 0, 1)))
        end:
    seq(seq(T(n, k), k=0..n-1), n=1..9);
  • Mathematica
    T[n_, k_] := n!-Permanent[Table[If[Abs[i-j]==k, 0, 1], {i, 1, n}, {j, 1, n} ]];
    Table[T[n, k], {n, 1, 9}, {k, 0, n-1}] // Flatten (* Jean-François Alcover, May 01 2019, from 2nd Maple program *)

Formula

T(n,k) = n! - A306512(n,k).
T(2n,n) = T(2n,0) = A002467(2n) = (2n)! - A306535(n).

A155856 Triangle T(n,k) = binomial(2*n-k, k)*(n-k)!, read by rows.

Original entry on oeis.org

1, 1, 1, 2, 3, 1, 6, 10, 6, 1, 24, 42, 30, 10, 1, 120, 216, 168, 70, 15, 1, 720, 1320, 1080, 504, 140, 21, 1, 5040, 9360, 7920, 3960, 1260, 252, 28, 1, 40320, 75600, 65520, 34320, 11880, 2772, 420, 36, 1, 362880, 685440, 604800, 327600, 120120, 30888, 5544, 660, 45, 1
Offset: 0

Views

Author

Paul Barry, Jan 29 2009

Keywords

Comments

Row sums of B^{-1}*A155856*B^{-1} are A000166 with B=A007318.
Downward diagonals T(n+j, n) = j!*binomial(n+j, n) = j!*seq(j), where seq(j) are sequences A010965, A010967, ..., A011101, A017714, A017716, ..., A017764, for 6 <= j <= 50, respectively. - G. C. Greubel, Jun 04 2021

Examples

			Triangle begins:
     1;
     1,    1;
     2,    3,    1;
     6,   10,    6,    1;
    24,   42,   30,   10,    1;
   120,  216,  168,   70,   15,   1;
   720, 1320, 1080,  504,  140,  21,  1;
  5040, 9360, 7920, 3960, 1260, 252, 28, 1;
		

Crossrefs

Cf. A155857 (row sums), A155858 (diagonal sums).

Programs

  • Mathematica
    Table[Binomial[2n-k,k](n-k)!,{n,0,10},{k,0,n}]//Flatten (* Harvey P. Dale, Mar 24 2017 *)
  • Sage
    flatten([[factorial(n-k)*binomial(2*n-k, k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, Jun 04 2021

Formula

T(n,k) = binomial(2*n-k, k)*(n-k)!.
Sum_{k=0..n} T(n, k) = A155857(n)
Sum_{k=0..floor(n/2)} T(n-k, k) = A155858(n) (diagonal sums).
G.f.: 1/(1-xy-x/(1-xy-x/(1-xy-2x/(1-xy-2x/(1-xy-3x/(1-.... (continued fraction).
From G. C. Greubel, Jun 04 2021: (Start)
T(n, 0) = A000142(n). T(n+1, n) = A000217(n+1).
T(n+1, 1) = A007680(n). T(n+2, n) = A034827(n+4).
T(n+2, 2) = A175925(n). T(n+3, n) = A253946(n).
T(2*n, n) = A064352(n) T(n+4, n) = 4!*A000581(n).
T(n+1, n) = A000217(n+1). T(n+5, n) = 5!*A001287(n). (End)

A306461 Number T(n,k) of occurrences of k in a (signed) displacement set of a permutation of [n]; triangle T(n,k), n>=1, 1-n<=k<=n-1, read by rows.

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 4, 3, 2, 6, 10, 13, 15, 13, 10, 6, 24, 42, 56, 67, 76, 67, 56, 42, 24, 120, 216, 294, 358, 411, 455, 411, 358, 294, 216, 120, 720, 1320, 1824, 2250, 2612, 2921, 3186, 2921, 2612, 2250, 1824, 1320, 720, 5040, 9360, 13080, 16296, 19086, 21514, 23633, 25487, 23633, 21514, 19086, 16296, 13080, 9360, 5040
Offset: 1

Views

Author

Alois P. Heinz, Feb 17 2019

Keywords

Examples

			The 6 permutations p of [3]: 123, 132, 213, 231, 312, 321 have (signed) displacement sets {p(i)-i, i=1..3}: {0}, {-1,0,1}, {-1,0,1}, {-2,1}, {-1,2}, {-2,0,2}, respectively. Numbers -2 and 2 occur twice, -1 and 1 occur thrice, and 0 occurs four times. So row n=3 is [2, 3, 4, 3, 2].
Triangle T(n,k) begins:
  :                             1                           ;
  :                        1,   1,   1                      ;
  :                   2,   3,   4,   3,   2                 ;
  :              6,  10,  13,  15,  13,  10,   6            ;
  :        24,  42,  56,  67,  76,  67,  56,  42,  24       ;
  :  120, 216, 294, 358, 411, 455, 411, 358, 294, 216, 120  ;
		

Crossrefs

Columns k=0-1 give: A002467, A180191.
Row sums give A306455.
T(n+1,n) gives A000142.
T(n+2,n) gives A007680.
Cf. A000142, A061018 (left half of this triangle), A306234, A306506, A324225.

Programs

  • Maple
    b:= proc(s, d) option remember; (n-> `if`(n=0, add(x^j, j=d),
          add(b(s minus {i}, d union {n-i}), i=s)))(nops(s))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=1-n..n-1))(b({$1..n}, {})):
    seq(T(n), n=1..8);
    # second Maple program:
    T:= (n, k)-> -add((-1)^j*binomial(n-abs(k), j)*(n-j)!, j=1..n):
    seq(seq(T(n, k), k=1-n..n-1), n=1..9);
  • Mathematica
    T[n_, k_] := -Sum[(-1)^j Binomial[n-Abs[k], j] (n-j)!, {j, 1, n}];
    Table[Table[T[n, k], {k, 1-n, n-1}], {n, 1, 9}] // Flatten (* Jean-François Alcover, Feb 20 2021, after Alois P. Heinz *)

Formula

T(n,k) = T(n,-k).
T(n,k) = - Sum_{j=1..n} (-1)^j * binomial(n-|k|,j) * (n-j)!.
T(n,k) = |k|! * (n-|k|)! [x^(n-|k|)] (1-exp(-x))/(1-x)^(|k|+1).
Sum_{k=1-n..n-1} T(n,k) = A306455(n).
T(n,k) = |k|! * A306234(n,k).

A082033 a(n) = (3n+1)*n!.

Original entry on oeis.org

1, 4, 14, 60, 312, 1920, 13680, 110880, 1008000, 10160640, 112492800, 1357171200, 17723059200, 249080832000, 3748666521600, 60153020928000, 1025216704512000, 18495746260992000, 352130553815040000, 7055415823712256000
Offset: 0

Views

Author

Paul Barry, Apr 02 2003

Keywords

Comments

A row of the number array A082037.

Crossrefs

Programs

Formula

a(n) = A016777(n)*n!.
3*a(n) +(-3*n-5)*a(n-1) +2*(n-1)*a(n-2)=0. - R. J. Mathar, Oct 29 2014

A167556 A triangle related to the GF(z) formulas of the rows of the ED1 array A167546.

Original entry on oeis.org

1, 1, 2, 2, 6, 2, 6, 24, 4, 8, 24, 120, 0, 48, 24, 120, 720, -120, 384, 72, 144, 720, 5040, -1680, 3696, -432, 1296, 720, 5040, 40320, -20160, 40320, -15840, 17280, 2880, 5760, 40320, 362880, -241920, 483840, -311040, 288000, -46080, 69120, 40320
Offset: 1

Views

Author

Johannes W. Meijer, Nov 10 2009

Keywords

Comments

The GF(z) formulas given below correspond to the first ten rows of the ED1 array A167546. The polynomials in their numerators lead to the triangle given above.

Examples

			Row 1: GF(z) = 1/(1-z).
Row 2: GF(z) = (1 + 2*z)/(1-z)^2.
Row 3: GF(z) = (2 + 6*z + 2*z^2)/(1-z)^3.
Row 4: GF(z) = (6 + 24*z + 4*z^2 + 8*z^3)/(1-z)^4.
Row 5: GF(z) = (24 + 120*z + 0*z^2 + 48*z^3 + 24*z^4)/(1-z)^5.
Row 6: GF(z) = (120 + 720*z - 120*z^2 + 384*z^3 + 72*z^4 + 144*z^5)/ (1-z)^6.
Row 7: GF(z) = (720 + 5040*z - 1680*z^2 + 3696*z^3 - 432*z^4 + 1296*z^5 + 720*z^6)/(1-z)^7.
Row 8: GF(z) = (5040 + 40320*z - 20160*z^2 + 40320*z^3 - 15840*z^4 + 17280*z^5 + 2880*z^6 + 5760*z^7)/(1-z)^8.
Row 9: GF(z) = (40320 +362880*z -241920*z^2 + 483840*z^3 - 311040*z^4 + 288000*z^5 - 46080*z^6 + 69120*z^7 + 40320*z^8)/(1-z)^9.
Row 10: GF(z) = (362880 +3628800*z -3024000*z^2 +6289920*z^3 -5495040*z^4 + 5276160*z^5 - 2131200*z^6 + 1382400*z^7 + 201600*z^8 + 403200*z^9)/(1-z)^10;
		

Crossrefs

A167546 is the ED1 array.
A000142, A000142 (n=>2) and 120*A062148 (with three extra terms at the beginning of the sequence) equal the first three left hand triangle columns.
A098557(n) and A098557(n)*A064455(n) equal the first two right hand triangle columns.
A007680 equals the row sums.

A007686 Prime(n)*...*a(n) is the least product of consecutive primes which is non-deficient.

Original entry on oeis.org

3, 13, 31, 73, 149, 233, 367, 521, 733, 991, 1249, 1579, 1949, 2341, 2791, 3343, 3881, 4481, 5147, 5849, 6619, 7499, 8387, 9341, 10321, 11411, 12517, 13709, 15013, 16363, 17881, 19381, 20873, 22369, 24007, 25763, 27611, 29399, 31357
Offset: 1

Views

Author

Keywords

Comments

Differs from A007708 only for n=1. - Michel Marcus, Mar 10 2013
a(n) is approximately n^2 log^2 n. - Charles R Greathouse IV, Feb 26 2025

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{p = Prime[n]}, r = 1 + 1/p; While[r < 2,  p = NextPrime[p]; r *= 1 + 1/p]; p]; Array[a, 39] (* Amiram Eldar, Jun 29 2019 *)
  • PARI
    a(n) = {p = prime(n); sig = p+1; prd = p; while (sig < 2*prd, p = nextprime(p+1); sig *= p+1; prd *= p;); return (p);} \\ Michel Marcus, Mar 10 2013

Extensions

More terms from Don Reble, Nov 10 2005

A082037 A square array of linear-factorial numbers, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 1, 3, 6, 6, 1, 4, 10, 24, 24, 1, 5, 14, 42, 120, 120, 1, 6, 18, 60, 216, 720, 720, 1, 7, 22, 78, 312, 1320, 5040, 5040, 1, 8, 26, 96, 408, 1920, 9360, 40320, 40320, 1, 9, 30, 114, 504, 2520, 13680, 75600, 362880, 362880
Offset: 0

Views

Author

Paul Barry, Apr 02 2003

Keywords

Comments

Rows include A000142(n), A000142(n+1), A007680, A082033, A082034. Columns include 2!*A005408(n),3!*A016777(n),4!*A016813(n),5!*A016861. Main diagonal is A082042.

Examples

			Rows begin
1 1 2 6 ....
1 2 6 24 ...
1 3 10 42 ...
1 4 14 60 ...
1 5 18 78 ...
		

Crossrefs

Cf. A077038.

Formula

Square array defined by T(n, k)=(kn+1)n!
Previous Showing 11-20 of 35 results. Next