g | x | w | all
Bytes Lang Time Link
074AWK241104T180930Zxrs
012Japt f171003T164103ZShaggy
038Julia 0.6171010T204627ZDennis
020APL171005T181455ZAdalynn
127Java 8171004T133851ZKevin Cr
075PowerShell171004T222705Zlit
048Octave / MATLAB171003T212048ZLuis Men
040Mathematica171003T212103ZJungHwan
056JavaScript ES6171003T165143ZNeil
056R171003T170934ZGiuseppe
051Haskell171004T095619ZLaikoni
016J171004T082333Zmiles
060Python 2171003T164102ZJonathan
nanPerl 5171003T220959ZXcali
010Jelly171003T165220ZLeaky Nu
059JavaScript ES5171003T171017ZDanielIn
060Python 2171003T170118ZRod
01405AB1E171003T164055ZMagic Oc
044Mathematica171003T165602ZMisha La
017Jelly171003T165152ZErik the

AWK, 74 bytes

{for(;i++<NF;)print 2*$i<=(1~i?$NF+$2:i~NF?$1+$(NF-1):$(i-1)+$(i+1))?$i:X}

Try it online!

{for(;i++<NF;)print # print the number if.. 
2*$i<=(1~i?$NF+$2:  # first array element
i~NF?$1+$(NF-1):    # last array element
$(i-1)+$(i+1))?$i:  # others
X}                  # or nothing if narcissistic

Japt -f, 12 bytes

ѧWgVÉ +WgVÄ

Try it

ѧWgVÉ +WgVÄ     :Implicit filter of each element at index V in array U
Ñ                :Multiply by 2
 §               :Is less than or equal to
  WgVÉ           :  The element in W at index V-1
       +         :  Plus
        WgVÄ     :  The element in W at index V+1

Julia 0.6, 38 bytes

!x=x[x[[e=end;1:e-1]]+x[[2:e;1]].>=2x]

Try it online!

APL, 20 bytes

{⍵/⍨⍵≤2÷⍨(1⌽⍵)+¯1⌽⍵}

Try it online!

Java 8, 141 137 127 bytes

import java.util.*;a->{List r=new Stack();for(int i=0,l=a.length;i<l;)if(2*a[i]<=a[(i-1+l)%l]+a[++i%l])r.add(a[i-1]);return r;}

-10 bytes thanks to @Nevay.

Explanation:

Try it here.

import java.util.*;    // Required import for List and Stack

a->{                   // Method with integer-array parameter and List return-type
  List r=new Stack();  //  Return-list
  for(int i=0,         //  Index integer, starting at 0
      l=a.length;      //  Length of the input array
      i<l;)            //  Loop over the input array
    if(2*a[i]<=        //   If two times the current item is smaller or equal to:
        a[(i-1+l)%l]   //   The previous integer in the list
        +a[++i%l])     //   + the next integer in the list
      r.add(a[i-1]);   //    Add the current integer to the result-list
                       //  End of loop (implicit / single-line body)
  return r;            //  Return result-List
}                      // End of method

PowerShell, 75 bytes

for($i=0;$i-lt$a.Length;$i++){if($a[$i]-le(($a[$i-1]+$a[$i+1])/2)){$a[$i]}}

Octave / MATLAB, 48 bytes

@(x)x(conv([x(end),x,x(1)],[1,-2,1],'valid')>=0)

Try it online!

Explanation

The input array is first extended with the last (x(end)) and first (x(1)) entries at the appropriate sides.

The test for narcissism is done by convolving the extended array with [1, -2, 1] and keeping only the 'valid' part.

Comparing each entry in the convolution result with 0 gives a logical index (mask) which is used to select the numbers from the input.

Mathematica, 40 bytes

