OFFSET
0,2
LINKS
James Carruthers, Table of n, a(n) for n = 0..10000
EXAMPLE
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
MATHEMATICA
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 *)
PROG
(Python) import numpy as np
import math as m
n = 1
i = 0
inp = np.zeros(1)
out = inp
while n < 10001:
k=m.fabs( m.trunc( m.sin(i) * m.pow( 10, m.floor( m.log10(n)+1 ) ) ) )
if k==n:
inp = np.append(inp, int(n))
out = np.append(out, int(i))
print(n, i)
n += 1
i = 0
continue
else:
i+=1
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
James Carruthers, Sep 21 2019
STATUS
approved