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!)
A053405 Definition: A kara B = C, where C is the least nonnegative integer such that C * B >= A and C * (B-1) < A. a(n) is the smallest k such that n kara k is undefined. 2

%I #14 Feb 03 2023 01:34:40

%S 3,4,4,5,5,4,6,5,5,6,6,6,5,7,7,6,6,8,7,7,7,6,8,8,8,7,7,9,9,8,8,8,7,9,

%T 9,9,9,8,8,10,10,10,9,9,9,8,11,10,10,10,10,9,9,11,11,11,11,10,10,10,9,

%U 12,12,11,11,11,11,10,10,12,12,12,12,12,11,11,11,10,13,13,13,12,12,12,12

%N Definition: A kara B = C, where C is the least nonnegative integer such that C * B >= A and C * (B-1) < A. a(n) is the smallest k such that n kara k is undefined.

%H Reinhard Zumkeller, <a href="/A053405/b053405.txt">Table of n, a(n) for n = 4..10000</a>

%e 7 kara 4 = 2 because 2 * 4 > 7 and 2 * 3 < 7.

%e 7 kara 5 is undefined: 7 kara 5 != 2 because 2 * (5-1) > 7 and 7 kara 5 != 1 because 1 * 5 < 7.

%e 4 kara 3 is undefined: 4 kara 2 = 2; 4 kara 4 = 1.

%t 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 *)

%o (Haskell)

%o a053405 n = head [a | a <- [1..], n `kara` a == Nothing] where

%o kara a b = if null ks then Nothing else Just $ head ks

%o where ks = [c | c <- [1..a], a <= c * b, a > c * (b - 1)]

%o -- _Reinhard Zumkeller_, Mar 30 2013

%Y Cf. A053087.

%K nice,nonn,easy

%O 4,1

%A Robert Lozyniak (11(AT)onna.com), Jan 08 2000

%E Corrected and extended by _James A. Sellers_, Jan 10 2000

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 September 9 16:40 EDT 2024. Contains 375765 sequences. (Running on oeis4.)