|
|
A080901
|
|
a(1)=2; for n>1, a(n)=a(n-1)-2 if n is already in the sequence, a(n)=a(n-1)+5 otherwise.
|
|
6
|
|
|
2, 0, 5, 10, 8, 13, 18, 16, 21, 19, 24, 29, 27, 32, 37, 35, 40, 38, 36, 41, 39, 44, 49, 47, 52, 57, 55, 60, 58, 63, 68, 66, 71, 76, 74, 72, 70, 68, 66, 64, 62, 67, 72, 70, 75, 80, 78, 83, 81, 86, 91, 89, 94, 99, 97, 102, 100, 98, 103, 101, 106, 104, 102, 100
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
a(n)-n (n >= 1) (A081745) is periodic with period 168.
|
|
MATHEMATICA
|
Fold[Append[#1, #1[[-1]] + If[MemberQ[#1, #2], -2, 5]] &, {2}, Range[2, 64]] (* Ivan Neretin, Mar 03 2016 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|