The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A240828 a(1)=a(2)=0, a(3)=2; thereafter a(n) = Sum( a(n-i-s-a(n-i-1)), i=0..k-1 ), where s=0, k=3. 7
 0, 0, 2, 2, 4, 2, 6, 4, 8, 4, 10, 6, 12, 6, 14, 8, 16, 8, 18, 10, 20, 10, 22, 12, 24, 12, 26, 14, 28, 14, 30, 16, 32, 16, 34, 18, 36, 18, 38, 20, 40, 20, 42, 22, 44, 22, 46, 24, 48, 24, 50, 26, 52, 26, 54, 28, 56, 28, 58, 30, 60, 30, 62, 32, 64, 32, 66, 34, 68, 34, 70, 36, 72, 36, 74, 38, 76, 38, 78, 40, 80, 40 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,3 COMMENTS Is this A185048 with the leading two 1's replaced by 0's? - R. J. Mathar, Apr 17 2014. This is true, see formulas below. - Bruno Berselli, Apr 18 2014 LINKS N. J. A. Sloane, Table of n, a(n) for n = 1..20000 Joseph Callaghan, John J. Chew III, and Stephen M. Tanny, On the behavior of a family of meta-Fibonacci sequences, SIAM Journal on Discrete Mathematics 18.4 (2005): 794-824. See Fig. 1.4. Craig Knecht, Row sums of superimposed binary filled triangle. Index entries for linear recurrences with constant coefficients, signature (0,1,0,1,0,-1). FORMULA From Bruno Berselli, Apr 18 2014: (Start) G.f.: 2*x^3*(1 + x + x^2)/((1 - x)^2*(1 + x)^2*(1 + x^2)). a(n) = n - 1 - ((-1)^n + 1)*(n - (-1)^floor(n/2) - 1)/4. Therefore: a(2h+1) = 2h, a(2h) = 2*floor(h/2), or also: a(4h) = a(4h+2) = 2h, a(4h+1) = 4h, a(4h+3) = 4h+2. a(n) = a(n-2) + a(n-4) - a(n-6) for n>6. (End) MAPLE #T_s, k(n) from Callaghan et al. Eq. (1.6). s:=0; k:=3; a:=proc(n) option remember; global s, k; if n <= 2 then 0 elif n = 3 then 2 else     add(a(n-i-s-a(n-i-1)), i=0..k-1); fi; end; t1:=[seq(a(n), n=1..100)]; MATHEMATICA LinearRecurrence[{0, 1, 0, 1, 0, -1}, {0, 0, 2, 2, 4, 2}, 100] (* Vincenzo Librandi, Jul 12 2015 *) PROG (MAGMA) [n le 3 select 2*Floor((n-1)/2) else Self(n-Self(n-1))+Self(n-1-Self(n-2))+Self(n-2-Self(n-3)): n in [1..100]]; // Bruno Berselli, Apr 18 2014 (MAGMA) [n-1-((-1)^n+1)*(n-(-1)^Floor(n/2)-1)/4: n in [1..80]]; // Vincenzo Librandi, Jul 12 2015 CROSSREFS Cf. A185048. Sequence in context: A277705 A028913 A185048 * A239240 A054929 A236628 Adjacent sequences:  A240825 A240826 A240827 * A240829 A240830 A240831 KEYWORD nonn,look,hear,easy AUTHOR N. J. A. Sloane, Apr 16 2014 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified August 3 06:43 EDT 2021. Contains 346435 sequences. (Running on oeis4.)
{"ft_lang_label":"__label__en","ft_lang_prob":0.51288587,"math_prob":0.992288,"size":2325,"snap":"2021-31-2021-39","text_gpt3_token_len":1132,"char_repetition_ratio":0.08056872,"word_repetition_ratio":0.013953488,"special_character_ratio":0.5832258,"punctuation_ratio":0.29710144,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9935436,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2021-08-03T11:07:52Z\",\"WARC-Record-ID\":\"<urn:uuid:2c189938-5331-415e-8135-de806b923d70>\",\"Content-Length\":\"20162\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:855c2bb6-3311-48c8-9c7a-7ae9be306cb4>\",\"WARC-Concurrent-To\":\"<urn:uuid:97ec6a7c-e069-4feb-9b64-d85521bd46d5>\",\"WARC-IP-Address\":\"104.239.138.29\",\"WARC-Target-URI\":\"https://oeis.org/A240828\",\"WARC-Payload-Digest\":\"sha1:JGQUNNW4QGK4OYTQJJD4XHMPWJHSYPTB\",\"WARC-Block-Digest\":\"sha1:2I3U3AI3YGJV6KWEQYUSIE5FHI7O3SD6\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2021/CC-MAIN-2021-31/CC-MAIN-2021-31_segments_1627046154457.66_warc_CC-MAIN-20210803092648-20210803122648-00696.warc.gz\"}"}