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

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]

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