login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A331954 a(n) is the least positive k such that floor(n/k) is a prime number. 3

%I #17 Feb 05 2020 04:05:31

%S 1,1,2,1,2,1,3,3,2,1,4,1,2,2,3,1,5,1,4,3,2,1,7,5,2,2,4,1,4,1,6,3,2,2,

%T 5,1,2,2,3,1,6,1,4,4,2,1,9,7,7,3,3,1,4,4,5,3,2,1,8,1,2,2,9,5,5,1,4,3,

%U 3,1,10,1,2,2,4,4,4,1,6,6,2,1,11,5,2,2

%N a(n) is the least positive k such that floor(n/k) is a prime number.

%C This sequence is unbounded; a(n!*p^2) > n where n > 1 and p is a prime number > n.

%H Rémy Sigrist, <a href="/A331954/b331954.txt">Table of n, a(n) for n = 2..10000</a>

%F a(n) = 1 iff n is a prime number.

%e For n = 8:

%e - floor(8/1) = 8 is not a prime number,

%e - floor(8/2) = 4 is not a prime number,

%e - floor(8/3) = 2 is a prime number,

%e - hence a(8) = 3.

%t Array[Block[{k = 1}, While[! PrimeQ@ Floor[#/k], k++]; k] &, 86, 2] (* _Michael De Vlieger_, Feb 04 2020 *)

%o (PARI) a(n) = for (k=1, oo, if (isprime(n\k), return (k)))

%Y Cf. A331953 (square variant), A331959 (corresponding prime numbers).

%K nonn

%O 2,3

%A _Rémy Sigrist_, Feb 02 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 26 12:25 EDT 2024. Contains 375456 sequences. (Running on oeis4.)