OFFSET
0,2
COMMENTS
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").
LINKS
Mike Koss, Derivation and proof.
Index entries for linear recurrences with constant coefficients, 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).
FORMULA
a(n+35) = a(n) + 35 for all n.
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
MATHEMATICA
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 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Mike Koss, May 22 2021
STATUS
approved