OFFSET
0,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 0..9999
B. Cloitre, N. J. A. Sloane and M. J. Vandermast, Numerical analogues of Aronson's sequence, J. Integer Seqs., Vol. 6 (2003), #03.2.2.
B. Cloitre, N. J. A. Sloane and M. J. Vandermast, Numerical analogues of Aronson's sequence, arXiv:math/0305308 [math.NT], 2003.
FORMULA
a(3m)=6m, a(3m+1)=3m+2, a(3m+2)=6m+3.
MATHEMATICA
{#+1, 2#-1, 2#}[[Mod[ #, 3, 1]]]&/@Range[0, 80] (* Federico Provvedi, Jun 15 2021 *)
PROG
(Python)
def a(n): m, r = divmod(n, 3); return 3*(2-r%2)*m + (r > 0)*(r+1)
print([a(n) for n in range(68)]) # Michael S. Branicky, Jun 15 2021
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
N. J. A. Sloane, Mar 14 2003
EXTENSIONS
More terms from Matthew Vandermast, Mar 20 2003
STATUS
approved