

A278055


Relative of Hofstadter Qsequence: a(1) = 1, a(2) = 2, a(3) = 3, a(4) = 4, a(5) = 5; a(n) = a(na(n1)) + a(na(n2)) + a(na(n3)) 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, Table of n, a(n) for n = 1..10000
Nathan Fox, A Slow Relative of Hofstadter's QSequence, 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(na(n3)) + a(na(n2)) + a(na(n1)) \\ Charles R Greathouse IV, Nov 19 2016


CROSSREFS

Cf. A005185, A057198, A063882, A267501, A274058.
Sequence in context: A071520 A195918 A176842 * A291764 A319681 A099848
Adjacent sequences: A278052 A278053 A278054 * A278056 A278057 A278058


KEYWORD

nonn


AUTHOR

Nathan Fox, Nov 10 2016


STATUS

approved



