OFFSET
0,1
COMMENTS
Characteristic function of A145397.
LINKS
EXAMPLE
From David A. Corneth, Oct 01 2018: (Start)
For n = 0, floor((6*0-1) ^ (1/3)) = -1. binomial(-1 + 2, 3) = n so a(0) = 0.
For n = 10, floor((6*n-1) ^ (1/3)) = 3. binomial(3 + 2, 3) = n so a(10) = 0.
For n = 11, floor((6*n-1) ^ (1/3)) = 3. binomial(3 + 2, 3) != n so a(11) = 1. (End)
PROG
(PARI) A014306(n) = { my(k=0); while(binomial(k+2, 3)<n, k++); !(binomial(k+2, 3)==n); }; \\ Antti Karttunen, Sep 30 2018
(PARI) a(n) = if(n==0, return(0)); my(t = sqrtnint(6*n-1, 3)); binomial(t+2, 3) != n \\ David A. Corneth, Oct 01 2018
(PARI) first(n) = my(res = vector(n+1, i, 1), ov = nv = [1, 2, 1, 0]); while(nv[4]<=n, res[nv[4]+1] = 0; for(i = 2, 4, nv[i] = ov[i-1] + ov[i]); ov = nv); res \\ David A. Corneth, Oct 01 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Data section extended up to a(120) by Antti Karttunen, Sep 30 2018
STATUS
approved