A273513
a(n) is the number of arithmetic triples n
0, 0, 1, 0, 0, 1, 1, 1, 2, 0, 0, 1, 0, 0, 1, 1, 1, 2, 1, 1, 2, 1, 1, 3, 2, 2, 3, 0, 0, 1, 0, 0, 1, 1, 1, 2, 0, 0, 1, 0, 0, 1, 1, 1, 2, 1, 1, 2, 1, 1, 3, 2, 2, 3, 1, 1, 2, 1, 1, 3, 2, 2, 3, 1, 1, 2, 1, 1, 4, 3, 3, 5, 2, 2, 4, 2, 2, 5, 3, 3, 4, 0, 0, 1, 0, 0, 1
Offset: 0
Links
- Max Barrentine, Table of n, a(n) for n = 0..19683 (terms 1 through 10000 from Robert Israel)
- Robert Israel, Plot of first 10^5 terms
Programs
-
Maple
f:= proc(n) option remember; local m; m:= floor(n/3); if n mod 3 <> 2 then procname(m) elif procname(m+1)=0 then 1 + procname(m) else procname(m) + procname(m+1) fi end proc: f(0):= 0: map(f, [$0..100]); # Robert Israel, Jun 16 2016
Formula
a(0)=0, a(n)=a(3n)=a(3n+1);
if a(n+1)=0, a(3n+2)=1+a(n), otherwise a(3n+2)=a(n)+a(n+1).
Comments