Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Search: a046959 -id:a046959
     Sort: relevance | references | number | modified | created      Format: long | short | data
Sin(n) decreases monotonically to -1.
+10
5
1, 3, 4, 5, 11, 344, 1054, 1764, 2474, 3184, 3894, 4604, 5314, 6024, 6734, 7444, 8154, 8864, 9574, 10284, 10994, 11704, 12414, 13124, 13834, 14544, 15254, 15964, 16674, 17384, 18094, 18804, 19514, 20224, 20934, 21644, 22354, 23064, 23774, 24484, 25194, 25904
OFFSET
1,2
COMMENTS
Sin(10265498) =-0.9999999999999999313932793053103935998520142594607...
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 1..93, terms a(1)..a(88) from Robert G. Wilson v
MATHEMATICA
z={}; current=1; Timing[ Do[ If[ Sin[ n ]<current, AppendTo[ z, current=Sin[ n ] ] ], {n, 30000} ] ]; z
d = 1; lst = {}; Do[a = Sin@n; If[a > d, d = a; Print@n; AppendTo[lst, n]], {n, 111111111}]; lst (* Robert G. Wilson v, Aug 24 2007 *)
PROG
(PARI) d=oo; print1("1, 3, "); for(k=1, 10^8, my(di=2*k/Pi, dir=round(di), dd); if(dir%4==3, dd=abs(di-dir); if(dd<d, print1(k, ", "); d=dd))) \\ Hugo Pfoertner, Feb 29 2020
CROSSREFS
KEYWORD
nonn
STATUS
approved
Permutation of the positive integers related to the "Sine tree" (see Comments lines for construction details).
+10
2
1, 3, 2, 4, 8, 9, 5, 7, 10, 18, 16, 37, 21, 15, 43, 75, 33, 36, 20, 14, 11, 19, 17, 34, 38, 22, 29, 41, 73, 66, 150, 86, 31, 172, 300, 132, 147, 83, 59, 44, 76, 68, 35, 39, 6, 13, 79, 71, 136, 152, 88, 119, 167, 295, 264, 600, 344, 62, 173, 301, 133, 146, 82
OFFSET
1,2
COMMENTS
The "Sine tree" is constructed according to this procedure:
take an infinite complete binary tree,
initially, the nodes have no value,
for each n=1,2,3,...:
move to the root node,
while the current node has a value:
if sin(n)<sin(node.value) then move to the left child node,
else move to the right child node.
assign the value n to the current node.
As the set {sin(1), sin(2), sin(3), ...} is dense in the open interval ]-1, +1[, each node will eventually have a value.
a(n) corresponds to the "index" of the node with value n:
- the index of the root node is 1,
- the index of the left child of the node with index k is 2*k,
- the index of the right child of the node with index k is 2*k+1.
a(A046959(n)) = 2^(n-1)-1, for any n>1.
a(A046964(n)) = 2^(n-1), for any n>0.
EXAMPLE
For n=1: the root node has no value, so we assign it the value 1, and a(1)=1.
For n=2: the root node has value 1, and sin(2)>sin(1), so we move to the right child node. This node has no value, so we assign it the value 2, and a(2)=2*1+1.
For n=3: the root node has value 1, and sin(3)<sin(1), so we move to the left child node. This node has no value, so we assign it the value 3, and a(3)=2*1.
PROG
(Perl) See Links section.
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Paul Tek, Oct 04 2013
STATUS
approved
Inverse permutation to A228784.
+10
1
1, 3, 2, 4, 7, 45, 8, 5, 6, 9, 21, 310, 46, 20, 14, 11, 23, 10, 22, 19, 13, 26, 334, 378, 104038, 89, 309, 335, 27, 341, 33, 344, 17, 24, 43, 18, 12, 25, 44, 336
OFFSET
1,2
COMMENTS
a(A228784(n))=n, for any n>0.
a(2^n-1)=A046959(n+1), for any n>0.
a(2^n)=A046964(n+1), for any n>=0.
CROSSREFS
KEYWORD
nonn
AUTHOR
Paul Tek, Oct 05 2013
STATUS
approved
a(1) = 1, and for each n >= 2, a(n) is the smallest number such that 1/sin(a(n)) < 1/sin(a(k)) for all k < n, so that 1/sin(a(1)) > 1/sin(a(2)) > ... > 1/sin(a(n)) > ...
+10
0
1, 2, 4, 6, 22, 333, 355, 103993, 104348, 1042060, 1146408, 4272943, 5419351, 80143857
OFFSET
1,2
REFERENCES
J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 83, p. 29, Ellipses, Paris 2008. Also Entry 137, p. 47.
LINKS
Eric Weisstein's World of Mathematics, Pi
EXAMPLE
1/sin(1) = 1.1883951; 1/sin(2) = 1.0997501; 1/sin(4) = - 1.3213487.
MAPLE
a:= evalf(1/sin(1)); for n from 2 to 10000000 do; if a > evalf(1/sin(n)) then a:= evalf(1/sin(n)); print(n); else fi ; od;
MATHEMATICA
vm = 2; s = {}; Do[v = 1/Sin[n]; If[v < vm, vm = v; AppendTo[s, n]], {n, 1, 110000}]; s (* Amiram Eldar, Aug 10 2019 *)
PROG
(PARI) lista(NN) = {my(x=2); for(k=1, NN, if(1/sin(k)<x, x=1/sin(k); print1(k", "))); } \\ Jinyuan Wang, Aug 12 2019
KEYWORD
nonn,more
AUTHOR
Michel Lagneau, Feb 03 2010
EXTENSIONS
a(13) corrected and a(14) added by Amiram Eldar, Aug 10 2019
STATUS
approved
a(n) is the n-digit integer m that maximizes sin(m).
+10
0
8, 33, 699, 9929, 51819, 573204, 4846147, 37362253, 288632526, 9251925681, 81129397337, 881156436695
OFFSET
1,1
COMMENTS
a(n) is also the n-digit integer that minimizes the mean square error of the approximation sin(x+m) for cos(x) over [0, 2*Pi].
Naturally, sin(a(n)) is the best approximation to 1 for an n-digit integer argument. a(n) is the closest integer to an n-digit number of the form (4k+1)*Pi/2. Often used to compute an approximated rotation matrix with just a few number of characters of code, as in M = sin(x+{0,699,-699,0}). It is not guaranteed that each term in the sequence produces a better approximation than the previous one, although numerical evidence suggests so. It is therefore also not guaranteed to be a subsequence of A046959.
EXAMPLE
For n=3, a(3)=699 since no other 3-digit integer m makes sin(x+m) closer to cos(x) than m=699 does. For example, cos(4.5) = -0.210795799... and sin(4.5+699) = -0.215061112... and no other value of m will make the latter closer to the former.
PROG
(C)
double e = 1.0;
int b = 0, d=1, c=10;
int a[10]; // print A to see the results
for( int i=0; d<10; i++ )
{
double y = double(i*4+1)*PI/2.0;
double z = round(y);
double f = abs(z-y);
int w = int(z);
if( w>=c ) { a[d]=b; c*=10; e=1.0; b=0; d++; }
if( f< e ) { e=f; b=w; }
}
CROSSREFS
Cf. A046959.
KEYWORD
nonn,base,more
AUTHOR
Inigo Quilez, Feb 12 2020
STATUS
approved

Search completed in 0.007 seconds