Skip to main content
2 of 4
added 58 characters in body
qwr
  • 12.3k
  • 6
  • 48
  • 80

C gnu99, 126 bytes

Port of my R answer. The initialization of array C to 1s is a GNU extension.

i;d;j;t;C[]={[0 ...255]=1};main(){puts("2");while(++i<500){d=0;j=254;while(j-->2)t=10*C[j]+d,d=t/j,C[j]=t-d*j;putchar(d+48);}}

Attempt This Online!

qwr
  • 12.3k
  • 6
  • 48
  • 80