login
A129227
a(n) is that prime number, p, less than n*Pi such that n*Pi/p has the smallest fractional part.
2
3, 3, 3, 11, 5, 17, 7, 5, 7, 31, 17, 37, 37, 43, 47, 5, 53, 53, 59, 31, 13, 23, 71, 73, 13, 79, 83, 29, 13, 47, 97, 97, 103, 53, 109, 113, 29, 17, 61, 31, 127, 131, 67, 137, 47, 71, 73, 149, 151, 157, 157, 163, 83, 167, 43, 173, 179, 181, 37, 47, 191, 97, 197, 67, 17, 103
OFFSET
1,1
EXAMPLE
a(4)=11 because 4*Pi/11 = 1.142... and the fractional part 0.142... represents the smallest remainder resulting from the division of 4*Pi by a prime number less than 4*Pi.
MATHEMATICA
f[n_] := (p = Denominator[ Min[ FractionalPart[(n*Pi / Prime@ Range@ PrimePi[n*Pi])]] [[2]]]; If[p == 1, n, p]); Array[f, 66] (* Robert G. Wilson v, Apr 08 2007 *)
PROG
(Sage) A129227 = lambda n: sorted(primes(floor(n*pi)+1), key=lambda p: (n*pi/p-floor(n*pi/p)))[0] # D. S. McNeil, Dec 11 2010
CROSSREFS
Cf. A129228.
Sequence in context: A278822 A274487 A141794 * A252748 A346869 A097161
KEYWORD
easy,nonn
AUTHOR
Axel Harvey, Apr 04 2007
EXTENSIONS
Edited and extended by Robert G. Wilson v, Apr 08 2007
STATUS
approved