A060646 Bonse sequence: a(n) = minimal j such that n-j+1 < prime(j).
1, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18, 18
Offset: 1
Examples
For n=5, j=3 gives 5-3+1 = 3 < prime(3) = 5, true; but if j=2 we get 5-2+1 = 4 which is not < prime(2) = 3; hence a(5) = 3. a(75)=18 because 75-18+1=58 < 61=prime(18), but 75-17+1=59=prime(17).
References
- R. Remak, Archiv d. Math. u. Physik (3) vol. 15 (1908) 186-193
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
- H. Bonse, Über eine bekannte Eigenshaft der Zahl 30 und ihre Verallgemeinerung, Archiv d. Math. u. Physik (3) vol. 12 (1907) 292-295.
- H. Rademacher and O. Toeplitz, Eine Eigenschaft der Zahl 30, (A property of the number 30), Von Zahlen und Figuren (1930, reprint Springer 1968), ch. 22.
Crossrefs
Cf. A014688.
Programs
-
Haskell
import Data.List (findIndex) import Data.Maybe (fromJust) a060646 n = (fromJust $ findIndex ((n+1) <) a014688_list) + 1 -- Reinhard Zumkeller, Sep 16 2011
-
Mathematica
Table[j=0; While[j++; n-j+1 >= Prime[j]]; j, {n, 1, 76}] (* Jean-François Alcover, Aug 30 2011 *)
-
Python
from sympy import nextprime from itertools import count, islice def agen(): # generator of terms n, pj = 1, 2 for j in count(1): while n - j + 1 < pj: yield j; n += 1 pj = nextprime(pj) print(list(islice(agen(), 76))) # Michael S. Branicky, Aug 09 2022
Comments