Is this number a Tribonacci number? - Code Golf Challenge #1

Words
221
Reading
1 min
Listen
Play
9y

Welcome to my first code golf challenge!

The Challenge: Tribonacci Numbers

For this challenge, I am asking you to write a program in any language of your choosing to accomplish a task. This week's task is to classify a number as a tribonacci number or not a tribonacci number.

A tribonacci number is like a fibonacci number, but each term is the sum of the three previous terms.
a0=0
a1=0
a2=1
a3=1
a4=2
a5=4
...
an=a(n-3)+a(n-2)+a(n-1)

In short, your program needs to read a number from the input and then output whether the number is a tribonacci number or not.

Rules

  • Please use any programming language you would like (however, I want to discourage using golfing languages)
  • Post your program inside a code block with Markdown as a comment on this post
  • To enter, you must upvote this post to increase the reward pool
  • Specify the length of your program in bytes in your comment
  • You can improve someone else's answer, but please give them credit- you will split the reward
  • The winners of the contest have the shortest answers
  • Winners will be determined a week from today
  • The 1st place winner will receive 50% of this post's SBD reward
  • The 2nd place winner will receive 25% of this post's SBD reward
  • The 3rd place winner will receive 25% of this post's SBD reward.

Happy Golfing!

Is this number a Tribonacci number? - Code Golf Challenge #1 | Ecency