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

A221490 Number of primes of the form k*n + k - n, 1 <= k <= n.

Original entry on oeis.org

0, 0, 1, 1, 3, 1, 2, 2, 5, 3, 6, 3, 5, 4, 4, 3, 9, 2, 6, 5, 8, 4, 9, 4, 9, 7, 10, 4, 17, 3, 10, 9, 11, 9, 15, 4, 9, 10, 13, 5, 20, 7, 11, 10, 16, 8, 19, 6, 18, 12, 17, 5, 23, 9, 18, 9, 15, 8, 26, 7, 15, 12, 16, 13, 29, 8, 18, 13, 26, 9, 25, 10, 19, 18, 16
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 19 2013

Keywords

Comments

Number of primes in n-th row of the triangle in A209297.
Number of primes along the main diagonal of an n X n square array whose elements are the numbers from 1..n^2, listed in increasing order by rows (see square arrays in example). - Wesley Ivan Hurt, May 15 2021

Examples

			Row 10 of A209297 = [1,12,23,34,45,56,67,78,89,100] containing three primes: [23,67,89], therefore a(10) = 3;
row 11 of A209297 = [1,13,25,37,49,61,73,85,97,109,121] containing six primes: [13,37,61,73,97,109], therefore a(11) = 6.
From _Wesley Ivan Hurt_, May 15 2021: (Start)
                                                      [1   2  3  4  5]
                                      [1   2  3  4]   [6   7  8  9 10]
                            [1 2 3]   [5   6  7  8]   [11 12 13 14 15]
                   [1 2]    [4 5 6]   [9  10 11 12]   [16 17 18 19 20]
           [1]     [3 4]    [7 8 9]   [13 14 15 16]   [21 22 23 24 25]
------------------------------------------------------------------------
  n         1        2         3            4                 5
------------------------------------------------------------------------
  a(n)      0        0         1            1                 3
------------------------------------------------------------------------
(End)
		

Crossrefs

Programs

Formula

a(n) = Sum_{k=1..n} A010051(A209297(n,k)).
a(n) = Sum_{k=1..n} c(n*(k-1)+k), where c is the prime characteristic. - Wesley Ivan Hurt, May 15 2021

A344316 Number of primes appearing along the border of an n X n square array whose elements are the numbers from 1..n^2, listed in increasing order by rows.

Original entry on oeis.org

0, 2, 3, 4, 5, 7, 7, 8, 8, 10, 9, 13, 12, 13, 12, 12, 13, 20, 14, 17, 17, 19, 16, 22, 18, 22, 19, 23, 19, 31, 18, 26, 24, 26, 25, 31, 18, 27, 28, 30, 22, 39, 25, 30, 31, 37, 26, 41, 29, 37, 32, 42, 28, 44, 31, 39, 30, 41, 32, 51, 33, 39, 40, 41, 36, 52, 35, 44, 39, 50, 39, 52, 39
Offset: 1

Views

Author

Wesley Ivan Hurt, May 14 2021

Keywords

Examples

			                                                      [1   2  3  4  5]
                                      [1   2  3  4]   [6   7  8  9 10]
                            [1 2 3]   [5   6  7  8]   [11 12 13 14 15]
                   [1 2]    [4 5 6]   [9  10 11 12]   [16 17 18 19 20]
           [1]     [3 4]    [7 8 9]   [13 14 15 16]   [21 22 23 24 25]
------------------------------------------------------------------------
  n         1        2         3            4                 5
------------------------------------------------------------------------
  a(n)      0        2         3            4                 5
------------------------------------------------------------------------
  primes   {}      {2,3}    {2,3,7}    {2,3,5,13}       {2,3,5,11,23}
------------------------------------------------------------------------
		

Crossrefs

Programs

  • Mathematica
    Table[PrimePi[n] + PrimePi[n^2 - 1] - PrimePi[n*(n - 1)] + Sum[PrimePi[n*k + 1] - PrimePi[n*k], {k, n - 2}], {n, 100}]

