OFFSET
1,3
COMMENTS
The sequence appears when computing constants that encode all odd numbers starting from 3, then from 5, then from 7, etc. The general formula of the constant is a(n) + (2n-1)!!*sqrt(2*Pi*e)*erf(1/sqrt(2)), where n>0. For more information on how to generate the constant please watch the Grime-Haran Numberphile video.
LINKS
James Grime and Brady Haran, 2.920050977316, Numberphile video, Nov 26 2020.
FORMULA
Homogeneous recurrence: (-2*n+9)*a(n-4) + (6*n-20)*a(n-3) + (-6*n+12)*a(n-2) + 2*n*a(n-1) - a(n) = 0 with a(1)=a(2)=1, a(3)=-3, a(4)=-35. - Georg Fischer, Sep 01 2022
MAPLE
A339516 := proc(n)
option remember ;
if n = 1 then
1;
else
(2*n-3)*(procname(n-1)-2*(n-2)) ;
end if;
end proc:
seq(A339516(n), n=1..30) ; # R. J. Mathar, Aug 24 2022
MATHEMATICA
a[1]=1; a[n_]:=(a[n-1]-2(n-2))(2n-3); Array[a, 20] (* Stefano Spezia, Dec 08 2020 *)
nxt[{n_, a_}]:={n+1, (a-2n)(2n+1)}; Join[{1}, NestList[nxt, {1, 1}, 20][[;; , 2]]] (* Harvey P. Dale, Aug 25 2024 *)
PROG
(Python)
#generate first 50 numbers of the sequence
cnt = 50
i=0
seq = list()
seq.append(1)
i=1
while (i<cnt):
seq.append((seq[i-1]-2*(i-1))*(2*i-1))
i=i+1
print(seq)
CROSSREFS
KEYWORD
sign
AUTHOR
Kamil Zabkiewicz, Dec 07 2020
STATUS
approved