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.

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.

This page as a plain text file.
%I A084747 #36 Apr 14 2024 03:49:00
%S A084747 1,3,8,9,14,17,24,29,32,33,42,47,54,57,58,63,72,79,84,87,88,91,108,
%T A084747 113,114,123,124,129,138,143,150,159,160,163,164,175,190,191,194,199,
%U A084747 210,215,226,227,232,235,246,259,262,263,266,279,294,295,298,303,310,315
%N 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.
%H A084747 G. C. Greubel, <a href="/A084747/b084747.txt">Table of n, a(n) for n = 1..10000</a>
%F A084747 a(n) = A084695(n, n).
%F A084747 a(n) = prime(primepi(n) + n) - n. - _Richard R. Forberg_, Mar 22 2021
%e A084747 Triangle of A084695(n,k) begins:
%e A084747   1;
%e A084747   1,  3;
%e A084747   2,  4,  8;
%e A084747   1,  3,  7,  9;
%e A084747   2,  6,  8, 12, 14;
%e A084747   1,  5,  7, 11, 13, 17;
%e A084747   4,  6, 10, 12, 16, 22, 24;
%e A084747   ...
%e A084747 so sequence is 1, 3, 8, 9, 14, 17, 24, ... = A084695(n, n).
%t A084747 Table[Prime[PrimePi[n] +n] -n, {n, 80}] (* _G. C. Greubel_, May 12 2023 *)
%o A084747 (PARI) a(n) = prime(primepi(n) + n) - n; \\ _Michel Marcus_, Mar 28 2021
%o A084747 (Magma) [NthPrime(#PrimesUpTo(n) +n) -n: n in [1..80]]; // _G. C. Greubel_, May 12 2023
%o A084747 (SageMath)
%o A084747 def A084747(n): return nth_prime(prime_pi(n) + n) - n
%o A084747 [A084747(n) for n in range(1,81)] # _G. C. Greubel_, May 12 2023
%Y A084747 For triangle see A084695.
%Y A084747 Cf. A000040 (prime), A000720 (primepi).
%K A084747 easy,nonn
%O A084747 1,2
%A A084747 _Amarnath Murthy_ and _Jason Earls_, Jul 12 2003