A241154 a(n)=1 for n <= s+k; thereafter a(n) = Sum(a(n-i-s-a(n-i-1)),i=0..k-1) where s=0, k=5.
1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 9, 9, 9, 9, 13, 9, 13, 13, 17, 13, 17, 13, 17, 17, 21, 17, 21, 21, 21, 21, 25, 25, 25, 25, 25, 29, 29, 29, 29, 33, 29, 33, 33, 37, 33, 37, 33, 41, 37, 41, 37, 45, 37, 45, 41, 49, 41, 49, 41, 53, 45, 53, 45, 57, 45, 57, 49, 61, 49, 61, 49, 61, 53, 65, 53, 65, 57, 65, 57, 69, 61, 69, 61
Offset: 1
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 Eq. (1.7).
- Index entries for Hofstadter-type sequences
Crossrefs
Programs
-
Maple
#T_s,k(n) from Callaghan et al. Eq. (1.7). s:=0; k:=5; a:=proc(n) option remember; global s,k; if n <= s+k then 1 else add(a(n-i-s-a(n-i-1)),i=0..k-1); fi; end; t1:=[seq(a(n),n=1..100)];
-
Mathematica
s = 0; k = 5; a[n_] := a[n] = If[n <= s + k, 1, Sum[a[n - i - s - a[n - i - 1]], {i, 0, k - 1}]]; Array[a, 100] (* Jean-François Alcover, Nov 10 2017 *)
Comments