This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A246399 #13 Jan 06 2017 23:06:00 %S A246399 1,4,7,12,17,22,27,43,51,59,67,75,83,122,135,148,161,174,187,200,213, %T A246399 226,239,344,365,386,407,428,449,470,491,512,533,554,575,596,617,638, %U A246399 659,931,965,999,1033,1067,1101,1135,1169,1203,1237,1271 %N A246399 Least k such that A249783(k) = n. %C A246399 It appears that a(n) exists for each n, and that the sequence is increasing. %H A246399 Charles R Greathouse IV, <a href="/A246399/b246399.txt">Table of n, a(n) for n = 1..1000</a> %H A246399 <a href="/index/Com#complexity">Index to sequences related to the complexity of n</a> %e A246399 a(3) = 7 because the Fibonacci-like sequence 2, 1, 3, 4, 7, 11, ... contains 7 and the sum of the first two terms is 3, while no smaller sequences work. (All terms must be nonnegative.) %t A246399 A249783[n_] := A249783[n] = Module[{a, k, A, B}, If[n<2, Return[n]]; For[k = 1, k <= n-1, k++, For[a=0, a <= k-1, a++, A = a; B = k-A; While[B<n, {A, B} = {B, A+B}]; If[B==n, Return[k]]]]; n]; a[1]=1; a[n_] := a[n] = For[k = a[n-1], True, k++, If[A249783[k] == n, Return[k]]]; Array[a, 50] (* _Jean-François Alcover_, Jan 06 2017, adapted from PARI *) %o A246399 (PARI) A054495(n)=fordiv(n,d,if(A010056(n/d),return(d))) %o A246399 A249783(n)=if(n<2,return(n));for(k=1,n-1,for(a=0,k-1,my(A=a,B=k-A);while(B<n,[A,B]=[B,A+B]);if(B==n,return(k))));n %o A246399 v=vector(100);least=1;for(n=1,1e7,if(aa(n)<least,next);t=a(n);if(t>=least&&t<=#v&&v[t]==0,v[t]=n;while(v[least],if(least++>#v,return(v))))) %Y A246399 Cf. A249783, A054495. %K A246399 nonn %O A246399 1,2 %A A246399 _Charles R Greathouse IV_, Nov 13 2014