OFFSET
1,2
FORMULA
For n>1 a(n)=n if n==0 (mod 4), a(n)=2n is n==0 (mod 2) and n is not divisible by 4, a(n)=4n if n is odd.
Empirical g.f.: x * (-3*x^8 +4*x^6 +4*x^5 +18*x^4 +4*x^3 +12*x^2 +4*x+1) / (x^8 -2*x^4 +1). - Colin Barker, Jun 16 2013
PROG
(PARI) a(n)=if(n<2, 1, if(n%2-1, if(n%4, 2*n, n), 4*n))
CROSSREFS
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Jun 22 2003
STATUS
approved