Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #21 Sep 27 2017 09:29:43
%S 0,2,3,4,1,5,1,2,6,2,1,3,1,7,3,2,1,3,4,2,3,8,1,4,1,2,3,2,4,5,1,2,3,4,
%T 9,3,1,5,4,2,1,3,1,4,3,5,1,6,4,2,3,2,1,5,1,10,3,2,4,3,6,5,3,4,1,3,1,2,
%U 4,5,1,3,1,6,3,2,7,5,4,2,3,2,1,4,1,5,6,2,4,11
%N a(n) is the value k such that A292030(A292031(n), k) = n.
%C a(n) > 0 for all n > 0.
%C for n != 1 the value is unique. For n = 1 A292030(A292031(n), 1) = A292030(A292031(1), 2) = 1. a(n) = 2 by convention.
%H Ely Golden, <a href="/A292032/b292032.txt">Table of n, a(n) for n = 0..10000</a>
%e a(2)=3 since A292030(A292031(2),3) = A292030(0,3) = 2.
%o (Python)
%o def smallestSeq(n):
%o if(n<0): return []
%o if(n==0): return [0,0]
%o j,r0,r1=0,0,1
%o while(r1<=n): r0,r1=r1,r0+r1 ; j+=1
%o while(r1>1):
%o if(n%r1==r0): return [n//r1,j]
%o r1,r0=r0,r1-r0
%o j-=1
%o return [n-1, j]
%o for i in range(10001):
%o print(str(i)+" "+str(smallestSeq(i)[1]))
%Y Cf. A292031, A292030.
%K nonn
%O 0,2
%A _Ely Golden_, Sep 08 2017