function [k_ideal,C] = SURE_MSE_diff(lambda,b0h,sigma,maxk,stepk)

MSE(1) = inf;

for kk=0:maxk
    
    k = kk*stepk;           
    MSE(kk+2)= sum((b0h.^2).*(1-lambda.^k).^2 + 2*(sigma^2).*(lambda.^k) - sigma^2 );   
    
    if MSE(kk+2) > MSE(kk+1)
        break;
    end
        
end
    
[C,k_diff] = min(MSE(:));

k_ideal = stepk*(k_diff-2);