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

A125765 Consider the array T(n, m) = m-th prime of the form n*i(i+1)/2 +/- 1. This sequence is the main diagonal.

Original entry on oeis.org

2, 5, 19, 13, 181, 59, 463, 439, 2699, 281, 2309, 541, 8191, 2141, 6091, 3697, 11321, 1889, 38303, 7019, 24697, 8933, 42089, 11159, 39901, 21319, 61507, 21839, 266221, 17851, 182467, 37633, 104281, 102103, 173249, 40609, 386279, 32719, 229553
Offset: 1

Views

Author

Keywords

Comments

T(n, m) is a prime which is n times some triangular number plus or minus 1.
Eventually all primes, p, appear since (p +/-1) times 1(1+1)/2 equals (p +/- 1).

Examples

			1 | 2, 5, 7, 11, 29, 37, 67, 79, 137, 191, 211, 277, 379, 631, 821, ...
2 | 3, 5, 7, 11, 13, 19, 29, 31, 41, 43, 71, 73, 89, 109, 131, ...
3 | 2, 17, 19, 29, 31, 83, 107, 109, 197, 199, 233, 359, 409, 569, 571, ...
4 | 3, 5, 11, 13, 23, 41, 59, 61, 83, 113, 179, 181, 263, 311, 313, ...
5 | 29, 31, 139, 179, 181, 331, 389, 599, 601, 1049, 1051, 1381, 1499, 1889, 2029, ...
6 | 5, 7, 17, 19, 37, 59, 61, 89, 127, 167, 269, 271, 331, 397, 467, ...
7 | 41, 43, 71, 197, 251, 461, 463, 547, 839, 953, 1471, 1931, 1933, 2099, 2647, ...
8 | 7, 23, 47, 79, 167, 223, 359, 439, 727, 839, 1087, 1223, 1367, 1847, 2207, ...
9 | 53, 89, 251, 593, 701, 1223, 1709, 1889, 2699, 4463, 4751, 5669, 7019, 8513,10151, ...
10 | 11, 29, 31, 59, 61, 101, 149, 151, 211, 281, 359, 449, 659, 661, 911, ...
11 | 67, 109, 307, 397, 727, 857, 859, 1319, 1321, 2089, 2309, 2311, 3037, 3299, 3301, ...
		

Crossrefs

Programs

  • Mathematica
    T[n_, m_] := Block[{c = 0, k = 1, s = {}, trnglr}, While[c < m + 1, trnglr = n*k(k + 1)/2; If[ PrimeQ[trnglr - 1], c++; AppendTo[s, trnglr - 1]]; If[PrimeQ[trnglr + 1], c++; AppendTo[s, trnglr + 1]]; k++; s = Union@s]; s[[m]] ]; Table[T[n, n], {n, 40}]

A125766 Consider the array T(n, m) = m-th prime of the form n*i(i+1)/2 +- 1. This sequence is read by antidiagonals.

Original entry on oeis.org

2, 3, 5, 2, 5, 7, 3, 17, 7, 11, 29, 5, 19, 11, 29, 5, 31, 11, 29, 13, 37, 41, 7, 139, 13, 31, 19, 67, 7, 43, 17, 179, 23, 83, 29, 79, 53, 23, 71, 19, 181, 41, 107, 31, 137, 11, 89, 47, 197, 37, 331, 59, 109, 41, 191, 67, 29, 251, 79, 251, 59, 389, 61, 197, 43, 211, 11, 109, 31
Offset: 1

Views

Author

Keywords

Comments

T(n, m) is the m-th prime in order which is n times some triangular number plus or minus 1.
Eventually all primes, p, appear since (p +-1) times 1(1+1)/2 equals (p +- 1).

Examples

			1 | 2, 5, 7, 11, 29, 37, 67, 79, 137, 191, 211, 277, 379, 631, 821, ...
2 | 3, 5, 7, 11, 13, 19, 29, 31, 41, 43, 71, 73, 89, 109, 131, ...
3 | 2, 17, 19, 29, 31, 83, 107, 109, 197, 199, 233, 359, 409, 569, 571, ...
4 | 3, 5, 11, 13, 23, 41, 59, 61, 83, 113, 179, 181, 263, 311, 313, ...
5 | 29, 31, 139, 179, 181, 331, 389, 599, 601, 1049, 1051, 1381, 1499, 1889, 2029, ...
6 | 5, 7, 17, 19, 37, 59, 61, 89, 127, 167, 269, 271, 331, 397, 467, ...
7 | 41, 43, 71, 197, 251, 461, 463, 547, 839, 953, 1471, 1931, 1933, 2099, 2647, ...
8 | 7, 23, 47, 79, 167, 223, 359, 439, 727, 839, 1087, 1223, 1367, 1847, 2207, ...
9 | 53, 89, 251, 593, 701, 1223, 1709, 1889, 2699, 4463, 4751, 5669, 7019, 8513,10151, ...
10 | 11, 29, 31, 59, 61, 101, 149, 151, 211, 281, 359, 449, 659, 661, 911, ...
11 | 67, 109, 307, 397, 727, 857, 859, 1319, 1321, 2089, 2309, 2311, 3037, 3299, 3301, ...
		

Crossrefs

Programs

  • Mathematica
    T[n_, m_] := Block[{c = 0, k = 1, s = {}, trnglr}, While[c < m + 1, trnglr = n*k(k + 1)/2; If[ PrimeQ[trnglr - 1], c++; AppendTo[s, trnglr - 1]]; If[PrimeQ[trnglr + 1], c++; AppendTo[s, trnglr + 1]]; k++; s = Union@s]; s[[m]] ]; Table[ T[n - m + 1, m], {n, 12}, {m, n}] // Flatten

