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!)
A185137 Tri-recursive sequence: a(n) = a(a(a(n-1))) + a(n - a(a(-3+n))) if n>6, otherwise a(n) = 1. 1

%I #28 Dec 18 2022 02:31:32

%S 1,1,1,1,1,1,2,3,4,5,6,7,8,9,9,9,9,10,10,10,10,10,11,11,11,11,11,11,

%T 12,13,14,15,15,15,15,15,15,16,17,18,20,20,20,20,20,20,20,21,22,23,26,

%U 26,26,26,26,26,26,26,27

%N Tri-recursive sequence: a(n) = a(a(a(n-1))) + a(n - a(a(-3+n))) if n>6, otherwise a(n) = 1.

%C a(n-1) <= a(n) for n <= 64, but a(65)-a(64) = 32-35 < 0; first positions m where a(m) > a(m+1): 64, 79, 84, 99, 105, 106, 110, 125, 126, ... . - _Reinhard Zumkeller_, Jun 13 2013

%H Reinhard Zumkeller, <a href="/A185137/b185137.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Ho#Hofstadter">Index entries for Hofstadter-type sequences</a>

%t a[1] = 1; a[2] = 1; a[3] = 1; a[4] = 1; a[5] = 1; a[6] = 1;

%t a[n_] := a[n] = a[a[a[n - 1]]] + a[n - a[a[-3 + n]]]

%t Table[a[n], {n, 1, 300}]

%o (Haskell)

%o a185137 n = a185137_list !! (n-1)

%o a185137_list = 1 : 1 : 1 : 1 : 1 : 1 : f 7 1 1 where

%o f x u v = w : f (x + 1) v w where

%o w = (a185137 . a185137 . a185137) (x - 1) +

%o a185137 (x - (a185137 . a185137) (x - 3))

%o -- _Reinhard Zumkeller_, Jun 13 2013

%Y Cf. A209384, A087831.

%K nonn,look

%O 1,7

%A _Roger L. Bagula_, Mar 12 2012

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 June 16 07:19 EDT 2024. Contains 373423 sequences. (Running on oeis4.)