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-7 of 7 results.

A125163 Numbers m such that no prime exists of the form k! + m; or A125162(m) = 0.

Original entry on oeis.org

8, 14, 20, 24, 26, 32, 33, 34, 38, 44, 48, 50, 54, 56, 62, 63, 64, 68, 74, 75, 76, 80, 84, 86, 90, 92, 93, 94, 98, 104, 110, 114, 116, 117, 118, 120, 122, 123, 124, 128, 132, 134, 140, 141, 142, 144, 146, 152, 153, 154, 158, 159, 160, 164, 168, 170, 174, 176, 182, 183, 184, 186, 188, 194, 200, 201, 202, 204, 206, 207, 208, 212
Offset: 1

Views

Author

Alexander Adamchuk, Nov 21 2006

Keywords

Comments

Terms are the indices of zeros in A125162, i.e. A125162[a(n)] = 0.

Examples

			A125162 begins {1,1,1,1,3,1,4,0,1,1,5,1,3,0,1,1,6,1,7,0,1,1,6,0,1,0,1,1,6,1,9,0,0,0,3,1,11,0,1,1,9,1,5,0,1,1,10,0,2,0,1,1,9,0,2,0,1,1,10,1,9,0,0,0,3,1,9,0,1,1,8,1,9,0,0,0,5,1,9,0,1,1,11,0,1,0,1,1,8,0,3,0,0,0,2,1,10,0,1,1,...}.
Thus a(1) = 8, a(2) = 14, a(3) = 20, a(4) = 24, a(5) = 26, a(6)-a(8) = {32,33,34}.
		

Crossrefs

Cf. A125162 = number of primes of the form k! + n. Cf. A125164 = numbers n such that no prime exists of the form (k! + 3n - 1), (k! + 3n), (k! + 3n + 1).

