OFFSET
1,2
COMMENTS
FORMULA
EXAMPLE
a(1) = -0*(-1)^0 - 1*(-1)^1 = 0 + 1 = 1;
a(2) = -4*(-1)^4 - 5*(-1)^5 - 6*(-1)6 - 7*(-1)^7 - 8*(-1)^8 - 9*(-1)^9 = -4 + 5 - 6 + 7 - 8 + 9 = 3.
MAPLE
A163300 := proc(n) if n <= 2 then op(n, [0, 4]) ; else for a from procname(n-1)+2 by 2 do if not isprime(a) then return a; end if; end do; end if; end proc:
A014076 := proc(n) if n = 1 then 1; else for a from procname(n-1)+2 by 2 do if not isprime(a) then return a ; end if; end do: end if; end proc:
A001057 := proc(n) (1-(-1)^n*(2*n+1))/4; end proc:
CROSSREFS
KEYWORD
nonn
AUTHOR
Juri-Stepan Gerasimov, Jul 26 2009
EXTENSIONS
Corrected from a(39) onwards by R. J. Mathar, May 21 2010
STATUS
approved