|
|
A268308
|
|
a(1)=1, a(2)=2; thereafter a(n) is the smallest number not yet used such that a(n)+a(n-1)+a(n-2) is prime but a(n)+a(n-2) is not.
|
|
1
|
|
|
1, 2, 8, 7, 4, 18, 21, 14, 6, 11, 12, 24, 23, 20, 10, 13, 30, 36, 5, 26, 16, 19, 32, 38, 3, 42, 22, 9, 28, 46, 27, 34, 48, 15, 40, 54, 37, 58, 44, 29, 64, 56, 17, 66, 68, 33, 50, 84, 45, 52, 60, 25, 72, 70, 39, 82, 76, 35, 62, 94, 43, 74, 80, 69, 78, 86, 47
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
It appears that 2/3 of the terms are close to the line a(n) = 4n/3 and 1/3 are close to the line a(n) = 2n/3.
From Robert Israel: Given positive integers a,b, there will always be infinitely many positive integers c such that a+b+c is prime but a+c is composite. In fact, let p, q be any distinct primes coprime to a+b and b respectively. Let d == - ap^(-1) mod q, and consider the numbers f(k) = d p + k p q for k >= 0. Since a + b + d p is coprime to p q, Dirichlet's theorem says a + b + f(k) is prime for infinitely many k. On the other hand, a + f(k) is divisible by q for all k.
Trisections of this probable permutation of n:
1, 7, 21, 11, 23, 13, 5, 19, ...
2, 4, 14, 12, 20, 30, 26, 32, ...
8, 18, 6, 24, 10, 36, 16, 38, ...
which appear to be rearrangements of
1, 3, 5, 7, 9, 11, 13, ...
2, 4, 12, 14, 20, 26, 28, ...
6, 8, 10, 16, 18, 22, 24, ...
|
|
LINKS
|
|
|
EXAMPLE
|
For n=19 we have a(19)+a(18)+a(17) = 5+36+30 = 71 which is prime, but a(19)+a(17) = 5+30 = 35 which is not prime.
|
|
MAPLE
|
N:= 1000: # to get all terms before the first term > N
V:= {$3..1000}:
A[1]:= 1:
A[2]:= 2:
for n from 3 while assigned(A[n-1]) do
for v in V do
if isprime(v + A[n-1]+A[n-2]) and not isprime(v + A[n-2]) then
A[n]:= v;
V:= V minus {v};
break
fi
od;
od:
|
|
MATHEMATICA
|
a = {1, 2}; Do[k = If[Length@ # == 0, Max@ a + 1, First@ #] &@ Complement[Range@ Max@ a, a]; While[Or[MemberQ[a, k], Nand[PrimeQ[k + a[[n - 1]] + a[[n - 2]]], CompositeQ[k + a[[n - 2]]]]], k++]; AppendTo[a, k], {n, 3, 67}]; a (* Michael De Vlieger, Feb 05 2016 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|