A125767 Least prime of the form n*T_i +/-1, where T is a triangular number.

Original entry on oeis.org

2, 3, 2, 3, 29, 5, 41, 7, 53, 11, 67, 11, 79, 13, 89, 17, 101, 17, 113, 19, 127, 23, 137, 23, 149, 79, 163, 29, 173, 29, 311, 31, 197, 101, 211, 37, 223, 37, 233, 41, 409, 41, 257, 43, 269, 47, 281, 47, 293, 149, 307, 53, 317, 53, 331, 167, 569, 59, 353, 59, 367, 61, 379
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1, s = {}, trnglr}, While[s == {}, trnglr = n*k(k + 1)/2; If[PrimeQ[trnglr - 1], AppendTo[s, trnglr - 1]]; If[PrimeQ[trnglr + 1], AppendTo[s, trnglr + 1]]; k++ ]; s[[1]]]; Array[f, 63]

A125769 a(n) is the least number j such that j*T_k +/- 1 is n-th prime for some k-th triangular number.

Original entry on oeis.org

1, 2, 1, 1, 1, 2, 3, 2, 4, 1, 2, 1, 2, 2, 8, 9, 4, 4, 1, 2, 2, 1, 3, 2, 16, 10, 17, 3, 2, 4, 6, 2, 1, 5, 10, 10, 2, 27, 6, 29, 4, 2, 1, 32, 3, 3, 1, 8, 38, 23, 3, 2, 2, 7, 43, 4, 6, 2, 1, 10, 47, 14, 2, 4, 4, 53, 5, 12, 58, 35, 59, 3, 61, 62, 1, 64, 5, 6, 40, 3, 2, 2, 12, 12, 8, 74, 10, 76, 2, 2, 6, 4
Offset: 1

Views

Author

Keywords

Comments

Eventually all primes p appear since (p +/-1) times 1(1+1)/2 equals (p +/- 1).
If we asked for the least number k then k always equals 1 since all primes p appear since (p +/-1) times 1(1+1)/2 equals (p +/- 1).
The k's for the corresponding j's are: round(sqrt(2p/j)).
First occurrence of i is A125770: 1, 2, 7, 9, 34, 31, 54, 15, 16, 26, 148, 68, 398, 62, 193, 25, 27, 140, 550, 397, 107, 113, ...,.

Examples

			a(1) = 1 because 1*1+1 = 2 which is the first prime,
a(2) = 2 because 2*1+1 = 3 which is the second prime,
a(3) = 4 because 1*6-1 = 5 which is the third prime,
a(8) = 3 because 2*10-1 = 19 which is the eighth prime, ...
		

Crossrefs

Programs

  • Mathematica
    triQ[n_] := IntegerQ@ Sqrt[8n + 1]; f[n_] := Block[{j = 1, p = Prime@n}, While[ !triQ[(p - 1)/j] && !triQ[(p + 1)/j], j++ ]; j]; Array[f, 92]

A125770 First occurrence of n in A125769.

Original entry on oeis.org

1, 2, 7, 9, 34, 31, 54, 15, 16, 26, 148, 68, 398, 62, 193, 25, 27, 140, 550, 397, 107, 113, 50, 122, 950, 226, 38, 169, 40, 562, 187, 44, 327, 763, 70, 211, 362, 49, 1726, 79, 394, 153, 55, 202, 1600, 125, 61, 419, 94, 95, 225, 98, 66, 1036, 508, 1298, 983, 69, 71
Offset: 1

Views

Author

Keywords

Comments

If we restrict ourselves to just j*T_k +1 or j*T_k -1 then there are values which do not occur. As an example if the minus is used then 8 and 9 are missing.

Crossrefs

A125769 = a(n) is the least number j such that j*T_k +/- 1 is n-th prime for some k-th triangular number.

Programs

  • Mathematica
    triQ[n_] := IntegerQ@ Sqrt[8*n + 1]; f[n_] := Block[{j = 1, p = Prime@n}, While[ !triQ[(p - 1)/j] && !triQ[(p + 1)/j], j++ ]; j]; t = Table[0, {100}]; Do[ a = f@n; If[a < 101 && t[[a]] == 0, t[[a]] = n; Print[{a, n}]], {n, 3500}]; t

A125771 Primes of the form j*T_k +/- 1, where T_k is the k-th triangular number greater than 9.

Original entry on oeis.org

11, 19, 29, 31, 37, 41, 43, 59, 61, 67, 71, 73, 79, 83, 89, 101, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 167, 179, 181, 191, 197, 199, 211, 223, 229, 233, 239, 241, 251, 263, 269, 271, 277, 281, 293, 307, 311, 313, 331, 337, 349, 359, 379, 389, 397
Offset: 1

Views

Author

Keywords

Comments

Since all primes would eventually appear in A125765 or A125766 because (p +/-1) times 1(1+1)/2 equals (p +/- 1) let us not use the first triangular number 1.
Primes not of the form j*T_k +/- 1, where T_k is the k-th triangular number greater than 1 only produces one prime: 3. If we restrict triangular numbers greater than 5, then only two primes are found: 2 & 3.

Examples

			11 = 1*10 +1,
19 = 2*10 -1, etc.
		

Crossrefs

Programs

  • Mathematica
    s = {}; Do[m = j*k*(k + 1)/2; If[ PrimeQ[m - 1], AppendTo[s, m - 1]]; If[ PrimeQ[m + 1], AppendTo[s, m + 1]], {j, 40}, {k, 4, 23}]; Take[ Union@s, 75]
Showing 1-6 of 6 results.