<!-- language-all: lang-java --> # Java, <s>65</s> 61 bytes Golfed: n->{int a=1,b=2;for(;n-->0;a-=b)b=a-b;System.out.println(a);} This uses the standard trick of calculating Fibonacci using only two variables to hold the state, but modified to work with subtraction. I am aware that theoretically, `System.out.print()` _should_ work here but in practice it is inconsistent with flushing output and sometimes (often enough to be an issue) will literally print _nothing_ using the Oracle JVM. This function is zero-indexed. [Try it online!](https://tio.run/##VZBBb4MwDIXv/Ip3pBKg0e20rj1s0qSdOeww7RBo2roDBwWn01Tx25lBhWmRomfn@ZNjn83FpK61fN5/DUMbypoqVLXpOrxSKd5UQo41dGyqip6DvJOcirBYuEYRcAM7MaJycbRHY4jjQjzx8eMTxh@7ldZCz8F5xMQCwiPYfkNjLbkiT7BOkKvkDxqOqep9jn5GFY4Z6W5JMcIw2I5wqbLeLM7UZwNOU@xwt9GqdItytfiYAH1F@QcVP53YJnNBslb/LjXHZjXbPRLQLeuj8Y6ze7oYsf@GP8RnXWwWhOrsEHjaVPbiuAuN9U9vLPZo/Q6zlUxT8LKgmdCV21Zinlr2UR8Nwy8 "Java (OpenJDK 8) – Try It Online") Ungolfed: public class FibtractionFibonacciButWithSubtraction { public static void main(String[] args) { for (int i : new int[] { 1, 2, 11, 14, 21, 24, 31 }) { f(n -> { int a = 1, b = 2; for (; n-- > 0; a -= b) b = a - b; System.out.println(a); } , i); } } private static void f(java.util.function.Consumer<Integer> function, int n) { function.accept(n); } }