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.

A125162 a(n) is the number of primes of the form k! + n, 1 <= k <= n.

Original entry on oeis.org

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, 10, 1
Offset: 1

Views

Author

Alexander Adamchuk, Nov 21 2006

Keywords

Comments

Note the triples of consecutive zeros in a(n) for n = {{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}, ...}. The middle index of most zero triples is a multiple of 3. See A125164.
The first consecutive quintuple of zeros has indices n = {294,295,296,297,298}, where the odd zero index n = 295 is not a multiple of 3.
Also for n >= 2, a(n) is the number of primes of the form k! + n for all k, since n divides k! + n for k >= n. Note that it is not known whether there are infinitely many primes of the form k! + 1; see A088332 for such primes and A002981 for the indices k. - Jianing Song, Jul 28 2018

Examples

			a(n) is the length of n-th row in the table of numbers k such that k! + n is a prime, 1 <= k <= n.
   n:  numbers k
   -------------
   1:  {1},
   2:  {1},
   3:  {2},
   4:  {1},
   5:  {2, 3, 4},
Thus a(1)-a(4) = 1, a(5) = 3.
See Example table link for more rows.
		

Crossrefs

Cf. A125163 (indices of 0), A125164 (triples).

Programs

  • Mathematica
    Table[Length[Select[Range[n],PrimeQ[ #!+n]&]],{n,1,300}]
  • PARI
    a(n)=c=0;for(k=1,n,if(ispseudoprime(k!+n),c++));c
    vector(100,n,a(n)) \\ Derek Orr, Oct 15 2014

Extensions

Name clarified by Jianing Song, Jul 28 2018
Edited by Michel Marcus, Jul 29 2018

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

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
Showing 1-5 of 5 results.