login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A282687 a(n) = strictly increasing number m, such that m+n is the next prime and m-n is the previous prime. 2
4, 5, 26, 93, 144, 157, 300, 1839, 1922, 3099, 3240, 4189, 5544, 5967, 6506, 10815, 11760, 12871, 30612, 33267, 35002, 36411, 81486, 86653, 95676, 103263, 106060, 153219, 181332, 189097, 190440, 288615, 294596, 326403, 399318, 507253, 515004, 570291, 642320 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
For n = 5, a(5) = 144, because the next prime after 144 is 149 and the previous prime before 144 is 139, where both have an equal distance of 5 from 144.
MATHEMATICA
a = {}; Do[If[n == 1, k = 1, k = Max@ a + 1]; While[Nand[k - n == NextPrime[k, -1], k + n == NextPrime@ k], k++]; AppendTo[a, k], {n, 41}]; a (* Michael De Vlieger, Feb 20 2017 *)
PROG
(Perl)
use ntheory qw(:all);
for (my ($n, $k) = (1, 1) ; ; ++$n) {
my $p = prev_prime($n) || next;
my $q = next_prime($n);
if ($n-$p == $k and $q-$n == $k) {
printf("%s %s\n", $k++, $n);
}
}
CROSSREFS
Sequence in context: A084465 A056200 A282690 * A153429 A270217 A270274
KEYWORD
nonn
AUTHOR
Daniel Suteu, Feb 20 2017
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 19:56 EDT 2024. Contains 371963 sequences. (Running on oeis4.)