The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A093348 A 5-fractal "castle" starting with 0. 8
0, 1, 0, 1, 0, 5, 4, 5, 4, 5, 0, 1, 0, 1, 0, 5, 4, 5, 4, 5, 0, 1, 0, 1, 0, 25, 24, 25, 24, 25, 20, 21, 20, 21, 20, 25, 24, 25, 24, 25, 20, 21, 20, 21, 20, 25, 24, 25, 24, 25, 0, 1, 0, 1, 0, 5, 4, 5, 4, 5, 0, 1, 0, 1, 0, 5, 4, 5, 4, 5, 0, 1, 0, 1, 0, 25, 24, 25, 24, 25, 20, 21, 20, 21, 20, 25, 24 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
LINKS
FORMULA
a(1) = 0, then a(n) = w(n) - a(n-w(n)) where w(n) = 5^floor(log(n-1)/log(5)).
a(n) = Sum_{i=1..n-1} (-1)^(i-1)*5^valuation(i, 5).
Conjecture: a(n+1) = (n mod 2) + Sum_{k=0..infinity} (4*5^k*(floor(n/5^(k+1)) mod 2)). - Charlie Neder, May 25 2019
MATHEMATICA
a[n_] := Sum[(-1)^(i+1) * 5^IntegerExponent[i, 5], {i, 1, n-1}]; Array[a, 100] (* Amiram Eldar, Jun 17 2022 *)
PROG
(PARI) a(n)=if(n<2, 0, 5^floor(log(n-1)/log(5))-a(n-5^floor(log(n-1)/log(5))))
CROSSREFS
Cf. A060904.
Sequence in context: A237577 A131369 A122219 * A262604 A276500 A246060
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 May 21 17:00 EDT 2024. Contains 372738 sequences. (Running on oeis4.)