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!)
A038555 Derivative of n in base 3. 1
0, 0, 0, 1, 2, 0, 2, 0, 1, 3, 4, 5, 7, 8, 6, 2, 0, 1, 6, 7, 8, 1, 2, 0, 5, 3, 4, 9, 10, 11, 13, 14, 12, 17, 15, 16, 21, 22, 23, 25, 26, 24, 20, 18, 19, 6, 7, 8, 1, 2, 0, 5, 3, 4, 18, 19, 20, 22, 23, 21, 26, 24, 25, 3, 4, 5, 7, 8, 6, 2, 0, 1, 15, 16, 17, 10, 11, 9, 14, 12, 13, 27, 28, 29 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,5
LINKS
FORMULA
Write n in ternary, replace each pair of adjacent digits by their modulo 3 sum.
EXAMPLE
15 = 120 in ternary, derivative is 02 = 2, so a(15)=2.
PROG
(Haskell)
a038555 n = foldr (\d v -> v * 3 + d) 0 $
zipWith (\x y -> (x + y) `mod` 3) ts $ tail ts
where ts = a030341_row n
-- Reinhard Zumkeller, May 26 2013
(J) ab3 =: 3&#.^:_1
sp =: 2&(+/\)"1
> (3 | sp)&.ab3&.> ; / i. 100 NB. Stephen Makdisi, May 26 2018
CROSSREFS
Cf. A038554.
Cf. A030341.
Sequence in context: A323226 A307197 A328949 * A138108 A158777 A039970
KEYWORD
nonn,nice,easy,base
AUTHOR
EXTENSIONS
More terms from Erich Friedman
Formula corrected by Reinhard Zumkeller, May 26 2013
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 13 21:51 EDT 2024. Contains 372523 sequences. (Running on oeis4.)