OFFSET
0,2
COMMENTS
Equals the eigensequence of the correlation triangle, A003983. (Gary W. Adamson, Mar 14, 2011).
MAPLE
a:=proc(n) if n=0 or n=1 then n+1 elif n mod 2 = 0 then 3*a(n-1)-a(n-2) else 3*a(n-1)-a(n-2)-a((n-3)/2) fi end: seq(a(n), n=0..30); - Emeric Deutsch, May 20 2007
PROG
(PARI) {m=27; v=vector(m+1); v[1]=1; v[2]=2; for(n=2, m, k=3*v[n]-v[n-1]; if(n%2==1, k=k-v[(n-1)/2]); v[n+1]=k); print(v)} /* Klaus Brockhaus, May 20 2007 */
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul Curtz, May 19 2007
EXTENSIONS
More terms from Emeric Deutsch and Klaus Brockhaus, May 20 2007
STATUS
approved