A209662 a(n) = (-1)^A083025(n)*n.
1, 2, 3, 4, -5, 6, 7, 8, 9, -10, 11, 12, -13, 14, -15, 16, -17, 18, 19, -20, 21, 22, 23, 24, 25, -26, 27, 28, -29, -30, 31, 32, 33, -34, -35, 36, -37, 38, -39, -40, -41, 42, 43, 44, -45, 46, 47, 48, 49, 50, -51, -52, -53, 54, -55, 56, 57, -58, 59, -60, -61, 62, 63, 64, 65
Offset: 1
Examples
For n = 10 we have that the 10th row of triangle A207338 is [2, -5] therefore a(10) = 2*(-5) = -10.
References
- Leonhard Euler, Introductio in analysin infinitorum, 1748.
Links
- Ray Chandler, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
f[p_, e_] := If[Mod[p, 4] == 1, (-1)^e, 1]; a[n_] := n * Times @@ f @@@ FactorInteger[n]; a[1] = 1; Array[a, 100] (* Amiram Eldar, Sep 06 2023 *)
-
PARI
a(n)={my(f=factor(n)); n*prod(i=1, #f~, my([p,e]=f[i,]); if(p%4==1, -1, 1)^e)} \\ Andrew Howroyd, Aug 04 2018
Formula
a(n) = n*A209661(n).
Extensions
Formula in sequence name from M. F. Hasler, Apr 16 2012
a(34) corrected by Ray Chandler, Mar 19 2016
Comments