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.

A005095 a(n) = n! + n.

Original entry on oeis.org

1, 2, 4, 9, 28, 125, 726, 5047, 40328, 362889, 3628810, 39916811, 479001612, 6227020813, 87178291214, 1307674368015, 20922789888016, 355687428096017, 6402373705728018, 121645100408832019, 2432902008176640020, 51090942171709440021
Offset: 0

Views

Author

Keywords

Comments

Every infinite, increasing, integer arithmetic progression meets this sequence infinitely often. - John Abbott (abbott(AT)dima.unige.it), Mar 06 2003
Sum(A010051(k): A038507(n) < k <= a(n)) = 0. - Reinhard Zumkeller, Jul 10 2009
Largest k such that (k!-n!)/(k-n) is an integer. - Derek Orr, Apr 02 2014

Crossrefs

Cf. A135723.
Cf. A090786. - Reinhard Zumkeller, Jul 10 2009

Programs

Formula

E.g.f.: x*exp(x) + 1/(1-x). - Len Smiley, Dec 05 2001
Row sums of triangle A135723. - Gary W. Adamson, Nov 25 2007
(n-1)*(n-3)*a(n) -n*(n^2-3*n+1)*a(n-1) +n*(n-1)*(n-2)*a(n-2)=0. - R. J. Mathar, Oct 30 2015
a(n) +(-n-3)*a(n-1) +3*(n)*a(n-2) +(-3*n+5)*a(n-3) +(n-3)*a(n-4)=0. - R. J. Mathar, Oct 30 2015

A301427 Least nonnegative integer k such that n! - n - k is prime.

Original entry on oeis.org

0, 1, 2, 5, 10, 23, 4, 1, 2, 1, 10, 3, 32, 37, 42, 23, 82, 11, 10, 51, 66, 49, 124, 11, 16, 73, 2, 49, 30, 131, 14, 159, 78, 91, 60, 41, 34, 43, 90, 37, 66, 65, 8, 43, 32, 55, 10, 47, 128, 15, 6, 73, 6, 405, 220, 51, 78, 79, 10, 9, 38, 295, 62, 251, 124, 183, 34, 27, 680, 91, 300
Offset: 3

Views

Author

Seiichi Manyama, Mar 21 2018

Keywords

Comments

The (n-1) consecutive numbers n!-n, ... , n!-2 (for n > 3) are not prime.

Examples

			a(3)=0 because 3! - 3 - 0 =   3 is prime.
a(4)=1 because 4! - 4 - 1 =  19 is prime and 20 is not.
a(5)=2 because 5! - 5 - 2 = 113 is prime and 114 and 115 are not prime.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local r; r:= n!-n;
      r - prevprime(r)
    end proc:
    f(3):= 0:
    seq(f(i),i=3..100); # Robert Israel, Mar 23 2018
  • Mathematica
    a[n_] := n! - NextPrime[n! - 1, -1] - n;
    a /@ Range[3, 100] (* Jean-François Alcover, Oct 26 2020 *)
  • PARI
    a(n) = apply(x->(x-precprime(x)), n!-n);
    vector(99, n, a(n+2)) \\ Altug Alkan, Mar 21 2018

Formula

a(n) = A037155(n) - n.

A301431 Least nonnegative integer k such that (n!)^2 + n + k + 1 is prime.

Original entry on oeis.org

0, 0, 0, 1, 6, 1, 4, 3, 4, 13, 6, 1, 46, 9, 16, 7, 24, 41, 48, 9, 10, 81, 366, 35, 82, 21, 100, 39, 152, 71, 66, 377, 4, 27, 8, 25, 10, 225, 70, 13, 158, 125, 294, 3, 86, 81, 26, 133, 208, 141, 50, 31, 26, 127, 112, 173, 802, 363, 374, 47, 910, 437, 74, 213, 1044, 13, 1962, 41, 160, 169, 296, 29
Offset: 0

Views

Author

Seiichi Manyama, Mar 21 2018

Keywords

