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

A184995 Irregular triangle T, read by rows, in which row n lists the primes p <= n such that 2n-p is also prime.

Original entry on oeis.org

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

Views

Author

Jason Kimberley, Sep 03 2011

Keywords

Comments

Row n has first entry A020481(n), length A045917(n), and last entry A112823(n).
Each row is the prefix to the middle of the corresponding row of A171637.
The Goldbach conjecture states that this irregular Goldbach triangle has in each row at least one entry (A045917(n) >= 1). - Wolfdieter Lang, May 14 2016

Examples

			The irregular triangle T(n, i) starts:
n, 2*n\i  1   2   3   4   5   6 ...
2,   4    2
3,   6    3
4,   8    3
5,  10    3   5
6,  12    5
7,  14    3   7
8,  16    3   5
9,  18    5   7
10, 20    3   7
11, 22    3   5  11
12, 24    5   7  11
13, 26    3   7  13
14, 28    5  11
15, 30    7  11  13
16, 32    3  13
17, 34    3   5  11  17
18, 36    5   7  13  17
19, 38    7  19
20, 40    3  11  17
21, 42    5  11  13  19
22, 44    3   7  13
23, 46    3   5  17  23
24, 48    5   7  11  17  19
25, 50    3   7  13  19
26, 52    5  11  23
27, 54    7  11  13  17  23
28, 56    3  13  19
29, 58    5  11  17  29
30, 60    7  13  17  19  23  29
... reformatted - _Wolfdieter Lang_, May 14 2016
		

Crossrefs

