login
Numbers that are prime or one less than a prime.
9

%I #68 Mar 21 2023 09:21:21

%S 1,2,3,4,5,6,7,10,11,12,13,16,17,18,19,22,23,28,29,30,31,36,37,40,41,

%T 42,43,46,47,52,53,58,59,60,61,66,67,70,71,72,73,78,79,82,83,88,89,96,

%U 97,100,101,102,103,106,107,108,109,112,113,126,127,130,131,136,137,138,139

%N Numbers that are prime or one less than a prime.

%C Indices of the triangular numbers in A147846.

%C Integers k such that k or k+1 is prime. - _Giovanni Teofilatto_, Mar 05 2010

%C For a given common difference d, there always exists a longest possible arithmetic progression (AP) of primes, and the number of elements k in this AP of primes is necessarily a term of this sequence. See A123556 for explanations. - _Bernard Schott_, Mar 18 2023

%H Harvey P. Dale, <a href="/A173919/b173919.txt">Table of n, a(n) for n = 1..1000</a>.

%H Diophante, <a href="http://www.diophante.fr/problemes-par-themes/arithmetique-et-algebre/a1-pot-pourri/3940-a1880-np-en-pa">A1880. NP (Nombres Premiers) en PA (Progression Arithmétique)</a> (in French).

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Primes_in_arithmetic_progression">Primes in arithmetic progression</a>.

%H <a href="/index/Pri#primes_AP">Index entries for sequences related to primes in arithmetic progressions</a>.

%F A006093 U A000040.

%t {#-1,#}&/@Prime[Range[40]]//Flatten//Union (* _Harvey P. Dale_, Dec 21 2018 *)

%Y Cf. A000217, A147846.

%Y Cf. A040976, A123556, A360735.

%Y Complement to A068780. [_Giovanni Teofilatto_, Mar 11 2010]

%K nonn,easy

%O 1,2

%A _Giovanni Teofilatto_, Mar 02 2010

%E Definition corrected and sequence extended by _R. J. Mathar_, Feb 24 2010, Mar 05 2010