<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Con tu descripción he sacado la siguiente formula:<BR> <BR>suma(k) = (k-1) + suma(k-1) + ... + suma(2)<BR> <BR>y he hecho el siguiente programa:<BR> <BR>int suma( int k){<BR>     int i=0;<br>     if( k==2 )<br>           return 1;<br> <br>     for( int x=k-1; x>1; x--)<br>           i=i+suma(x);<br> <br>     return (k-1+i);<br>}<BR> <BR>Pero muchas funciones recursivas que he visto tienden a eliminar las iteraciones; refiriéndome al for(). Aunque esta función en sí es recursiva.<BR> <BR>¿Que opinas?<BR>                                    </div></body>
</html>