|
|
A275392
|
|
Smallest term in the tribonacci Zeckendorf representation of n.
|
|
2
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
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.
|
|
PROG
|
(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))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|