Pick[#,+##>=3#2&@@@Partition[#,3,1,-2]]&

JavaScript (ES6), 57 56 bytes

a=>a.filter((e,i)=>e+e<=a[(i||l)-1]+a[++i%l],l=a.length)

Edit: Saved 1 byte thanks to @g00glen00b.

R, 51 56 bytes

Thanks to user2390246 for correcting my algorithm

function(l)l[c(l[-1],l[1])+c(l[s<-sum(l|1)],l[-s])>=2*l]

Try it online!

indexes l where c(l[-1],l[1])+c(l[s],l[-s]), the neighbor-sums of l, are not less than twice l.

Haskell, 51 bytes

f s=[b|(a,b,c)<-zip3(last s:s)s$tail$s++s,b*2<=a+c]

Try it online! Usage example: f [1,2,3] yields [1,2].

For s = [1,2,3], last s:s is the list [3,1,2,3] and tail$s++s the list [2,3,1,2,3]. zip3 generates a list of triples (a,b,c) from three given list, truncating the longer ones to the length of he shortest list. We get [(3,1,2),(1,2,3),(2,3,1)], with b being the original list element and a and c its neighbours. The list comprehension then selects all b where b*2<=a+c, that is b is not narcissistic.

J, 16 bytes

#~+:<:1&|.+_1&|.

Try it online!

Explanation

#~+:<:1&|.+_1&|.  Input: array A
           _1&|.  Rotate A right by 1
      1&|.        Rotate A left by 1
          +       Add
  +:              Double each in A
    <:            Less than or equal to
#~                Copy the true values from A

Python 2, 64 60 bytes

lambda l:[k for j,k in enumerate(l)if(l+l)[-~j]+l[~-j]>=k+k]

Try it online!

Perl 5, 51 + 1 (-a) = 52 bytes

$p=$F[-1];say map{$p+$F[++$i%@F]<2*($p=$_)?'':$_}@F

Try it online!

Jelly, 10 bytes

ṙ2+ṙ-<ḤCx@

Try it online!

Explanation:

ṙ2+ṙ-<ḤCx@
ṙ2         Rotate the original list two elements to the left
  +        Add each element to the respective element of the original list
   ṙ-      Rotate the result one element to the right
     <Ḥ    Check if each element is less than the double of its respective element on the original list
       C   Subtract each 1/0 boolean from 1 (logical NOT in this case)
        x@ Repeat each element of the original list as many times as the respective element of the logical NOT (i.e. keep elements of the original list where the respective element from the result is 1)

JavaScript ES5 , 59 bytes

F=a=>a.filter((x,i)=>2*x<=a[-~i%(l=a.length)]+a[(i-1+l)%l])

console.log(""+F([5, -8, -9])==""+[-8, -9])
console.log(""+F([8, 8, 8, 8])==""+[8, 8, 8, 8])
console.log(""+F([11, 6, 9, 10])==""+[6, 10])
console.log(""+F([1, 2, 0, 1, 2])==""+[1, 0, 1])
console.log(""+F([6, 9, 4, 10, 16, 18, 13])==""+[6, 4, 10])
console.log(""+F([6, -5, 3, -4, 38, 29, 82, -44, 12])==""+[-5, -4, 29, -44])

Python 2, 60 bytes

lambda x:[b for a,b,c in zip(x[-1:]+x,x,x[1:]+x)if b*2<=a+c]

Try it online!

05AB1E, 22 17 15 14 bytes

vy¹®1‚N+èO;>‹—

Try it online!

vy             # For each...
  ¹            # Push array.
   ®1‚         # Push [1,-1]
      N+       # Add current index.
        è      # Push surrounding values of current index.
         O;    # Summed in half.
           >‹  # A <= B?
             — # If true, print current.

Mathematica, 44 bytes

Pick[#,#<=0&/@(2#-(r=RotateLeft)@#-#~r~-1)]&

How it works

Given input such as {11,6,9,10}, computes

2*{11,6,9,10} - {6,9,10,11} - {10,11,6,9}

and picks out the elements of the original input in places where this result is at most 0.

Jelly, 17 bytes

Ḣ+ṪH<ḢṆ
.ịj⁸Ç3ƤTị

Try it online!