OFFSET
0
LINKS
MATHEMATICA
With[{pn=LinearRecurrence[{1, 1, 1, 1, 1}, {0, 0, 0, 0, 1}, 15]}, Table[ If[ MemberQ[ pn, n], 1, 0], {n, 0, 150}]] (* Harvey P. Dale, Aug 08 2021 *)
PROG
(PARI) A296209(n) = { if(n<=1, return(1)); my(p0=0, p1=0, p2=0, p3=1, p4=1, old_p0); while(n>p4, old_p0=p0; p0=p1; p1=p2; p2=p3; p3=p4; p4=old_p0+p0+p1+p2+p3; ); (n==p4); }
(Scheme)
(define (A296209 n) (let loop ((i 3)) (if (< (A001591 i) n) (loop (+ 1 i)) (if (= (A001591 i) n) 1 0))))
;; This uses memoization-macro definec:
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Dec 22 2017
STATUS
approved