

A179182


Natural numbers n such that n+1 or 2n+1 is prime.


0



1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 14, 15, 16, 18, 20, 21, 22, 23, 26, 28, 29, 30, 33, 35, 36, 39, 40, 41, 42, 44, 46, 48, 50, 51, 52, 53, 54, 56, 58, 60, 63, 65, 66, 68, 69, 70, 72, 74, 75, 78, 81, 82, 83, 86, 88, 89, 90, 95, 96, 98, 99, 100, 102, 105, 106, 108, 111, 112, 113, 114, 116, 119, 120, 125, 126, 128
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

Occurs in Blackburn. Complement (not yet in OEIS) is {7, 19, 25, 27, 31, 32, 34, 37, 39, 43, 45, 46, 47, 52, 55, ...}. Abstract: An nary kradius sequence is a finite sequence of elements taken from an alphabet of size n such that any two distinct elements of the alphabet occur within distance k of each other somewhere in the sequence. These sequences were introduced by Jaromczyk and Lonc to model a caching strategy for computing certain functions on large data sets such as medical images.
Let f_k(n) be the shortest length of any kradius sequence. We improve on earlier estimates for f_k(n) by using tilings and logarithms. The main result is that f_k(n) ~ n^2/(2k) as n tends to infinity whenever a certain tiling of Z^r exists. In particular this result holds for infinitely many k, including all k < 195 and all k such that k+1 or 2k+1 is prime [this sequence]. For certain k we get a sharper error term for infinitely many values of n, using the theory of logarithms.


LINKS

Table of n, a(n) for n=1..77.
Simon R. Blackburn, James F. McKee, Constructing kradius sequences, Jun 30 2010.


FORMULA

{n: n such that n+1 is prime or 2*n+1 is prime} = {n: n such that n+1 is in A000040 or 2*n+1 is in A000040} =


EXAMPLE

a(1) = 1 because 1+1 = 2 is prime.
a(2) = 2 because 2+1 = 3 is prime, or because 2*2+1 = 5 is prime.
a(3) = 3 because 2*3+1 = 7 is prime.
a(4) = 4 because 4+1 = 5 is prime.
a(5) = 5 because 2*5+1 = 11 is prime.
a(6) = 6 because 6+1 = 7 is prime, or because 2*6+1 = 13 is prime.
7 is not in the sequence because neither 7+1 = 8 nor 2*7+1 = 15 are prime.


MATHEMATICA

fQ[n_] := PrimeQ[n + 1]  PrimeQ[2 n + 1]; Select[ Range@ 128, fQ@# &]
Select[Range[200], Or@@PrimeQ[{#+1, 2#+1}]&] (* Harvey P. Dale, Jun 11 2014 *)


PROG

(PARI) is(n)=isprime(n+1)  isprime(2*n+1) \\ Charles R Greathouse IV, Jun 13 2017


CROSSREFS

Cf. A000040, A005097 (Odd primes  1)/2, A006093 Primes minus 1.
Sequence in context: A288712 A002180 A207333 * A298303 A333635 A102799
Adjacent sequences: A179179 A179180 A179181 * A179183 A179184 A179185


KEYWORD

easy,nonn


AUTHOR

Jonathan Vos Post, Jul 01 2010


EXTENSIONS

Corrected and extended the sequence and added the Mathematica coding Robert G. Wilson v, Jul 13 2010


STATUS

approved



