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 41-50 of 111 results. Next

A136437 a(n) = prime(n) - k! where k is the greatest number such that k! <= prime(n).

Original entry on oeis.org

0, 1, 3, 1, 5, 7, 11, 13, 17, 5, 7, 13, 17, 19, 23, 29, 35, 37, 43, 47, 49, 55, 59, 65, 73, 77, 79, 83, 85, 89, 7, 11, 17, 19, 29, 31, 37, 43, 47, 53, 59, 61, 71, 73, 77, 79, 91, 103, 107, 109, 113, 119, 121, 131, 137, 143, 149, 151, 157, 161, 163, 173, 187, 191, 193, 197, 211, 217, 227, 229, 233, 239, 247
Offset: 1

Views

Author

Ctibor O. Zizka, Apr 02 2008

Keywords

Comments

How many times does each prime appear in this sequence?
The only value (prime(n) - k!) = 0 is at n=1, where k=2.
Are n=2, k=2 and n=4, k=3 the only occurrences of (prime(n) - k!) = 1?
There exist infinitely many solutions of the form (prime(n) - k!) = prime(n-t), t < n.
Are there infinitely many solutions of the form (prime(n) - k!) = prime(r_1)*...*prime(r_i); r_i < n for all i?
From Bernard Schott, Jul 16 2021: (Start)
Answer to the second question is no: 18 other occurrences (n,k) of (prime(n) - k!) = 1 are known today; indeed, every k > 1 in A002981 that satisfies k! + 1 is prime gives an occurrence, but only a third pair (n, k) is known exactly; and this comes for n = 2428957, k = 11 because (prime(2428957) - 11!) = 1.
The next occurrence corresponds to k = 27 and n = X where prime(X) = 1+27! = 10888869450418352160768000001 but index X is not yet available (see A062701).
For the occurrences of (prime(m) - k!) = 1, integers k are in A002981 \ {0, 1}, corresponding indices m are in A062701 \ {1} (only 3 indices are known today) and prime(m) are in A088332 \ {2}. (End)

Examples

			a(1)  = prime(1)  - 2! =  2 -  2 =  0;
a(2)  = prime(2)  - 2! =  3 -  2 =  1;
a(3)  = prime(3)  - 2! =  5 -  2 =  3;
a(4)  = prime(4)  - 3! =  7 -  6 =  1;
a(5)  = prime(5)  - 3! = 11 -  6 =  5;
a(6)  = prime(6)  - 3! = 13 -  6 =  7;
a(7)  = prime(7)  - 3! = 17 -  6 = 11;
a(8)  = prime(8)  - 3! = 19 -  6 = 13;
a(9)  = prime(9)  - 3! = 23 -  6 = 17;
a(10) = prime(10) - 4! = 29 - 24 =  5.
		

Crossrefs

Programs

  • Maple
    f:=proc(n) local p,i; p:=ithprime(n); for i from 0 to p do if i! > p then break; fi; od; p-(i-1)!; end;
    [seq(f(n),n=1..70)]; # N. J. A. Sloane, May 22 2012
  • Mathematica
    a[n_] := Module[{p, k},p = Prime[n];k = 1;While[Factorial[k] <= p, k++];p - Factorial[k - 1]] (* James C. McMahon, May 05 2025 *)
  • PARI
    a(n) = my(k=1, p=prime(n)); while (k! <= p, k++); p - (k-1)!; \\ Michel Marcus, Feb 19 2019

Formula

a(n) = prime(n)- k! where k is the greatest number for which k! <= prime(n).
a(n) = A212598(prime(n)). - Michel Marcus, Feb 19 2019
a(n) = A000040(n) - A346425(n). - Bernard Schott, Jul 16 2021

Extensions

More terms from Jinyuan Wang, Feb 18 2019

A204658 Numbers n such that n!10-1 is prime.

Original entry on oeis.org

3, 4, 6, 8, 12, 20, 40, 48, 60, 62, 70, 84, 88, 168, 240, 258, 372, 760, 932, 1010, 2110, 2464, 2490, 2702, 3180, 4744, 6024, 8858, 9060, 10322, 13382, 15778, 19322, 22372, 22928, 25344, 28050, 40604, 42282, 45884, 52428, 58250, 81220, 93612, 108650
Offset: 1

Views

Author

M. F. Hasler, Jan 17 2012

Keywords

Comments

n!10 = product( n-10k, 0 <= k < n/10 ).
See also links in A156165.
a(1)-a(40) are proved prime by deterministic tests of pfgw. - Robert Price, Jun 11 2012
a(41) > 50000. - Robert Price, Jun 11 2012

Crossrefs

