login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A292032
a(n) is the value k such that A292030(A292031(n), k) = n.
3
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, 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, 4, 5, 1, 3, 1, 6, 3, 2, 7, 5, 4, 2, 3, 2, 1, 4, 1, 5, 6, 2, 4, 11
OFFSET
0,2
COMMENTS
a(n) > 0 for all n > 0.
for n != 1 the value is unique. For n = 1 A292030(A292031(n), 1) = A292030(A292031(1), 2) = 1. a(n) = 2 by convention.
EXAMPLE
a(2)=3 since A292030(A292031(2),3) = A292030(0,3) = 2.
PROG
(Python)
def smallestSeq(n):
if(n<0): return []
if(n==0): return [0, 0]
j, r0, r1=0, 0, 1
while(r1<=n): r0, r1=r1, r0+r1 ; j+=1
while(r1>1):
if(n%r1==r0): return [n//r1, j]
r1, r0=r0, r1-r0
j-=1
return [n-1, j]
for i in range(10001):
print(str(i)+" "+str(smallestSeq(i)[1]))
CROSSREFS
Sequence in context: A211234 A359122 A240185 * A097150 A319826 A278108
KEYWORD
nonn
AUTHOR
Ely Golden, Sep 08 2017
STATUS
approved