Programs

  • Mathematica
    k={};Do[If[Length[Select[Range[m],PrimeQ[#!+m]&]]==0,AppendTo[k,m]],{m,212}];k (* James C. McMahon, Dec 16 2024 *)
  • PARI
    b(n)=c=0;for(k=1,n,if(ispseudoprime(k!+n),c++));c
    n=1;while(n<500,if(!b(n),print1(n,", "));n++) \\ Derek Orr, Oct 15 2014

Extensions

More terms from Derek Orr, Oct 15 2014
Edited by Michel Marcus, Jul 29 2018

A125164 Positive integers n such that no prime exists of the form (k! + 3n - 1), (k! + 3n) or (k! + 3n + 1) for any k.

Original entry on oeis.org

11, 21, 25, 31, 39, 41, 47, 51, 53, 61, 67, 69, 71, 73, 81, 91, 95, 99, 101, 107, 109, 111, 113, 121, 123, 125, 131, 135, 137, 141, 145, 151, 157, 161, 165, 171, 175, 177, 179, 181, 183, 191, 193, 201, 203, 207, 209, 211, 221, 223, 229, 231, 235, 237, 241, 243, 245, 249, 251, 255, 259
Offset: 1

Views

Author

Alexander Adamchuk, Nov 22 2006

Keywords

Comments

3*a(n) is an index of the middle term in a triple of consecutive zeros in A125162. The indices of zeros in A125162 are listed in A125163.
Primes in this sequence form A115058.

Examples

			Triplets of consecutive terms in A125163: {32,33,34}, {62,63,64}, {74,75,76}, {92,93,94}, {116,117,118}, {122,123,124}, {140,141,142}, {152,153,154}, {158,159,160}, {182,183,184}, {200,201,202}, {206,207,208}, {212,213,214}, {218,219,220}, {242,243,244}, {272,273,274}, {284,285,286}.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[2,300],NoneTrue[Flatten[Table[k!+3*#+{-1,0,1},{k,#-1}]],PrimeQ]&] (* Harvey P. Dale, Jun 24 2025 *)

Extensions

Edited and extended by Max Alekseyev, Feb 06 2010

A125211 a(n) = total number of primes of the form |k! - n|.

Original entry on oeis.org

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

Views

Author

Alexander Adamchuk, Nov 23 2006

Keywords

Comments

Numbers n such that a(n) = 0 are listed in A125212(n) = {1,2,10,16,28,34,36,40,46,50,51,52,56,57,58,64,66,70,76,78,82,86,87,88,92,93,94,96,100,...} Numbers n such that no prime exists of the form k! - n. Note the triples of consecutive zeros in a(n) for n = {{50,51,52}, {56,57,58}, {86,87,88}, {92,93,94}, ...}. Most zeros in a(n) have even indices. The middle index of most consecutive zero triples is odd and is a multiple of 3. Numbers n such that no prime exists of the form (k! - 3n - 1), (k! - 3n), (k! - 3n + 1) are listed in A125213(n) = {17,19,29,31,45,49,57,59,63,69,73,79,83,85,87,89,97,99,...}. The first pair of odd middle indices of zero triples that are not divisible by 3 is n = 325 and n = 329. They belong to the first septuplet of consecutive zeros in a(n): a(324)-a(330) = 0.

Examples

			a(4) = 3 because there are 3 primes of the form |k! - 4|:
1! - 4 = -3, 2! - 4 = -2, 3! - 4 = 2.
k! - 4 is composite for all k>3 because it is divisible by 4.
		

Crossrefs

Cf. A125162 = number of primes of the form k! + n. Cf. A125163 = numbers n such that no prime exists of the form k! + n. Cf. A125164 = numbers n such that no prime exists of the form (k! + 3n - 1), (k! + 3n), (k! + 3n + 1). Cf. A125212, A125213.

Programs

  • Mathematica
    Table[Length[Select[Range[n],PrimeQ[ #!-n]&]],{n,1,300}]

A125212 Numbers m such that no prime exists of the form |k! - m|; or A125211(m) = 0.

Original entry on oeis.org

1, 2, 10, 16, 28, 34, 36, 40, 46, 50, 51, 52, 56, 57, 58, 64, 66, 70, 76, 78, 82, 86, 87, 88, 92, 93, 94, 96, 100, 106, 112, 116, 120, 124, 126, 130, 134, 135, 136, 142, 144, 146, 147, 148, 154, 156, 160, 162, 166, 170, 171, 172, 176, 177, 178, 184, 186, 188, 189
Offset: 1

Views

Author

Alexander Adamchuk, Nov 23 2006

Keywords

Comments

Note the triples of consecutive zeros in A125211 for n = {{50,51,52}, {56,57,58}, {86,87,88}, {92,93,94}, ...}. Most zeros in A125211 have even indices. The middle index of most consecutive zero triples in A125211 is odd and is a multiple of 3. Numbers n such that no prime exists of the form (k! - 3n - 1), (k! - 3n), (k! - 3n + 1) are listed in A125213. The first pair of odd middle indices of zero triples that are not divisible by 3 is n = 325 and n = 329. They belong to the first septuplet of consecutive zeros in A125211. A125211(n) = 0 for 7 consecutive terms from n = 324 to n = 330.

Examples

			A125211 begins {0,0,2,3,2,1,3,2,2,0,5,1,7,1,1,0,9,1,6,1,2,1,4,1,2,1,1,0,5,1,8,1,1,0,2,0,10,1,1,0,6,1,10,1,1,0,10,1,3,0,0,0,7,...}.
Thus a(1) = 1, a(2) = 2, a(3) = 10, a(10)-a(12) = {50,51,52}.
		

Crossrefs

Cf. A125162 (number of primes of the form k! + n).
Cf. A125163 (numbers n such that no prime exists of the form k! + n).
Cf. A125164 (numbers n such that no prime exists of the form (k! + 3n - 1), (k! + 3n), (k! + 3n + 1)).

Programs

  • Mathematica
    k={};Do[If[Length[Select[Range[m],PrimeQ[#!-m]&]]==0,AppendTo[k,m]],{m,189}];k (* James C. McMahon, Dec 16 2024 *)
  • PARI
    isok(m)={for(k=1, m-1, if(isprime(abs(k!-m)), return(0))); 1} \\ Andrew Howroyd, Dec 16 2024

A125213 Integers m such that no prime exists of the form abs(k! - 3m - 1), abs(k! - 3m), or abs(k! - 3m + 1).

Original entry on oeis.org

17, 19, 29, 31, 45, 49, 57, 59, 63, 69, 73, 79, 83, 85, 87, 89, 97, 99, 101, 107, 109, 115, 119, 121, 129, 131, 135, 139, 143, 149, 151, 157, 159, 161, 165, 169, 171, 173, 177, 179, 185, 187, 189, 195, 197, 199, 209, 213, 217, 219, 223, 227, 229, 233, 235, 249, 255, 259
Offset: 1

Views

Author

Alexander Adamchuk, Nov 23 2006

Keywords

Comments

3*a(n) are the indices of the middle terms in the triples of consecutive zeros in A125211. The middle index of most consecutive zero triples in A125211 is odd and is a multiple of 3.

Examples

			Triplets of consecutive zeros in A125211: {50,51,52}, {56,57,58}, {86,87,88}, {92,93,94}, ...
		

Crossrefs

Extensions

Edited and extended by Max Alekseyev, Feb 10 2010

A241423 Largest number k > 0 such that n + k! is prime, or 0 if no such k exists.

Original entry on oeis.org

1, 2, 1, 4, 1, 6, 0, 2, 1, 10, 1, 6, 0, 2, 1, 11, 1, 14, 0, 2, 1, 16, 0, 3, 0, 2, 1, 20, 1, 22, 0, 0, 0, 4, 1, 33, 0, 2, 1, 25, 1, 38, 0, 2, 1, 44, 0, 6, 0, 2, 1, 52, 0, 4, 0, 2, 1, 27, 1, 50, 0, 0, 0, 4, 1, 64, 0, 2, 1, 55, 1, 67, 0, 0, 0, 6, 1, 73, 0, 2, 1, 68, 0, 4, 0, 2, 1, 52, 0, 6
Offset: 2

Views

Author

Derek Orr, Aug 08 2014

Keywords

Comments

If k >= n, then n + k! is divisible by n and is not prime.
a(n) < A020639(n), because if prime p divides n then p divides n + k! for k >= p. - Robert Israel, Aug 10 2014
There is no term for n = 1 since factorial primes 1 + k! can probably be arbitrarily large (A002981 shows k values). - Jens Kruse Andersen, Aug 13 2014

Crossrefs

Programs

  • Maple
    a:= proc(n)
    local k;
    for k from min(numtheory:-factorset(n)) to 1 by -1 do
      if isprime(n+k!)  then return(k) fi
    od:
    0
    end proc:
    seq(a(n),n=2..100); # Robert Israel, Aug 10 2014
  • Mathematica
    a[n_] := Module[{k}, For[k = FactorInteger[n][[1, 1]], k >= 1, k--, If[PrimeQ[n + k!], Return[k]]]; 0];
    a /@ Range[2, 100] (* Jean-François Alcover, Jul 27 2020, after Maple *)
  • PARI
    a(n)=forstep(k=n,1,-1,if(ispseudoprime(n+k!),return(k)))
    n=2;while(n<150,print1(a(n),", ");n++)

A242041 Number of k >= 1 that make n + k! and n - k! both prime.

Original entry on oeis.org

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

Views

Author

Derek Orr, Aug 12 2014

Keywords

Comments

0 <= a(n) <= min{A125162(n), A175940(n)}.
a(n) < A020639(n). - Robert Israel, Aug 12 2014

Crossrefs

Programs

  • Maple
    a:= n ->  nops(select(k -> isprime(n+k!) and isprime(n-k!),
          [$1 ..min(numtheory:-factorset(n))-1])):
    0, seq(a(n),n=2..100); # Robert Israel, Aug 12 2014
  • PARI
    a(n)=c=0;for(k=1,n,if(ispseudoprime(n+k!)&&ispseudoprime(n-k!),c++));return(c)
    vector(100,n,a(n))
Showing 1-7 of 7 results.