Programs

  • Mathematica
    MultiFactorial[n_, k_] := If[n < 1, 1, n*MultiFactorial[n - k, k]];
    Select[Range[1000], PrimeQ[MultiFactorial[#, 10] - 1] & ] (* Robert Price, Apr 19 2019 *)
  • PARI
    for(n=0,9999,isprime(prod(i=0,(n-2)\10,n-10*i)-1)& print1(n","))

Extensions

a(26)-a(40) from Robert Price, Jun 11 2012
a(41)-a(45) from Ken Davis link entered by Robert Price, Apr 19 2019

A204661 Numbers n such that n!8+1 is prime (for n!8 see A114800).

Original entry on oeis.org

0, 1, 2, 4, 6, 28, 30, 46, 60, 72, 86, 90, 112, 154, 162, 206, 280, 354, 400, 512, 606, 614, 678, 790, 938, 1054, 1092, 1148, 1582, 1788, 2088, 2206, 2598, 2912, 3672, 4642, 6272, 6428, 7084, 7604, 8580, 9464, 12762, 18386, 24910, 30448, 31696, 40288, 41682, 45730
Offset: 1

Views

Author

M. F. Hasler, Jan 17 2012

Keywords

Comments

n!8 = A114800(n).
No other terms < 50000. - Robert Price, Jul 29 2012

Crossrefs

Programs

  • Mathematica
    MultiFactorial[n_, k_] := If[n < 1, 1, n*MultiFactorial[n - k, k]];
    Select[Range[0, 1000], PrimeQ[MultiFactorial[#, 8] + 1] & ] (* Robert Price, Apr 19 2019 *)
    Select[Range[0,46000],PrimeQ[Times@@Range[#,1,-8]+1]&] (* Harvey P. Dale, Apr 12 2022 *)
  • PARI
    for(n=0,9999,isprime(prod(i=0,(n-2)\8,n-8*i)+1)& print1(n","))

Extensions

a(35)-a(50) from Robert Price, Jul 29 2012

A204662 Numbers n such that n!8-1 is prime.

Original entry on oeis.org

3, 4, 6, 8, 10, 12, 14, 16, 18, 22, 28, 30, 42, 48, 58, 68, 80, 86, 92, 108, 110, 112, 130, 198, 220, 230, 322, 432, 460, 478, 686, 706, 714, 842, 950, 1010, 1090, 1314, 1904, 2264, 2804, 3164, 3324, 4740, 4824, 4918, 5086, 5442, 6994, 7898, 8236, 8684, 10088, 13990, 15320, 17570, 18218, 21564, 22198, 22684, 24314, 24780, 25790, 38726
Offset: 1

Views

Author

M. F. Hasler, Jan 17 2012

Keywords

Comments

n!8 = A114800(n).
No other terms < 50000. - Robert Price, Aug 15 2012

Crossrefs

Programs

  • Mathematica
    MultiFactorial[n_, k_] := If[n < 1, 1, n*MultiFactorial[n - k, k]];
    Select[Range[0, 1000], PrimeQ[MultiFactorial[#, 8] - 1] & ] (* Robert Price, Apr 19 2019 *)
  • PARI
    for(n=0,9999,isprime(prod(i=0,(n-2)\8,n-8*i)-1)& print1(n","))

Extensions

a(39)-a(64) from Robert Price, Aug 15 2012

A204663 Numbers n such that n!8 + 2 is prime.

Original entry on oeis.org

0, 1, 3, 5, 9, 13, 15, 21, 23, 27, 33, 35, 45, 53, 55, 57, 75, 79, 109, 197, 221, 227, 267, 333, 413, 545, 695, 703, 801, 967, 1029, 1329, 1351, 1475, 1549, 1757, 2173, 2861, 3161, 3167, 3885, 4681, 4965, 6277, 6655, 8477, 9821, 9959, 10269, 17999, 23349, 29347, 29477, 30181, 34133, 36687, 40985, 43395, 47499
Offset: 1

Views

Author

M. F. Hasler, Jan 17 2012

Keywords

Comments

n!8 = A114800(n).
See also links in A156165.
For odd k, n!k +-2 is even for all n > k and thus cannot be prime.
a(60) > 50000. - Robert Price, Aug 19 2012

Crossrefs

Programs

  • Mathematica
    Select[Range[0,9999], PrimeQ[Product[# - 8i,{i, 0, Floor[(# - 2)/8]}] + 2] &] (* Indranil Ghosh, Mar 13 2017 *)
  • PARI
    for(n=0,9999,isprime(prod(i=0,(n-2)\8,n-8*i)+2)& print1(n","))

Extensions

a(39)-a(59) from Robert Price, Aug 19 2012

A204664 Numbers n such that n!8-2 is prime.

Original entry on oeis.org

4, 5, 7, 9, 11, 15, 17, 25, 27, 33, 47, 59, 63, 77, 87, 89, 93, 95, 107, 119, 127, 133, 139, 193, 201, 217, 269, 291, 369, 373, 435, 445, 669, 803, 831, 859, 907, 1271, 1705, 1743, 1849, 3087, 3189, 3497, 4221, 4475, 5119, 6013, 8023, 9237, 12755, 16501, 16747, 17021, 17309, 20671, 21539, 28377, 33625, 35645, 36831, 54663, 56223, 65299, 66159, 68121, 69339, 70579, 73511, 77745, 94601
Offset: 1

Views

Author

M. F. Hasler, Jan 17 2012

Keywords

Comments

n!8 = A114800(n).
See also links in A156165.
For odd k, n!k +- 2 is even for all n > k and thus cannot be prime.
a(62) > 50000. - Robert Price, Aug 27 2012
The first 10 associated primes: 2, 3, 5, 7, 31, 103, 151, 3823, 16927, 126223. - Robert Price, Mar 10 2017
a(72) > 10^5. - Robert Price, Apr 24 2017

Crossrefs

Programs

  • Mathematica
    MultiFactorial[n_, k_] := If[n < 1, 1, n*MultiFactorial[n - k, k]];
    Select[Range[4, 50000], PrimeQ[MultiFactorial[#, 8] - 2] &] (* Robert Price, Mar 10 2017 *)
  • PARI
    for(n=0,9999,isprime(prod(i=0,(n-2)\8,n-8*i)-2)& print1(n","))

Extensions

a(46)-a(61) from Robert Price, Aug 27 2012
a(62)-a(71) from Robert Price, Apr 24 2017

A073308 Numbers k such that k! + k + 1 is prime.

Original entry on oeis.org

0, 1, 2, 4, 6, 10, 52, 6822, 30838
Offset: 1

Views

Author

Rick L. Shepherd, Jul 24 2002

Keywords

Comments

Clearly, for k>2, k != 2 (mod 3).
Often m! + 2, m! + 3, ..., m! + m is cited as a constructed sequence of m-1 consecutive composite numbers.
Except for 0, k+1 is prime. - Robert Israel, Jan 13 2015

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 52, p. 20, Ellipses, Paris 2008.

Crossrefs

Cf. A073309 (corresponding primes), A002981 (n!+1 is prime), A073443 (n!-n-1 is prime), A092791.

Programs

  • Mathematica
    f[n_]:=n!+n+1; lst={};Do[p=f[n];If[PrimeQ[p],AppendTo[lst,n]],{n,0,2*5!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 02 2009 *)
  • PARI
    for(n=0,1960,if(isprime(n!+n+1),print1(n,",")))

Formula

a(n) = A092791(n) - 1. - Seiichi Manyama, Mar 19 2018

Extensions

a(8) from T. D. Noe, Jan 18 2008
a(9) from Seiichi Manyama (by using the data calculated by Giovanni Resta, May 04 2013), Mar 19 2018

A076681 Numbers k such that 5*k! + 1 is prime.

Original entry on oeis.org

2, 3, 5, 10, 11, 12, 17, 34, 74, 136, 155, 259, 271, 290, 352, 479, 494, 677, 776, 862, 921, 932, 2211, 3927, 4688, 12567
Offset: 1

Views

Author

Phillip L. Poplin (plpoplin(AT)bellsouth.net), Oct 25 2002

Keywords

Comments

a(26) > 4700. - Jinyuan Wang, Feb 04 2020

Examples

			k = 3 is here because 5*3! + 1 = 31 is prime.
		

Crossrefs

Programs

  • PARI
    is(k) = ispseudoprime(5*k!+1); \\ Jinyuan Wang, Feb 04 2020

Extensions

a(25) from Jinyuan Wang, Feb 04 2020
a(26) from Michael S. Branicky, Jul 03 2024

A051856 Numbers k such that (k!)^2 + k! + 1 is prime.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 76, 2837, 6001, 7076
Offset: 1

Views

Author

Andrew Walker (ajw01(AT)uow.edu.au), Dec 13 1999

Keywords

Examples

			6 is in the sequence because (6!)^2+6!+1=519121 is prime.
		

References

  • H. Dubner, Factorial and primorial primes, J. Rec. Math., 19 (No. 3) (1987)

Crossrefs

Programs

  • Mathematica
    Do[If[PrimeQ[n!^2+n!+1], Print[n]], {n, 600}] (* Farideh Firoozbakht, Jul 12 2003 *)

Extensions

Edited by R. J. Mathar, Aug 08 2008
a(8)-a(10) from Serge Batalov, Nov 24 2011

A066856 a(n) = omega(n!+1), where omega is the number of distinct primes dividing n, A001221.

Original entry on oeis.org

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

Views

Author

Robert G. Wilson v, Jan 21 2002

Keywords

Comments

103!+1 = 27437*31084943*C153, so a(103) is unknown until this 153-digit composite is factored. a(104) = 4 and a(105) = 6. - Rick L. Shepherd, Jun 09 2003

Crossrefs

Cf. A054990 (bigomega(n!+1)), A002981 (n!+1 is prime), A064237 (n!+1 divisible by a square), A084846 (mu(n!+1)).

Programs

  • Magma
    [#PrimeDivisors(Factorial(n) + 1): n in [1..55]]; // Vincenzo Librandi, Oct 11 2018
  • Mathematica
    Table[ Length[ FactorInteger[ n! + 1]], {n, 1, 15}]
    PrimeNu[Range[50]! + 1] (* Paolo Xausa, Feb 07 2025 *)
  • PARI
    for(n=1,64,print1(omega(n!+1),","))
    

Extensions

More terms from Rick L. Shepherd, Jun 09 2003
Previous Showing 41-50 of 111 results. Next