OFFSET
4,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 4..10000
EXAMPLE
7 kara 4 = 2 because 2 * 4 > 7 and 2 * 3 < 7.
7 kara 5 is undefined: 7 kara 5 != 2 because 2 * (5-1) > 7 and 7 kara 5 != 1 because 1 * 5 < 7.
4 kara 3 is undefined: 4 kara 2 = 2; 4 kara 4 = 1.
MATHEMATICA
kara[a_, b_] := Module[{r, c}, r = Reduce[c*b >= a && c*(b-1) < a, c, Integers]; If[r === False, Null, c /. {ToRules[r]} // First]]; a[n_] := For[k = 2, True, k++, If[!IntegerQ[n ~kara~ k], Return[k]]]; Table[a[n], {n, 4, 88}] (* Jean-François Alcover, Sep 13 2013 *)
PROG
(Haskell)
a053405 n = head [a | a <- [1..], n `kara` a == Nothing] where
kara a b = if null ks then Nothing else Just $ head ks
where ks = [c | c <- [1..a], a <= c * b, a > c * (b - 1)]
-- Reinhard Zumkeller, Mar 30 2013
CROSSREFS
KEYWORD
nice,nonn,easy
AUTHOR
Robert Lozyniak (11(AT)onna.com), Jan 08 2000
EXTENSIONS
Corrected and extended by James A. Sellers, Jan 10 2000
STATUS
approved