OFFSET
1,2
COMMENTS
Conjecture: Only odd numbers occur after 2. - Antti Karttunen, Jun 13 2013
Conjecture is true. - Chai Wah Wu, Jun 07 2016
FORMULA
a(n) = A193422(n)+1, or in other words, 1 + the position of the first occurrence of n in A193358. - Antti Karttunen, Jun 13 2013
From Chai Wah Wu, Jun 07 2016: (Start)
G.f.: x*(x^6 - x^5 - 3*x^4 + 4*x^3 - x^2 - x - 1)/((x - 1)^3*(x + 1)^2).
a(2*n) = n*(n-1) + 1 for n > 1.
a(2*n+1) = n*(n+3) + 1.
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n > 7. (End)
MATHEMATICA
aux[0]=1; aux[1]=2; aux[n_]:=aux[n]=aux[n-aux[n-2]]+2;
a[i_]:={n=0; While[!(aux[n]==i), n++]; n};
Flatten[Table[a[i]+1, {i, 1, 100}]]
(* corrected by Robert Price, Jun 06 2016 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
José María Grau Ribas, Jan 22 2012
EXTENSIONS
Description clarified to take heed of changed offset of A193358 by Antti Karttunen, Jun 13 2013
STATUS
approved