login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A094114 a(n) = -Sum_{i=1..n-1} (-1)^i*2^valuation(i,3). 1
0, 1, 0, 2, 1, 2, 0, 1, 0, 4, 3, 4, 2, 3, 2, 4, 3, 4, 0, 1, 0, 2, 1, 2, 0, 1, 0, 8, 7, 8, 6, 7, 6, 8, 7, 8, 4, 5, 4, 6, 5, 6, 4, 5, 4, 8, 7, 8, 6, 7, 6, 8, 7, 8, 0, 1, 0, 2, 1, 2, 0, 1, 0, 4, 3, 4, 2, 3, 2, 4, 3, 4, 0, 1, 0, 2, 1, 2, 0, 1, 0, 16, 15, 16, 14, 15, 14, 16, 15, 16, 12, 13, 12, 14, 13, 14, 12 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
Robert Ferréol (MathCurve), Cantor's (ternary) set [in French]
MAPLE
a:= n-> -add((-1)^i*2^padic[ordp](i, 3), i=1..n-1):
seq(a(n), n=1..100); # Alois P. Heinz, Jan 05 2021
MATHEMATICA
a[n_] := Sum[(-1)^(i+1) * 2^IntegerExponent[i, 3], {i, 1, n-1}]; Array[a, 100] (* Amiram Eldar, Jun 17 2022 *)
PROG
(PARI) a(n)=-sum(i=1, n-1, (-1)^i*2^valuation(i, 3))
CROSSREFS
Sequence in context: A213890 A226460 A358360 * A104607 A368734 A120728
KEYWORD
nonn
AUTHOR
Benoit Cloitre, May 03 2004
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 17 20:28 EDT 2024. Contains 374377 sequences. (Running on oeis4.)