Formula

a(n) = pi(n) + pi(n^2-1) - pi(n^2-n) + Sum_{k=1..n-2} (pi(n*k+1) - pi(n*k)).

A342695 a(n) is the number of primes in an n X n square array that do not appear on its border, with the elements of the square array being the numbers from 1..n^2, listed in increasing order by rows.

Original entry on oeis.org

0, 0, 1, 2, 4, 4, 8, 10, 14, 15, 21, 21, 27, 31, 36, 42, 48, 46, 58, 61, 68, 73, 83, 83, 96, 100, 110, 114, 127, 123, 144, 146, 157, 165, 175, 179, 201, 201, 212, 221, 241, 235, 258, 265, 275, 282, 303, 301, 328, 330, 346, 351, 381, 377, 403, 406, 427, 433, 455, 452, 486, 493
Offset: 1

Views

Author

Wesley Ivan Hurt, May 18 2021

Keywords

Examples

			                                                      [1   2  3  4  5]
                                      [1   2  3  4]   [6   7  8  9 10]
                            [1 2 3]   [5   6  7  8]   [11 12 13 14 15]
                   [1 2]    [4 5 6]   [9  10 11 12]   [16 17 18 19 20]
           [1]     [3 4]    [7 8 9]   [13 14 15 16]   [21 22 23 24 25]
------------------------------------------------------------------------
  n         1        2         3            4                 5
------------------------------------------------------------------------
  a(n)      0        0         1            2                 4
------------------------------------------------------------------------
  primes   {}       {}        {5}        {7,11}         {7,13,17,19}
------------------------------------------------------------------------
		

Crossrefs

Cf. A000720 (pi), A038107, A221490, A344316 (on border), A344349.

Programs

  • Mathematica
    Table[PrimePi[n*(n - 1)] - PrimePi[n] - Sum[PrimePi[n*k + 1] - PrimePi[n*k], {k, n - 2}], {n, 100}]

Formula

a(n) = pi(n*(n-1)) - pi(n) - Sum_{k=1..n-2} (pi(n*k+1) - pi(n*k)).

A350377 Numbers k such that Sum_{j=1..k} (pi(k*j-j+1) - pi(k*j-j)) = Sum_{i=1..k} (pi(k*(i-1)+i) - pi(k*(i-1)+i-1)).

Original entry on oeis.org

1, 5, 8, 10, 11, 12, 14, 21, 23, 24, 27, 63, 64, 72, 90, 99, 144, 176, 184, 340, 366, 393, 480, 567, 693, 915, 975, 1046, 1068, 1084, 1260, 1410, 1452, 1830, 1968, 2268, 2490, 2943, 3087, 3735, 5284, 5426, 5637, 5757, 6015, 6334, 6393, 6570, 6582, 8292, 9836, 10005
Offset: 1

Views

Author

Wesley Ivan Hurt, Dec 28 2021

Keywords

Comments

Numbers with the same number of primes appearing along the main diagonal and along the main antidiagonal of an n X n square array whose elements are the numbers from 1..n^2, listed in increasing order by rows (see example).

Examples

			5 is in the sequence since there are 3 primes along the main diagonal and 3 primes along the main antidiagonal of the 5 X 5 array below.
  [1   2  3  4  5]
  [6   7  8  9 10]
  [11 12 13 14 15]
  [16 17 18 19 20]
  [21 22 23 24 25]
		

Crossrefs

Programs

  • Mathematica
    q[k_] := Sum[Boole @ PrimeQ[k*j - j + 1] - Boole @ PrimeQ[k*(j - 1) + j], {j, 1, k}] == 0; Select[Range[1000], q] (* Amiram Eldar, Dec 28 2021 *)

Formula

Numbers k such that A221490(k) = A344349(k).

Extensions

More terms from Amiram Eldar, Dec 28 2021
Showing 1-4 of 4 results.