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!)
A278055 Relative of Hofstadter Q-sequence: a(1) = 1, a(2) = 2, a(3) = 3, a(4) = 4, a(5) = 5; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 5. 16
1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 9, 10, 11, 12, 12, 13, 14, 15, 15, 16, 17, 17, 18, 18, 19, 20, 21, 21, 22, 23, 24, 24, 25, 26, 26, 27, 27, 28, 29, 30, 30, 31, 32, 33, 33, 34, 35, 35, 36, 36, 37, 38, 39, 39, 40, 41, 42, 42, 43, 44, 44, 45, 45, 46, 47, 48, 48, 49, 50, 50, 51 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
This sequence is monotonic, with successive terms increasing by 0 or 1. So the sequence hits every positive integer.
A number k appears twice in this sequence if and only if for some i, k is congruent to A057198(i) mod 3^i and k > A057198(i).
LINKS
Nathan Fox, A Slow Relative of Hofstadter's Q-Sequence, arXiv preprint arXiv:1611.08244 [math.NT], 2016.
FORMULA
a(n) ~ 2n/3.
MATHEMATICA
a[n_] := a[n] = a[n - a[n -1]] + a[n - a[n -2]] + a[n - a[n -3]]; a[1] = 1; a[2] = 2; a[3] = 3; a[4] = 4; a[5] = 5; Array[a, 71] (* Robert G. Wilson v, Dec 02 2016 *)
PROG
(PARI) A=Vecsmall([]);
a(n)=if(n<7, return(n)); if(#A<n, A=concat(A, vectorsmall(n-#A)), if(A[n], return(A[n]))); A[n]=a(n-a(n-3)) + a(n-a(n-2)) + a(n-a(n-1)) \\ Charles R Greathouse IV, Nov 19 2016
CROSSREFS
Sequence in context: A195918 A371156 A176842 * A291764 A319681 A340767
KEYWORD
nonn
AUTHOR
Nathan Fox, Nov 10 2016
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 20 09:30 EDT 2024. Contains 371799 sequences. (Running on oeis4.)