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-10 of 19 results. Next

A154783 Row sums of triangle in A154720.

Original entry on oeis.org

1, 6, 9, 20, 15, 30, 35, 40, 63, 70, 55, 108, 65, 70, 135, 112, 119, 162, 95, 140, 231, 198, 161, 312, 225, 182, 351, 196, 203, 450, 217, 352, 429, 238, 385, 540, 407, 418, 585, 440, 369, 798, 387, 396, 945, 414, 423, 720, 441, 650, 969, 676, 583, 1026, 825, 840
Offset: 1

Views

Author

Omar E. Pol, Jan 15 2009

Keywords

Comments

Also, row sums of triangle in A154722. - Omar E. Pol, Jan 16 2009

Crossrefs

Programs

  • Maple
    isA008578 := proc(n) RETURN(n=1 or isprime(n)) ; end: A154783 := proc(n) local a,d; a := n ; for d from 1 to n-1 do if isA008578(n-d) and isA008578(n+d) then a := a+2*n; fi; od: a ; end: for n from 1 to 80 do printf("%d,",A154783(n)) ; od: # R. J. Mathar, Jan 18 2009

Formula

a(n) = A154784(n) + n.

Extensions

Extended by R. J. Mathar, Jan 18 2009

A154721 Triangle read by rows in which row n lists 2n-1 terms: The pairs of noncomposite numbers equidistant to n, with 0's inserted, as shown below in the example.

Original entry on oeis.org

0, 1, 0, 3, 1, 0, 0, 0, 5, 1, 0, 3, 0, 5, 0, 7, 0, 0, 3, 0, 0, 0, 7, 0, 0, 1, 0, 0, 0, 5, 0, 7, 0, 0, 0, 11, 1, 0, 3, 0, 0, 0, 0, 0, 0, 0, 11, 0, 13, 0, 0, 3, 0, 5, 0, 0, 0, 0, 0, 11, 0, 13, 0, 0, 1, 0, 0, 0, 5, 0, 7, 0, 0, 0, 11, 0, 13, 0, 0, 0, 17
Offset: 1

Views

Author

Omar E. Pol, Jan 14 2009

Keywords

Examples

			Triangle begins:
                           0
                        1  0  3
                     1  0  0  0  5
                  1  0  3  0  5  0  7
               0  0  3  0  0  0  7  0  0
            1  0  0  0  5  0  7  0  0  0 11
         1  0  3  0  0  0  0  0  0  0 11  0 13
      0  0  3  0  5  0  0  0  0  0 11  0 13  0  0
   1  0  0  0  5  0  7  0  0  0 11  0 13  0  0  0 17
1  0  3  0  0  0  7  0  0  0  0  0 13  0  0  0 17  0 19
		

Crossrefs

Programs

  • Maple
    isnotcomp:=proc(n)return (n=1 or isprime(n)) end:
    for n from 1 to 10 do for k from 1 to 2*n-1 do if(not k=n and (isnotcomp(k) and isnotcomp(2*n-k)))then print(k):else print(0):fi:od:od: # Nathaniel Johnston, Apr 18 2011
  • Mathematica
    T[n_, k_] := If[k != n && !CompositeQ[k] && !CompositeQ[2n - k], k, 0];
    Table[T[n, k], {n, 1, 10}, {k, 1, 2n - 1}] // Flatten (* Jean-François Alcover, Dec 04 2017 *)

A154722 Triangle read by rows in which row n lists: n, in the center of the row and the pairs of noncomposite numbers that are equidistant to n, as shown below in the example.

Original entry on oeis.org

1, 1, 2, 3, 1, 3, 5, 1, 3, 4, 5, 7, 3, 5, 7, 1, 5, 6, 7, 11, 1, 3, 7, 11, 13, 3, 5, 8, 11, 13, 1, 5, 7, 9, 11, 13, 17, 1, 3, 7, 10, 13, 17, 19, 3, 5, 11, 17, 19, 1, 5, 7, 11, 12, 13, 17, 19, 23, 3, 7, 13, 19, 23, 5, 11, 14, 17, 23, 1, 7, 11, 13, 15
Offset: 1

Views

Author

