login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(1) = 2, a(2) = a(3) = 3, a(4) = 4, a(5) = a(6) = 6; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 6.
6

%I #22 Dec 18 2017 19:42:20

%S 2,3,3,4,6,6,7,8,8,9,9,10,11,13,13,12,14,16,16,14,19,17,18,19,21,21,

%T 20,22,23,24,23,24,25,26,26,27,27,28,29,30,30,31,32,34,33,34,35,37,36,

%U 37,39,36,39,42,39,41,41,44,45,41,40,50,46,48,43,48,51,49,49,54,48,53,51,58,50,58,52,57,56,59,57,60,58

%N a(1) = 2, a(2) = a(3) = 3, a(4) = 4, a(5) = a(6) = 6; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 6.

%C Conjecture: Sequence is infinite.

%H Altug Alkan, <a href="/A296440/b296440.txt">Table of n, a(n) for n = 1..10000</a>

%H Altug Alkan, <a href="/A296440/a296440.png">Scatterplot of a(n)-2*n/3</a>

%H Hans Havermann, <a href="/A296440/a296440_1.png">Scatterplot of a(n) for n <= 10^7</a>

%p a:= proc(n) option remember; procname(n-procname(n-1))+procname(n-procname(n-2))+procname(n-procname(n-3)) end proc:

%p a(1):= 2: a(2):= 3: a(3):= 3: a(4):= 4: a(5):= 6: a(6):= 6:

%p map(a, [$1..100]); # _Robert Israel_, Dec 12 2017

%t a[n_] := a[n] = If[n<7, {2, 3, 3, 4, 6, 6}[[n]], a[n - a[n-1]] + a[n - a[n-2]] + a[n - a[n-3]]]; Array[a, 83] (* _Giovanni Resta_, Dec 13 2017 *)

%o (PARI) q=vector(10^5); q[1]=2;q[2]=3;q[3]=3;q[4]=4;q[5]=6;q[6]=6; for(n=7, #q, q[n] = q[n-q[n-1]]+q[n-q[n-2]]+q[n-q[n-3]]); q

%o (Scheme, with memoization-macro definec) (definec (A296440 n) (cond ((= 1 n) 2) ((<= n 3) 3) ((= 4 n) 4) ((<= n 6) 6) (else (+ (A296440 (- n (A296440 (- n 1)))) (A296440 (- n (A296440 (- n 2)))) (A296440 (- n (A296440 (- n 3)))))))) ;; _Antti Karttunen_, Dec 13 2017

%Y Cf. A005185, A278055, A284644, A292351.

%K nonn,look

%O 1,1

%A _Altug Alkan_, Dec 12 2017