#include <stdio.h> #define MAX (10000+1) int a[MAX]; int main() { for (int n=0; n<MAX; n++) { switch (n) { case 0: a[n] = 1; break; case 1: a[n] = 1; break; default: a[n] = a[(n-1)/a[n-1]] + a[(n-2)/a[n-2]]; break; } printf("%d %d\n", n, a[n]); fflush(stdout); } return 0; }