login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A086170
a(1)=1; a(n)=a(n-1)+1 if n is in the sequence; a(n)=a(n-1)+2 if n and (n-1) are not in the sequence; a(n)=a(n-1)+3 if n is not in the sequence but (n-1) is in the sequence.
0
1, 4, 6, 7, 10, 11, 12, 15, 17, 18, 19, 20, 23, 25, 26, 29, 30, 31, 32, 33, 36, 38, 39, 42, 43, 44, 47, 49, 50, 51, 52, 53, 54, 57, 59, 60, 63, 64, 65, 68, 70, 71, 72, 73, 76, 78, 79, 82, 83, 84, 85, 86, 87, 88, 91, 93, 94, 97, 98, 99, 102, 104, 105, 106, 107, 110, 112, 113
OFFSET
1,2
FORMULA
a(n)=phi*n +O(1) where phi=(1+sqrt(5))/2
CROSSREFS
Sequence in context: A340833 A340847 A286494 * A123088 A256657 A189085
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Sep 13 2003
EXTENSIONS
Corrected by T. D. Noe, Oct 25 2006
STATUS
approved