OFFSET
0,3
REFERENCES
H. Brocard, Query 4293, L'Intermédiaire des Mathématiciens, 23 (1916), 58-59. - N. J. A. Sloane, Mar 08 2022
FORMULA
a(0)=a(1)=1; a(2)=3; a(n) = 4*a(n-1) + ((-1)^(n-1)-3)/2 * a(floor((n-1)/2)). - Carl R. White, Oct 06 2017
MAPLE
A259858 := proc(n)
A002083(2*n+1) ;
end proc:
seq(A259858(n), n=0..30) ; # R. J. Mathar, Jul 09 2015
MATHEMATICA
a[n_] := a[n] = If[n < 3, 1 + 2 Boole@ PrimeQ@ n, 4 a[n - 1] + ((-1)^(n - 1) - 3)/2*a[Floor[(n - 1)/2]]]; Array[a, 27, 0] (* Michael De Vlieger, Oct 06 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Jul 07 2015
STATUS
approved