Programs

  • Magma
    A184995 := func;
    &cat[A184995(n):n in [2..30]];
  • Maple
    T:= n-> seq(`if`(andmap(isprime, [p, 2*n-p]), p, NULL), p=2..n):
    seq(T(n), n=2..40);  # Alois P. Heinz, Jan 09 2025
  • Mathematica
    Table[Select[Prime@ Range@ PrimePi@ n, PrimeQ[2 n - #] &], {n, 2, 30}] // Flatten (* Michael De Vlieger, May 14 2016 *)
    T[n_] := Table[If[PrimeQ[p] && PrimeQ[2n-p], p, Nothing], {p, 2, n}];
    Table[T[n], {n, 2, 30}] // Flatten (* Jean-François Alcover, Jan 09 2025, after Alois P. Heinz in A182138 *)

Formula

T(n,i) = n - A182138(n,i). - Jason Kimberley, Sep 25 2012

A154784 Row sums of triangle in A154721.

Original entry on oeis.org

0, 4, 6, 16, 10, 24, 28, 32, 54, 60, 44, 96, 52, 56, 120, 96, 102, 144, 76, 120, 210, 176, 138, 288, 200, 156, 324, 168, 174, 420, 186, 320, 396, 204, 350, 504, 370, 380, 546, 400, 328, 756, 344, 352, 900, 368, 376, 672, 392, 600
Offset: 1

Views

Author

Omar E. Pol, Jan 15 2009

Keywords

Comments

a(n) is even for all n.

Crossrefs

Programs

  • Maple
    isnotcomp:=proc(n)return (n=1 or isprime(n)) end:
    for n from 1 to 50 do rsum:=0: for k from 1 to 2*n-1 do if(not k=n and (isnotcomp(k) and isnotcomp(2*n-k)))then rsum:=rsum+k:fi:od: printf("%d, ",rsum):od: # Nathaniel Johnston, Apr 19 2011

Formula

a(n) = A154783(n) - n.

Extensions

Edited by Omar E. Pol, Jan 17 2009
a(11)-a(50) from Nathaniel Johnston, Apr 19 2011

A154804 Number of ways to represent 2*n as the sum of two distinct primes (counting 1 as a prime).

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jan 16 2009

Keywords

Comments

Number of ways to represent 2*n as the sum of two distinct noncomposite numbers. - Omar E. Pol, Dec 11 2024

Crossrefs

Formula

a(n) = A101264(n-1) + A061357(n). [From R. J. Mathar, Jan 21 2009]
a(n) = A001031(n) - A080339(n).

Extensions

More terms from R. J. Mathar, Jan 21 2009
Edited by Franklin T. Adams-Watters, Jan 31 2009

A154799 Records in A154804.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 19, 20, 21, 24, 28, 31, 33, 41, 42, 44, 52, 58, 69, 73, 76, 83, 92, 98, 115, 129, 138, 139, 154, 164, 165, 166, 172, 190, 198, 218, 223, 241, 268, 274, 292, 304, 330, 331, 341, 362, 394, 434, 447, 448, 466, 478
Offset: 1

Views

Author

Omar E. Pol, Feb 01 2009

Keywords

Crossrefs

Programs

  • Maple
    read("transforms") ; A008578 := proc(n) RETURN( n=1 or isprime(n) ) ; end : A154804 := proc(n) local a,d; a := 0 ; for d from 1 to n-1 do if A008578(n-d) and A008578(n+d) then a := a+1; fi; od: a ; end: a804 := [seq(A154804(n),n=1..5000)] ; r := RECORDS(a804)[1] ; # R. J. Mathar, Mar 14 2009

Extensions

More terms from R. J. Mathar, Mar 14 2009
a(53) and beyond from Michael S. Branicky, Dec 11 2024

A154787 a(n) = A061357(n)*n = A154786(n)/2.

Original entry on oeis.org

0, 0, 0, 4, 5, 6, 7, 16, 18, 20, 22, 36, 26, 28, 45, 32, 51, 72, 19, 60, 84, 66, 69, 120, 100, 78, 135, 84, 87, 180, 62, 160, 198, 68, 175, 216, 148, 190, 273, 160, 164, 336, 172, 176, 405, 184, 188, 336, 147, 300, 408, 260, 265, 432, 330, 392, 570
Offset: 1

Views

Author

Omar E. Pol, Jan 20 2009

Keywords

Crossrefs

A154791 Triangle read by rows in which row n lists all the pairs of noncomposite numbers that are equidistant from n, with 0's inserted, as shown below in the example.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jan 25 2009

Keywords

Examples

			Triangle begins:
n ....... Pairs
1 ..........0
2 ........ 1,3
3 ....... 1,0,5
4 ...... 1,3,5,7
5 ..... 0,3,0,7,0
6 .... 1,0,5,7,0,11
		

Crossrefs

Programs

  • PARI
    iscomp(n) = (n!=1) && !isprime(n);
    vecp(n) = {v = vector(n, i, 2*i-1); for (i = 1, n\2, if (iscomp(v[i]) || iscomp(v[n-i+1]), v[i] = 0; v[n-i+1] = 0);); if ((n % 2), v[n\2+1] = 0); v;}
    trgp(nn) = {for (n = 1, nn, v = vecp(n); for (k = 1, n, print1(v[k], ", ");); print(););} \\ Michel Marcus, Feb 13 2014

Extensions

More terms from Michel Marcus, Feb 13 2014

A154800 List of pairs of primes that are equidistant from and nearest to n, or the pair (0,0) if there is no such pair.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 3, 5, 3, 7, 5, 7, 3, 11, 5, 11, 7, 11, 7, 13, 5, 17, 11, 13, 7, 19, 11, 17, 13, 17, 13, 19, 11, 23, 17, 19, 7, 31, 17, 23, 19, 23, 13, 31, 17, 29, 19, 29, 19, 31, 23, 29, 23, 31, 19, 37, 17, 41, 29, 31, 19, 43, 23, 41, 29, 37, 31, 37, 29, 41, 31, 41, 31, 43, 29, 47
Offset: 1

Views

Author

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

Keywords

Comments

Conjecture: There are only six 0's in this sequence.

Examples

			Array begins:
n ............... Pair
1 .............. 0 . 0
2 .............. 0 . 0
3 .............. 0 . 0
4 .............. 3 . 5
5 ............ 3 . . . 7
6 .............. 5 . 7
7 ........ 3 . . . . . . . 11
8 .......... 5 . . . . . 11
9 ............ 7 . . . 11
10 ......... 7 . . . . . 13
		

Crossrefs

Programs

  • Maple
    A154800 := proc(n) local d; for d from 1 to n-1 do if isprime(n-d) and isprime(n+d) then printf("%d,%d,",n-d,n+d); RETURN() ; fi; od: printf("0,0,") ; end: seq(A154800(n),n=1..80) ; # R. J. Mathar, Jul 13 2009

Extensions

More terms from R. J. Mathar, Jul 13 2009

A154891 Where records occurs in A154804.

Original entry on oeis.org

1, 2, 4, 9, 12, 21, 24, 30, 42, 45, 57, 60, 75, 84, 90, 105, 135, 150, 165, 195, 210, 255, 315, 330, 390, 420, 525, 630, 735, 825, 840, 945, 1050, 1155, 1365, 1575, 1680, 1785, 1995, 2100, 2145, 2205, 2310, 2625, 2730, 3045, 3255, 3465, 3990, 4095, 4515, 4620
Offset: 1

Views

Author

Omar E. Pol, Feb 01 2009

Keywords

Crossrefs

Programs

  • Maple
    A008578 := proc(n) RETURN( n=1 or isprime(n) ) ; end : A154804 := proc(n) local a,d; a := 0 ; for d from 1 to n-1 do if A008578(n-d) and A008578(n+d) then a := a+1; fi; od: a ; end: a804 := [seq(A154804(n),n=1..4000)] ; r := RECORDS(a804)[2] ; # R. J. Mathar, Mar 14 2009

Extensions

More terms from R. J. Mathar, Mar 14 2009
a(50) and beyond from Michael S. Branicky, Dec 11 2024

A154792 Triangle read by rows in which row n lists the pair of noncomposite numbers that are equidistant from and nearest to n, with 0's inserted, as shown below in the example.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Jan 25 2009

Keywords

Examples

			Triangle begins:
n ........ Pair
1 ..........0
2 ........ 1,3
3 ....... 1,0,5
4 ...... 0,3,5,0
5 ..... 0,3,0,7,0
6 .... 0,0,5,7,0,0
		

Crossrefs

Previous Showing 11-19 of 19 results.