OFFSET
0,3
COMMENTS
Inspired by the n roots of unity which are e^(2*Pi*i/n), e^(4*Pi*i/n), e^(6*Pi*i/n), ..., e^(2*k*Pi*i/n), ..., e^(2*Pi*i), where 1 <= k <= n.
If b(n) = floor(sqrt(Re(t)^2 + Im(t)^2)), where t = Sum_{k=1..n} E^(2k*Pi*i/n), then the sequence is 0,1,0,0,0, ..., = A063524.
For this sequence I inverted n and k in the formula for the n roots of unity.
First occurrence of k: 0, 1, 2, 6, 22, 12, 24, 30, 42, 36, 49, 56, 64, -1, 73, ...
Last occurrence of k: 24, 15, 20, 48, 54, 60, 47, 69, 70, 96, 88, 89, 108, -1, ...
The number of times k occurs: 4, 4, 8, 7, 8, 6, 5, 6, 7, 8, 9, 8, 6, 0, 11, 9, ...
Numbers that do not occur: 13, 96, 150, 231, 1149, 1410, ...
LINKS
Eric Weisstein's World of Mathematics, Root of Unity.
FORMULA
a(n) = floor(sqrt(Re(s)^2 + Im(s)^2)), where s = Sum_{k=1..n} e^(2*n*Pi*i/k).
MATHEMATICA
f[n_] := Block[{s = Sum[Exp[2n* Pi*I/k], {k, n}]}, Floor[ Sqrt[ N[ Re[s]^2] + N[ Im[s]^2]]]]; Array[f, 75, 0]
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert G. Wilson v, Dec 02 2020
STATUS
approved