Skip to content

Instantly share code, notes, and snippets.

@VladimirReshetnikov
Created September 30, 2020 19:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VladimirReshetnikov/22026ec09ab15684971c1a4133e20fc5 to your computer and use it in GitHub Desktop.
Save VladimirReshetnikov/22026ec09ab15684971c1a4133e20fc5 to your computer and use it in GitHub Desktop.
With[{s = Table[1 - Mod[Total[IntegerDigits[n, 3]], 3], {n, 0, 3000}]},
Print[s[[;; 40]]];
ListPlot[Nest[Accumulate, s, 6], Joined -> True, ImageSize -> Large]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment