OFFSET
1,2
COMMENTS
As is obvious from symmetry, for all n>=1 one has A160414(n) = 1 + a multiple of 4.
Partial sums of 3^A000120(n-1)-(n/2 if n=2^k), n>1.
Numbers whose first differences are in A160727. - Omar E. Pol, Dec 02 2012
LINKS
Paolo Xausa, Table of n, a(n) for n = 1..10000
MATHEMATICA
A219954list[nmax_]:=Accumulate[Table[If[n==1, 0, 3^DigitCount[n-1, 2, 1]-If[IntegerQ[Log2[n]], n/2, 0]], {n, nmax}]]; A219954list[100] (* Paolo Xausa, Sep 01 2023 *)
PROG
(PARI) my(s=-1, t(n)=3^norml2(binary(n-1))-if(n==(1<<valuation(n, 2)), n\2)); vector(99, i, s+=t(i))
CROSSREFS
KEYWORD
nonn
AUTHOR
M. F. Hasler, Dec 01 2012
STATUS
approved