Comments

The (n-1) consecutive numbers (n)^2! + 2, ..., (n!)^2 + n (for n >= 2) are not prime powers (cf. A246655).

Examples

			a(0)=0 because (0!)^2 + 0 + 0 + 1 =   2 is prime.
a(1)=0 because (1!)^2 + 1 + 0 + 1 =   3 is prime.
a(2)=0 because (2!)^2 + 2 + 0 + 1 =   7 is prime.
a(3)=1 because (3!)^2 + 3 + 1 + 1 =  41 is prime and 40 is not prime.
a(4)=6 because (4!)^2 + 4 + 6 + 1 = 587 is prime and 581, 582, ... , 586 are not prime.
		

Crossrefs

Programs

  • PARI
    a(n) = apply(x->(nextprime(x)-x), (n!)^2+n+1); \\ Altug Alkan, Mar 21 2018

A090975 Least integer k such that n!+1-k is prime.

Original entry on oeis.org

0, 0, 0, 0, 2, 8, 2, 2, 32, 14, 12, 0, 2, 24, 2, 48, 54, 60, 42, 102, 32, 32, 74, 90, 74, 150, 38, 0, 102, 32, 2, 62, 2, 2, 194, 114, 128, 0, 2, 74, 84, 0, 80, 110, 110, 54, 90, 80, 104, 60, 98, 180, 68, 60, 128, 62, 462, 278, 110, 138, 140, 72, 72, 102, 360, 128, 318, 192
Offset: 0

Views

Author

Frederick Magata (frederick.magata(AT)uni-muenster.de), Feb 28 2004

Keywords

Comments

The (n-1) consecutive numbers n!+2,...,n!+n (for n>=2) are not prime. This fact implies that there are arbitrarily large gaps in the distribution of the prime numbers. n!+1 itself may be a prime number as in the case of n=3, 11, 27 (see A002981 for all such n). Now a(n) measures, when the first prime number previous to n!+2 appears. Thus a(n)=8 means that n!+1-3 is prime and so on. Obviously, the values of a(n) are always even numbers. Conjectures: |a(n)-1| is either 1 or a prime number. Is the growth of b(n) := sum(a(k),k=0..n) quadratic, that is b(n)=O(n^2)?

Examples

			a(3)=0 because 3!+1-0=7 is prime.
a(4)=2 because 4!+1-2=23 is prime and 24 and 25 are not.
		

Crossrefs

Programs

  • Maple
    a := proc(n) option remember;n!+1-prevprime(n!+2); end;

A343593 a(n) is the smallest number k > 0 such that n! + n + k is prime.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 4, 15, 8, 1, 6, 17, 54, 5, 28, 7, 14, 19, 70, 9, 10, 9, 74, 107, 16, 33, 20, 39, 194, 77, 96, 47, 4, 63, 26, 95, 274, 5, 58, 13, 20, 55, 28, 3, 194, 55, 186, 5, 34, 11, 220, 1, 18, 169, 16, 93, 50, 225, 234, 211, 708, 69, 208, 3, 128, 217
Offset: 0

Views

Author

Ventsislav D. Tsenov, Apr 21 2021

Keywords

Examples

			For n = 2: the smallest value of k such that 2! + 2 + k = 4 + k is prime is 1.
		

Crossrefs

Programs

  • Maple
    a:= n-> (t-> nextprime(t)-t)(n!+n):
    seq(a(n), n=0..80);  # Alois P. Heinz, Apr 21 2021
  • Mathematica
    a[n_] := NextPrime[(m = n! + n)] - m; Array[a, 100, 0] (* Amiram Eldar, Apr 21 2021 *)
  • PARI
    a(n) = my(s=n!+n); nextprime(s+1) - s; \\ Michel Marcus, Apr 21 2021

Formula

a(n) = A037153(n) - n for n >= 1.
a(n) = A090786(n) + 1.

Extensions

More terms from Alois P. Heinz, Apr 21 2021
Showing 1-5 of 5 results.