login
A219954
(A160414(n)-1)/4, n >= 1.
2
0, 2, 5, 12, 15, 24, 33, 56, 59, 68, 77, 104, 113, 140, 167, 240, 243, 252, 261, 288, 297, 324, 351, 432, 441, 468, 495, 576, 603, 684, 765, 992, 995, 1004, 1013, 1040, 1049, 1076, 1103, 1184, 1193, 1220, 1247, 1328, 1355, 1436
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
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
Cf. A160727.
Sequence in context: A192524 A287553 A102718 * A066267 A084122 A042143
KEYWORD
nonn
AUTHOR
M. F. Hasler, Dec 01 2012
STATUS
approved