4 of 9 added history

Java 8, 77 93 74 71 bytes

int n=1111;int m=1;while(x>m++){n=Integer.parseInt((n*n+"").substring(0,4));}

x->{int n=1111;int m=1;while(x>m++){n=Integer.parseInt((n*n+"").substring(0,4))‌​;}return n;}

x->{int n=1111;for(;--x>0;){n=Integer.parseInt((n*n+"").substring(0,4));}}

x->{long n=1111;for(;--x>0;){n=Long.valueOf((n*n+"").substring(0,4));}}

Each repetition makes n the first 4 characters of n*n.

Post history:

  • +77 bytes: initial code (incomplete)

  • +16 bytes, by Olivier Grégoire: completed code by making it a Lambda function.

  • -19 bytes: replace while with for cycle, removed return statement.

  • -4 bytes: used longs instead of ints

Thanks to @OlivierGrégoire for pointing out some issues!

Try Java online!