cp's OEIS Frontend

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.

A292032 a(n) is the value k such that A292030(A292031(n), k) = n.

Original entry on oeis.org

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

Views

Author

Ely Golden, Sep 08 2017

Keywords

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.

Examples

			a(2)=3 since A292030(A292031(2),3) = A292030(0,3) = 2.
		

Crossrefs

Programs

  • 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]))