OFFSET
1,1
COMMENTS
If prime(k) has level 1 in A117563, and if 2*prime(k) - prime(k+1) = prime(k-i), then we say that prime(k) has level (1,i). Sequence gives primes of level (1,2).
The prime p(4)=7 cannot be decomposed into weight*level+gap (<=> A117563(4)=0 <=> A118534(4)=0 <=> A117078(4)=0). For all other primes, an equivalent definition would be: Primes p(k) such that 2*p(k) - p(k+1) = p(k-2). - Rémi Eismann and M. F. Hasler, Nov 08 2009
LINKS
Remi Eismann, Table of n, a(n) for n = 1..10000
FORMULA
EXAMPLE
29 = 2*23 - 17, 2179 = 2*2161 - 2143, 5749 = 2*5743 - 5737.
MATHEMATICA
With[{m = 2}, Prime@ Select[Range[m + 1, 1200], If[MemberQ[{1, 2, 4}, #], 0, 2 Prime[#] - Prime[# + 1]] == Prime[# - m] &]] (* Michael De Vlieger, Jul 16 2017 *)
PROG
(PARI) for(n=5, 9999, 2*prime(n)-prime(n+1) == prime(n-2) & print1(prime(n), ", ")) \\ M. F. Hasler, Nov 08 2009
(PARI) is_A117876(p)={ isprime(p) & isprime(d=2*p-nextprime(p+2)) & d == precprime(precprime(p-2)-2) & p>7 } \\ M. F. Hasler, Nov 08 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémi Eismann, May 02 2006
EXTENSIONS
Edited by N. J. A. Sloane, May 14 2006
More terms from Rémi Eismann, May 25 2006
Definition corrected and terms double-checked by M. F. Hasler, Nov 08 2009
STATUS
approved