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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A270659 Maximal value of A270655 between indices 3^n and 3^(n+1). 0
 1, 2, 3, 4, 7, 10, 15, 24, 34, 52, 82, 116, 180, 280, 396, 616 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 LINKS Table of n, a(n) for n=0..15. MAPLE A270655:= proc(n) option remember; local k; k:= n mod 3; if k = 0 then procname(n/3) elif k=1 then procname((n-1)/3)+procname((n+2)/3) else procname((n+1)/3)-procname((n-2)/3) fi end proc: A270655(0):= 0: A270655(1):= 1: seq(max(map(A270655, [\$3^n .. 3^(n+1)])), n=0..15); # Robert Israel, Nov 12 2018 MATHEMATICA b[0] = 0; b[1] = 1; b[n_] := b[n] = Switch[Mod[n, 3], 0, b[n/3], 1, b[3((n - 1)/3 + 1)] + b[n - 1], 2, b[3((n - 2)/3 + 1)] - b[n - 2]]; a[n_] := Module[{m = 1}, For[i = 3^n, i <= 3^(n + 1), i++, m = Max[m, b[i]] ]; Print[n, " ", m]; m]; a /@ Range[0, 15] (* Jean-François Alcover, Apr 10 2020 *) PROG (PARI) \\ here b(n) is A270655. b(n)={if(n<2, n, my(r=n%3, q=n\3); if(r==0, b(q), if(r==1, b(q) + b(q+1), b(q+1) - b(q))))} a(n)={my(m=1); for(i=3^n, 3^(n+1), m=max(m, b(i))); m} \\ Andrew Howroyd, Nov 11 2018 CROSSREFS Cf. A270655. Sequence in context: A329758 A100638 A319437 * A159288 A033320 A013982 Adjacent sequences: A270656 A270657 A270658 * A270660 A270661 A270662 KEYWORD nonn,more AUTHOR Max Barrentine, Mar 20 2016 EXTENSIONS Offset corrected and a(12)-a(13) from Andrew Howroyd, Nov 11 2018 a(14)-a(15) from Robert Israel, Nov 12 2018 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.

Last modified June 6 01:24 EDT 2023. Contains 363138 sequences. (Running on oeis4.)