cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A053092 2^A053087 kara n.

Original entry on oeis.org

1, 1, 3, 1, 7, 3, 5, 1, 15, 7, 3, 11, 5, 19, 9, 1, 31, 15, 7, 13, 25, 3, 23, 11, 21, 5, 19, 37, 9, 35, 17, 1, 63, 31, 15, 29, 7, 27, 53, 13, 25, 49, 3, 47, 23, 45, 11, 43, 21, 41
Offset: 1

Views

Author

Robert Lozyniak (11(AT)onna.com), Feb 27 2000

Keywords

Programs

  • Haskell
    a053092 n = f 1 where
       f x = case x `kara` n of
                  Nothing -> f $ 2 * x
                  Just y  -> y
       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

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.

Original entry on oeis.org

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, 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, 12, 12, 11, 11, 11, 11, 10, 10, 12, 12, 12, 12, 12, 11, 11, 11, 10, 13, 13, 13, 12, 12, 12, 12
Offset: 4

Views

Author

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

Keywords

Examples

			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.
		

Crossrefs

Programs

  • 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
  • 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 *)

Formula

a(n) = A257213(n-1) + 1. - Ridouane Oudra, Apr 19 2025

Extensions

Corrected and extended by James Sellers, Jan 10 2000
Showing 1-2 of 2 results.