1,5

Presumably a(n)=n/3+o(n)

Table of n, a(n) for n=1..79.

a(n)=sum(k=1,n,(K(k+1)-1)*(K(k+1)-K(k))) where K(k)=A000002(k).

(PARI) a(n)=sum(k=1, n, if(abs(A000002(k)-1)+abs(A000002(k+1)-2), 0, 1))

Cf. A157685, A157686, A157687

Sequence in context: A194327 A058032 A056155 * A194339 A194335 A026099

Adjacent sequences: A157681 A157682 A157683 * A157685 A157686 A157687

nonn

Benoit Cloitre, Mar 04 2009

approved