login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A238204 Even numbers n such that the difference with the preceding prime is prime. 2
10, 16, 22, 26, 28, 34, 36, 40, 46, 50, 52, 56, 58, 64, 66, 70, 76, 78, 82, 86, 88, 92, 94, 96, 100, 106, 112, 116, 118, 120, 124, 126, 130, 134, 136, 142, 144, 146, 154, 156, 160, 162, 166, 170, 172, 176, 178, 184, 186, 188, 196, 202, 204, 206, 210, 214, 216 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..1000

EXAMPLE

28 is in the list because 23 is the greatest prime less than 28 and 28 - 23 = 5 is also prime.

MAPLE

a:= proc(n) option remember; local k;

      for k from `if`(n=1, 4, a(n-1)+2) by 2

      while not isprime(k-prevprime(k)) do od; k

    end:

seq(a(n), n=1..60);  # Alois P. Heinz, Mar 03 2014

MATHEMATICA

Select[Range[99] 2, PrimeQ[# - NextPrime[#, -1]] &] (* Giovanni Resta, Feb 22 2014 *)

CROSSREFS

Sequence in context: A129848 A004261 A083118 * A242057 A245024 A264721

Adjacent sequences:  A238201 A238202 A238203 * A238205 A238206 A238207

KEYWORD

nonn

AUTHOR

Franz Vrabec, Feb 20 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 10 07:37 EDT 2020. Contains 336368 sequences. (Running on oeis4.)