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.

This page as a plain text file.
%I A275392 #17 May 10 2021 02:36:40
%S A275392 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,
%T A275392 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,
%U A275392 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
%N A275392 Smallest term in the tribonacci Zeckendorf representation of n.
%H A275392 Aresh Pourkavoos, <a href="/A275392/b275392.txt">Table of n, a(n) for n = 1..9999</a>
%F A275392 a(n) = n if n is in A000073.
%e A275392 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.
%o A275392 (Python)
%o A275392 tribonacci = [0, 0, 1]
%o A275392 seq = []
%o A275392 numTerms = 100
%o A275392 while tribonacci[-1] < numTerms:
%o A275392   tribonacci.append(tribonacci[-1]+tribonacci[-2]+tribonacci[-3])
%o A275392 tribonacci = tribonacci[3:]
%o A275392 tribonacci.reverse()
%o A275392 for n in range(1, numTerms):
%o A275392   tmp = n
%o A275392   smallestTerm = 0
%o A275392   for place in tribonacci:
%o A275392     if tmp >= place:
%o A275392       tmp -= place
%o A275392       smallestTerm = place
%o A275392   seq.append(str(n)+" "+str(smallestTerm))
%o A275392 print('\n'.join(seq))
%Y A275392 Cf. A000073, A006519, A139764.
%K A275392 nonn
%O A275392 1,2
%A A275392 _Aresh Pourkavoos_, Jul 26 2016