A084747 Leading diagonal of triangle (shown below) in which row n lists the n smallest positive numbers k such that k + n is a prime.
1, 3, 8, 9, 14, 17, 24, 29, 32, 33, 42, 47, 54, 57, 58, 63, 72, 79, 84, 87, 88, 91, 108, 113, 114, 123, 124, 129, 138, 143, 150, 159, 160, 163, 164, 175, 190, 191, 194, 199, 210, 215, 226, 227, 232, 235, 246, 259, 262, 263, 266, 279, 294, 295, 298, 303, 310, 315
Offset: 1
Examples
Triangle of A084695(n,k) begins: 1; 1, 3; 2, 4, 8; 1, 3, 7, 9; 2, 6, 8, 12, 14; 1, 5, 7, 11, 13, 17; 4, 6, 10, 12, 16, 22, 24; ... so sequence is 1, 3, 8, 9, 14, 17, 24, ... = A084695(n, n).
Links
- G. C. Greubel, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[NthPrime(#PrimesUpTo(n) +n) -n: n in [1..80]]; // G. C. Greubel, May 12 2023
-
Mathematica
Table[Prime[PrimePi[n] +n] -n, {n, 80}] (* G. C. Greubel, May 12 2023 *)
-
PARI
a(n) = prime(primepi(n) + n) - n; \\ Michel Marcus, Mar 28 2021
-
SageMath
def A084747(n): return nth_prime(prime_pi(n) + n) - n [A084747(n) for n in range(1,81)] # G. C. Greubel, May 12 2023
Formula
a(n) = A084695(n, n).
a(n) = prime(primepi(n) + n) - n. - Richard R. Forberg, Mar 22 2021