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.

A275392 Smallest term in the tribonacci Zeckendorf representation of n.

Original entry on oeis.org

1, 2, 1, 4, 1, 2, 7, 1, 2, 1, 4, 1, 13, 1, 2, 1, 4, 1, 2, 7, 1, 2, 1, 24, 1, 2, 1, 4, 1, 2, 7, 1, 2, 1, 4, 1, 13, 1, 2, 1, 4, 1, 2, 44, 1, 2, 1, 4, 1, 2, 7, 1, 2, 1, 4, 1, 13, 1, 2, 1, 4, 1, 2, 7, 1, 2, 1, 24, 1, 2, 1, 4, 1, 2, 7, 1, 2, 1, 4, 1, 81, 1, 2, 1, 4, 1, 2, 7, 1, 2, 1, 4, 1, 13, 1, 2, 1, 4, 1, 2, 7, 1, 2, 1
Offset: 1

Views

Author

Aresh Pourkavoos, Jul 26 2016

Keywords

Examples

			The tribonacci Zeckendorf representation of 5 is 4+1 (4 and 1 are both tribonacci numbers), the smaller term of which is 1, so a(5)=1.
		

Crossrefs

Programs

  • Python
    tribonacci = [0, 0, 1]
    seq = []
    numTerms = 100
    while tribonacci[-1] < numTerms:
      tribonacci.append(tribonacci[-1]+tribonacci[-2]+tribonacci[-3])
    tribonacci = tribonacci[3:]
    tribonacci.reverse()
    for n in range(1, numTerms):
      tmp = n
      smallestTerm = 0
      for place in tribonacci:
        if tmp >= place:
          tmp -= place
          smallestTerm = place
      seq.append(str(n)+" "+str(smallestTerm))
    print('\n'.join(seq))

Formula

a(n) = n if n is in A000073.