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!)
A215676 a(1) = 1, a(n) = 2 if 1<n<=4, a(3n+1) = a(n)+1, a(3n+2) = a(3n+3) = a(n)+a(n+1)+1 otherwise. 4
1, 2, 2, 2, 4, 4, 3, 5, 5, 3, 5, 5, 3, 7, 7, 5, 9, 9, 5, 8, 8, 4, 9, 9, 6, 11, 11, 6, 9, 9, 4, 9, 9, 6, 11, 11, 6, 9, 9, 4, 11, 11, 8, 15, 15, 8, 13, 13, 6, 15, 15, 10, 19, 19, 10, 15, 15, 6, 14, 14, 9, 17, 17, 9, 13, 13, 5, 14, 14, 10, 19, 19, 10, 16, 16, 7 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
In the S.-H. Cha reference this is function ~fog_3(n).
LINKS
S.-H. Cha, On Parity based Divide and Conquer Recursive Functions, International Conference on Computer Science and Applications, San Francisco, USA, 24-26 October 2012
MAPLE
a:= proc(n) option remember; 1+ `if`(n=1, 0, `if`(n<=4, 1,
`if`(irem(n-1, 3, 'r')=0, a(r), a(r)+a(r+1))))
end:
seq (a(n), n=1..80); # Alois P. Heinz, Aug 23 2012
MATHEMATICA
a[n_] := a[n] = Switch[n, 1, 0, 2|3|4, 1, _, {q, r} = QuotientRemainder[n-1, 3]; If[r == 0, a[q], a[q]+a[q+1]]]+1;
Table[a[n], {n, 1, 80}] (* Jean-François Alcover, Sep 01 2022 *)
CROSSREFS
Sequence in context: A070705 A216326 A101909 * A130872 A087627 A195051
KEYWORD
nonn
AUTHOR
Sung-Hyuk Cha, Aug 20 2012
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 23 05:09 EDT 2024. Contains 371906 sequences. (Running on oeis4.)