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!)
A093349 A 7-fractal "castle" starting with 0. 4
0, 1, 0, 1, 0, 1, 0, 7, 6, 7, 6, 7, 6, 7, 0, 1, 0, 1, 0, 1, 0, 7, 6, 7, 6, 7, 6, 7, 0, 1, 0, 1, 0, 1, 0, 7, 6, 7, 6, 7, 6, 7, 0, 1, 0, 1, 0, 1, 0, 49, 48, 49, 48, 49, 48, 49, 42, 43, 42, 43, 42, 43, 42, 49, 48, 49, 48, 49, 48, 49, 42, 43, 42, 43, 42, 43, 42, 49, 48, 49, 48, 49, 48, 49, 42, 43 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,8
LINKS
FORMULA
a(1) = 0 then a(n) = w(n) - a(n-w(n)) where w(n) = 7^floor(log(n-1)/log(7)).
a(n) = Sum_{i=1..n-1} (-1)^(i-1)*7^valuation(i, 7).
MATHEMATICA
a[n_] := Sum[(-1)^(i+1) * 7^IntegerExponent[i, 7], {i, 1, n-1}]; Array[a, 100] (* Amiram Eldar, Jun 17 2022 *)
PROG
(PARI) a(n)=if(n<2, 0, 7^floor(log(n-1)/log(7))-a(n-7^floor(log(n-1)/log(7))))
(PARI) a(n)=-sum(i=1, n-1, (-1)^i*7^valuation(i, 7))
CROSSREFS
Sequence in context: A291423 A276792 A188943 * A309641 A020789 A153857
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 26 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 April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)