%I #26 May 28 2021 20:04:38
%S 0,8,16,24,32,5,13,21,29,2,10,18,26,34,7,15,23,31,4,12,20,28,1,9,17,
%T 25,33,6,14,22,30,3,11,19,27,35,43,51,59,67,40,48,56,64,37,45,53,61,
%U 69,42,50,58,66,39,47,55,63,36,44,52,60,68,41,49,57,65,38
%N Lexicographically earliest sequence such that |a(n+1)-a(n)| is a cube > 1 and no number occurs twice; a(0) = 0.
%C The difference between successive terms, a(n+1)-a(n), is either +8 or -27. This sequence is a permutation of the nonnegative integers (with no "gaps").
%H Mike Koss, <a href="http://bit.ly/cube-diffs">Derivation and proof</a>.
%H <a href="/index/Rec#order_30">Index entries for linear recurrences with constant coefficients</a>, signature (2,-1,0,0,0,0,-1,2,-1,0,0,0,0,-1,2,-1,0,0,0,0,-1,2,-1,0,0,0,0,-1,2,-1).
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the nonnegative integers</a>
%F a(n+35) = a(n) + 35 for all n.
%F a(n) = 2*a(n-1) - a(n-2) - a(n-7) + 2*a(n-8) - a(n-9) - a(n-14) + 2*a(n-15) - a(n-16) - a(n-21) + 2*a(n-22) - a(n-23) - a(n-28) + 2*a(n-29) - a(n-30) for n > 29. - _Stefano Spezia_, May 23 2021
%t a[0]=0;a[n_]:=a[n]=(k=1;While[!IntegerQ[s=Abs[k-a[n-1]]^(1/3)]||s==1||MemberQ[Array[a,n-1],k],k++];k);Array[a,100,0] (* _Giorgos Kalogeropoulos_, May 27 2021 *)
%Y Cf. A277616.
%K nonn,easy
%O 0,2
%A _Mike Koss_, May 22 2021