Omar E. Pol, Jan 14 2009

Keywords

Examples

			Triangle begins:
. . . . . . . . . . . . . . .1
. . . . . . . . . . . . . 1, 2, 3
. . . . . . . . . . . .1, .. 3, .. 5
. . . . . . . . . . 1, .. 3, 4, 5, .. 7
. . . . . . . . ... .. 3, .. 5, .. 7, .. .
. . . . . . . 1, .. .. .. 5, 6, 7, .. .. .,11
. . . . . .1, .. 3, .. .. .. 7, .. .. ..11, ..13
. . . . .. .. 3, .. 5, .. .. 8, .. ..11, ..13, .. .
. . .1, .. .. .. 5, .. 7, .. 9, ..11, ..13, .. .. ..17
. 1, .. 3, .. .. .. 7, .. .,10, .. ..13, .. .. ..17, ..19
		

Crossrefs

Programs

  • Maple
    isnotcomp:=proc(n)return (n=1 or isprime(n)) end:
    for n from 1 to 10 do for k from 1 to 2*n-1 do if(k=n or (isnotcomp(k) and isnotcomp(2*n-k)))then print(k):fi:od:od: # Nathaniel Johnston, Apr 18 2011
  • Mathematica
    Select[Flatten@Table[If[k == n  || ! CompositeQ[k] && ! CompositeQ[2 n - k], k, 0], {n, 10}, {k, 2 n - 1}], # > 0 &]  (* Robert Price, Apr 26 2025 *)

Extensions

a(45) - a(73) from Nathaniel Johnston, Apr 18 2011

A154723 Triangle read by rows in which row n lists all the pairs of noncomposite numbers that are equidistant from n, or only n if there are no such pairs, as shown below in the example.

Original entry on oeis.org

1, 1, 3, 1, 5, 1, 3, 5, 7, 3, 7, 1, 5, 7, 11, 1, 3, 11, 13, 3, 5, 11, 13, 1, 5, 7, 11, 13, 17, 1, 3, 7, 13, 17, 19, 3, 5, 17, 19, 1, 5, 7, 11, 13, 17, 19, 23, 3, 7, 19, 23, 5, 11, 17, 23, 1, 7, 11, 13, 17, 19, 23, 29, 1, 3, 13, 19, 29, 31, 3
Offset: 1

Views

Author

Omar E. Pol, Jan 14 2009, Jan 16 2009

Keywords

Comments

If the extended Goldbach conjecture is true, such a pair exists in row n for all n >= 2. - Nathaniel Johnston, Apr 18 2011

Examples

			Triangle begins:
                             1
                          1,    3
                       1,          5
                    1,    3,    5,    7
                       3,          7,
              1,          5,    7,         11
           1,    3,                     11,   13
              3,    5,               11,   13,
     1,          5,    7,         11,   13,         17
  1,    3,          7,               13,         17,   19
		

Crossrefs

Programs

  • Maple
    isnotcomp:=proc(n)return (n=1 or isprime(n)) end:
    print(1):for n from 1 to 10 do for k from 1 to 2*n-1 do if(not k=n and (isnotcomp(k) and isnotcomp(2*n-k)))then print(k):fi:od:od: # Nathaniel Johnston, Apr 18 2011
  • Mathematica
    Table[If[Length@ # == 1, #, DeleteCases[#, n]] &@ Union@ Flatten@ Select[IntegerPartitions[2 n, {2}], AllTrue[#, ! CompositeQ@ # &] &], {n, 17}] // Flatten (* Michael De Vlieger, Dec 06 2018 *)

Extensions

a(36)-a(70) from Nathaniel Johnston, Apr 18 2011

A154724 Triangle read by rows in which row n lists 2n-1 terms: n, in the center of the row and the pairs of prime numbers that are equidistant to n, with 0's inserted, as shown below in the example.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jan 14 2009

Keywords

Examples

			Triangle begins:
                             1
                          0, 2, 0
                       0, 0, 3, 0, 0
                    0, 0, 3, 4, 5, 0, 0
                 0, 0, 3, 0, 5, 0, 7, 0, 0
              0, 0, 0, 0, 5, 6, 7, 0, 0, 0, 0
           0, 0, 3, 0, 0, 0, 7, 0, 0, 0,11, 0, 0
        0, 0, 3, 0, 5, 0, 0, 8, 0, 0,11, 0,13, 0, 0
     0, 0, 0, 0, 5, 0, 7, 0, 9, 0,11, 0,13, 0, 0, 0, 0
  0, 0, 3, 0, 0, 0, 7, 0, 0,10, 0, 0,13, 0, 0, 0,17, 0, 0
		

Crossrefs

Programs

  • Maple
    for n from 1 to 10 do for k from 1 to 2*n-1 do if(k=n or (isprime(k) and isprime(2*n-k)))then print(k):else print(0):fi:od:od: # Nathaniel Johnston, Apr 18 2011
  • Mathematica
    Flatten@Table[If[k == n  || ( PrimeQ[k] && PrimeQ[2 n - k]), k, 0], {n, 10}, {k, 2 n - 1}] (* Robert Price, Apr 26 2025 *)

A154727 Triangle read by rows in which row n lists all the pairs of prime numbers that are equidistant from n, or only n if there is no such pair, as shown below in the example.

Original entry on oeis.org

1, 2, 3, 3, 5, 3, 7, 5, 7, 3, 11, 3, 5, 11, 13, 5, 7, 11, 13, 3, 7, 13, 17, 3, 5, 17, 19, 5, 7, 11, 13, 17, 19, 3, 7, 19, 23, 5, 11, 17, 23, 7, 11, 13, 17, 19, 23, 3, 13, 19, 29, 3, 5, 11, 23, 29, 31, 5, 7, 13, 17, 19, 23, 29, 31, 7, 31, 3, 11, 17
Offset: 1

Views

Author

Omar E. Pol, Jan 14 2009, Jan 16 2009

Keywords

Comments

If the extended Goldbach conjecture is true, such a pair exists in row n for all n >= 4. - Nathaniel Johnston, Apr 18 2011

Examples

			Triangle begins:
                          1
                          2
                          3
                       3, .  5
                    3, .  .  .  7
                 .  .  5, .  7, . .
              3, .  .  .  .  .  .  . 11
           3, .  5, .  .  .  .  . 11, . 13
        .  .  5, .  7, .  .  . 11, . 13, .  .
     3, .  .  .  7, .  .  .  .  . 13, .  .  . 17
		

Crossrefs

Programs

  • Maple
    print(1):print(2):print(3):for n from 1 to 15 do for k from 1 to 2*n-1 do if(not k=n and (isprime(k) and isprime(2*n-k)))then print(k):fi:od:od: # Nathaniel Johnston, Apr 18 2011
  • Mathematica
    Table[n + Union@ Join[#, -#] /. {} -> {n} &@ Select[DeleteCases[n - Prime@ Range[2, PrimePi@ n], 0], AllTrue[n + # {-1, 1}, PrimeQ] &], {n, 20}] // Flatten (* Michael De Vlieger, Feb 03 2019 *)

Extensions

a(24)-a(70) from Nathaniel Johnston, Apr 18 2011

A154725 Triangle read by rows in which row n lists 2n-1 terms: The pairs of prime numbers that are equidistant to n, with 0's inserted, as shown below in the example.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 5, 0, 0, 0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 5, 0, 7, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 3, 0, 5, 0, 0, 0, 0, 0, 11, 0, 13, 0, 0, 0, 0, 0, 0, 5, 0, 7, 0, 0, 0, 11, 0, 13, 0, 0, 0, 0
Offset: 1

Views

Author

Omar E. Pol, Jan 14 2009

Keywords

Comments

Each entry of the n-th row is either 0 or a prime p from the 2n-th row of A002260 such that 2n-p is also prime. - Jason Kimberley, Jul 08 2012

Examples

			Triangle begins:
                             0
                          0, 0, 0
                       0, 0, 0, 0, 0
                    0, 0, 3, 0, 5, 0, 0
                 0, 0, 3, 0, 0, 0, 7, 0, 0
              0, 0, 0, 0, 5, 0, 7, 0, 0, 0, 0
           0, 0, 3, 0, 0, 0, 0, 0, 0, 0,11, 0, 0
        0, 0, 3, 0, 5, 0, 0, 0, 0, 0,11, 0,13, 0, 0
     0, 0, 0, 0, 5, 0, 7, 0, 0, 0,11, 0,13, 0, 0, 0, 0
  0, 0, 3, 0, 0, 0, 7, 0, 0, 0, 0, 0,13, 0, 0, 0,17, 0, 0
From _Jason Kimberley_, Jul 08 2012: (Start)
Square array begins:
   3,    3,    3,    0,    3,    3,    0,    3,    3, ...
      0,    0,    0,    0,    0,    0,    0,    0, ...
   5,    5,    5,    0,    5,    5,    0,    5, ...
      0,    0,    0,    0,    0,    0,    0, ...
   7,    7,    7,    0,    7,    7,    0, ...
      0,    0,    0,    0,    0,    0, ...
   0,    0,    0,    0,    0,    0, ...
      0,    0,    0,    0,    0, ...
  11,   11,   11,    0,   11, ...
      0,    0,    0,    0, ...
  13,   13,   13,    0, ...
      0,    0,    0, ...
   0,    0,    0, ...
      0,    0, ...
  17,   17, ...
      0, ...
  19, ...
(End)
		

Crossrefs

Programs

  • Maple
    for n from 1 to 10 do for k from 1 to 2*n-1 do if(not k=n and (isprime(k) and isprime(2*n-k)))then print(k):else print(0):fi:od:od: # Nathaniel Johnston, Apr 18 2011
  • Mathematica
    Flatten@Table[If[k != n  &&  PrimeQ[k] && PrimeQ[2 n - k], k, 0], {n, 10}, {k, 2 n - 1}] (* Robert Price, Apr 26 2025 *)

A154726 Triangle read by rows in which row n lists: n, in the center of the row and the pairs of prime numbers that are equidistant to n, as shown below in the example.

Original entry on oeis.org

1, 2, 3, 3, 4, 5, 3, 5, 7, 5, 6, 7, 3, 7, 11, 3, 5, 8, 11, 13, 5, 7, 9, 11, 13, 3, 7, 10, 13, 17, 3, 5, 11, 17, 19, 5, 7, 11, 12, 13, 17, 19, 3, 7, 13, 19, 23, 5, 11, 14, 17, 23, 7, 11, 13, 15, 17, 19, 23, 3, 13, 16, 19, 29, 3, 5, 11, 17, 23, 29
Offset: 1

Views

Author

Omar E. Pol, Jan 14 2009

Keywords

Examples

			Triangle begins:
                       1
                       2
                       3
                    3  4  5
                 3  .  5  .  7
              .  .  5  6  7  .  .
           3  .  .  .  7  .  .  . 11
        3  .  5  .  .  8  .  . 11  . 13
     .  .  5  .  7  .  9  . 11  . 13  .  .
  3  .  .  .  7  .  . 10  .  . 13  .  .  . 17
		

Crossrefs

Programs

  • Maple
    for n from 1 to 10 do for k from 1 to 2*n-1 do if(k=n or (isprime(k) and isprime(2*n-k)))then print(k):fi:od:od: # Nathaniel Johnston, Apr 18 2011
  • Mathematica
    Select[Flatten@Table[If[k == n  || ( PrimeQ[k] && PrimeQ[2 n - k]), k, 0], {n, 10}, {k, 2 n - 1}] , # > 0 &] (* Robert Price, Apr 26 2025 *)

Extensions

a(31)-a(70) from Nathaniel Johnston, Apr 18 2011

A171637 Triangle read by rows in which row n lists the distinct primes of the distinct decompositions of 2n into unordered sums of two primes.

Original entry on oeis.org

2, 3, 3, 5, 3, 5, 7, 5, 7, 3, 7, 11, 3, 5, 11, 13, 5, 7, 11, 13, 3, 7, 13, 17, 3, 5, 11, 17, 19, 5, 7, 11, 13, 17, 19, 3, 7, 13, 19, 23, 5, 11, 17, 23, 7, 11, 13, 17, 19, 23, 3, 13, 19, 29, 3, 5, 11, 17, 23, 29, 31, 5, 7, 13, 17, 19, 23, 29, 31, 7, 19, 31, 3, 11, 17, 23, 29, 37, 5, 11
Offset: 2

Views

Author

Juri-Stepan Gerasimov, Dec 13 2009

Keywords

Comments

Each entry of the n-th row is a prime p from the n-th row of A002260 such that 2n-p is also prime. If A002260 is read as the antidiagonals of a square array, this sequence can be read as an irregular square array (see example below). The n-th row has length A035026(n). This sequence is the nonzero subsequence of A154725. - Jason Kimberley, Jul 08 2012

Examples

			a(2)=2 because for row 2: 2*2=2+2; a(3)=3 because for row 3: 2*3=3+3; a(4)=3 and a(5)=5 because for row 4: 2*4=3+5; a(6)=3, a(7)=5 and a(8)=7 because for row 5: 2*5=3+7=5+5.
The table starts:
2;
3;
3,5;
3,5,7;
5,7;
3,7,11;
3,5,11,13;
5,7,11,13;
3,7,13,17;
3,5,11,17,19;
5,7,11,13,17,19;
3,7,13,19,23;
5,11,17,23;
7,11,13,17,19,23;
3,13,19,29;
3,5,11,17,23,29,31;
As an irregular square array [_Jason Kimberley_, Jul 08 2012]:
3 . 3 . 3 . . . 3 . 3 . . . 3 . 3
. . . . . . . . . . . . . . . .
5 . 5 . 5 . . . 5 . 5 . . . 5
. . . . . . . . . . . . . .
7 . 7 . 7 . . . 7 . 7 . .
. . . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . .
11. 11. 11. . . 11
. . . . . . . .
13. 13. 13. .
. . . . . .
. . . . .
. . . .
17. 17
. .
19
		

Crossrefs

Related triangles: A154720, A154721, A154722, A154723, A154724, A154725, A154726, A154727, A184995. - Jason Kimberley, Sep 03 2011
Cf. A020481 (left edge), A020482 (right edge), A238778 (row sums), A238711 (row products), A000040, A010051.

Programs

  • Haskell
    a171637 n k = a171637_tabf !! (n-2) !! (k-1)
    a171637_tabf = map a171637_row [2..]
    a171637_row n = reverse $ filter ((== 1) . a010051) $
       map (2 * n -) $ takeWhile (<= 2 * n) a000040_list
    -- Reinhard Zumkeller, Mar 03 2014
  • Mathematica
    Table[ps = Prime[Range[PrimePi[2*n]]]; Select[ps, MemberQ[ps, 2*n - #] &], {n, 2, 50}] (* T. D. Noe, Jan 27 2012 *)

Extensions

Keyword:tabl replaced by tabf, arbitrarily defined a(1) removed and entries checked by R. J. Mathar, May 22 2010
Definition clarified by N. J. A. Sloane, May 23 2010

A154786 Row sums of triangle in A154725.

Original entry on oeis.org

0, 0, 0, 8, 10, 12, 14, 32, 36, 40, 44, 72, 52, 56, 90, 64, 102, 144, 38, 120, 168, 132, 138, 240, 200, 156, 270, 168, 174, 360, 124, 320, 396, 136, 350, 432, 296, 380, 546, 320, 328, 672, 344, 352, 810, 368, 376, 672, 294, 600, 816, 520, 530, 864, 660, 784, 1140
Offset: 1

Views

Author

Omar E. Pol, Jan 15 2009, Jan 16 2009

Keywords

Crossrefs

Programs

  • Maple
    A154786 := proc(n) local a,d; a := 0 ; for d from 1 to n-2 do if isprime(n-d) and isprime(n+d) then a := a+2*n; fi; od: a ; end: for n from 1 to 80 do printf("%d,",A154786(n)) ; od: # R. J. Mathar, Jan 18 2009

Formula

a(n) = A154785(n) - n.
a(n) = A005843(n)*A061357(n). - Omar E. Pol, Jan 20 2009

Extensions

Edited by Omar E. Pol, Jan 17 2009
Extended by R. J. Mathar, Jan 18 2009
Showing 1-10 of 19 results. Next