%I #36 Oct 02 2019 10:43:59
%S 0,3,6,53,9,10,7,4,1,2,91,69,47,25,3,41,63,85,107,129,151,160,138,116,
%T 94,72,50,6,16,38,60,82,104,148,170,163,141,97,75,53,31,9,13,57,79,
%U 101,145,167,166,122,100,78,34,12,10,32,76,98,120,164,147,125,81
%N a(n) is the smallest positive integer m such that the digits of n in base 10 are also the first digits of sin(m) in base 10 after the decimal point.
%H James Carruthers, <a href="/A309320/b309320.txt">Table of n, a(n) for n = 0..10000</a>
%e a(1) = 3 because we have sin(1.) = 0.8414709848..., sin(2.) = 0.9092974268..., sin(3.) = 0.1411200081.. - _N. J. A. Sloane_, Sep 28 2019
%t a[0] =0; a[n_] := Module[{m = 1}, While[(d = IntegerDigits[n]) != RealDigits[ Sin[m], 10, Length[d], -1][[1]], m++]; m]; Array[a, 100, 0] (* _Amiram Eldar_, Sep 28 2019 *)
%o (Python) import numpy as np
%o import math as m
%o n = 1
%o i = 0
%o inp = np.zeros(1)
%o out = inp
%o while n < 10001:
%o k=m.fabs( m.trunc( m.sin(i) * m.pow( 10,m.floor( m.log10(n)+1 ) ) ) )
%o if k==n:
%o inp = np.append(inp,int(n))
%o out = np.append(out,int(i))
%o print(n,i)
%o n += 1
%o i = 0
%o continue
%o else:
%o i+=1
%K nonn,base,easy
%O 0,2
%A _James Carruthers_, Sep 21 2019