What is the average of n, the closest prime to n, the square of n and the closest Fibonacci number to n?
Python 160 Chars

p=lambda n:any(n%x&lt;1for x in range(2,n))
N=input()
a=0;b=1
while b&lt;N:a,b=b,a+b
c=d=N
while p(c)and p(d):c-=1;d+=1
print (N+N*N+[b,a][2*N-a-b&lt;0]+[c,d][p(c)])/4.0


A little explanation about the closestFib part:


  When the while loop ends a is smaller
  than N and b is either equal to or
  greater than N. Now the
  [b,a][2*N-a-b&lt;0] part. Look at it as
  [b,a][(N-a)-(b-N)]. (N-a) is the
  difference between N and a and
  similarly (b-N) the difference between
  b and N. If the difference between
  these two is less than 0 it means a is
  closer to N and vice-versa.