%I #19 Mar 05 2017 15:13:56
%S 1,2,1,2,3,1,2,3,2,3,1,2,3,2,3,4,2,1,2,3,2,3,4,2,3,4,3,4,1,2,3,2,3,4,
%T 2,3,4,3,4,2,3,1,2,3,2,3,4,2,3,4,3,4,2,3,4,3,4,5,1,2,3,2,3,4,2,3,4,3,
%U 4,2,3,4,3,4,5,3,2,1,2,3,2,3,4,2,3,4,3,4,2,3,4,3,4,5,3,2,3,4,3
%N Nachos sequence based on 1 plus primes (A008578).
%C Like A280053 but based on 1,2,3,5,7,11,... rather than squares. See that entry for further information.
%C Equivalently, greedily subtract terms of A014284 from n until reaching 0; a(n) = number of steps required.
%H Lars Blomberg, <a href="/A280055/b280055.txt">Table of n, a(n) for n = 1..10000</a>
%e 26 takes 4 phases to read 0:
%e subtract leaves
%e 1 25
%e 2 23
%e 3 20
%e 5 15
%e 7 8
%e ------
%e 1 7
%e 2 5
%e 3 2
%e ------
%e 1 1
%e ------
%e 1 0
%e so a(26) = 4
%p A280055 := proc(n)
%p local a,nres,i ;
%p a := 0 ;
%p nres := n;
%p while nres > 0 do
%p for i from 1 do
%p if A014284(i) > nres then
%p break;
%p end if;
%p end do:
%p nres := nres-A014284(i-1) ;
%p a := a+1 ;
%p end do:
%p a ;
%p end proc:
%p seq(A280055(n),n=1..80) ; # _R. J. Mathar_, Mar 05 2017
%Y Cf. A280055, A014284.
%Y For records see A280760.
%K nonn
%O 1,2
%A _N. J. A. Sloane_, Jan 08 2017