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-4 of 4 results.

A257217 A257213 - A003059, where A257213(n) = min{d>0 | floor(n/d) = floor(n/(d+1))}, A003059(n) = ceiling(sqrt(n)).

Original entry on oeis.org

1, 1, 1, 0, 1, 0, 1, 1, 0, 2, 0, 0, 1, 1, 1, 0, 2, 1, 0, 0, 2, 1, 1, 1, 0, 2, 1, 1, 0, 0, 2, 2, 1, 1, 1, 0, 2, 1, 1, 1, 0, 0, 2, 2, 2, 1, 1, 1, 0, 3, 1, 1, 1, 1, 0, 0, 2, 2, 2, 2, 1, 1, 1, 0, 3, 2, 1, 1, 1, 1, 0, 0, 2, 2, 2, 2, 2, 1, 1, 1, 0, 3, 2, 2, 1, 1
Offset: 0

Views

Author

M. F. Hasler, Apr 18 2015

Keywords

Comments

One has a(n) <= a(n-1) except for n = k^2. The positive jumps occur exactly at the squares, cf. formula.

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{d, k}, Reap@ For[k = 0, k <= n, k++, d = 1; While[Floor[k/d] != Floor[k/(d + 1)], d++]; Sow[d - Ceiling[Sqrt@ k]]] // Flatten // Rest]; f@ 85 (* Michael De Vlieger, Apr 18 2015 *)
  • PARI
    A257217(n)=A257213(n)-A003059(n)

Formula

a(k^2-1) = 0 for k > 1. Proof: For n = k^2-1 = (k-1)(k+1), floor(n/k) = k-1 = n/(k+1) but n/(k-1) = k+1, thus A257213(n) = k = ceiling(sqrt(n)).
A257213(n) >= floor(sqrt(n))+1 = A257213(n+1) >= A257213(n) = ceiling(sqrt(n)), with strict inequality (in the second relation) when n is a square. Therefore a(n) >= 1 for all n = k^2.
a(k^2) >= d when k > d(d-1). Proof: This follows from k^2/(k+d) = k-d+d^2/(k+d), which shows that a(k) >= d when k > d(d-1).

A043548 Least separator of first n Egyptian fractions; i.e., least k for which the integers floor(k/m) for m=1,2,...,n are distinct.

Original entry on oeis.org

1, 1, 2, 6, 9, 16, 20, 30, 42, 49, 64, 81, 90, 110, 132, 156, 169, 196, 225, 256, 272, 306, 342, 380, 420, 441, 484, 529, 576, 625, 650, 702, 756, 812, 870, 930, 961, 1024, 1089, 1156, 1225, 1296, 1332, 1406, 1482, 1560, 1640
Offset: 1

Views

Author

Keywords

Comments

For n > 1: A257213(a(n)) = n. - Reinhard Zumkeller, Apr 19 2015
After the initial 1, 1, the sequence appears to alternate between runs of pronic numbers and squares with run lengths 2,2,3,3,4,4,... - Charlie Neder, Oct 04 2018

Crossrefs

Cf. A257213.

Programs

Formula

a(n) = n^2 + floor(sqrt(n-1))*floor(sqrt(n)+1/2) - n*floor(sqrt(n-1)) - n*floor(sqrt(n)+1/2), for n>1. - Ridouane Oudra, Jun 08 2020
a(n) = n^2 - n*t + floor((t^2)/4), where t = floor(sqrt(4*n-3)) for n>1. - Ridouane Oudra, Jan 24 2023

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

A257212 Least d>0 such that floor(n/d) - floor(n/(d+1)) <= 1.

Original entry on oeis.org

1, 1, 1, 2, 2, 2, 2, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 3, 4, 4, 3, 4, 4, 4, 5, 4, 4, 4, 5, 5, 4, 4, 5, 5, 5, 4, 5, 5, 5, 5, 6, 6, 5, 5, 5, 6, 6, 6, 5, 5, 6, 6, 6, 6, 5, 7, 6, 6, 6, 6, 7, 7, 7, 6, 6, 6, 7, 7, 7, 7, 6, 6, 7, 7, 7, 7, 7, 6, 8, 8, 7, 7, 7, 7, 8, 8, 8
Offset: 0

Views

Author

M. F. Hasler, Apr 18 2015

Keywords

Comments

An efficient formula for this sequence could be useful for faster computation of A024916.

Crossrefs

Programs

  • Haskell
    a257212 n = head [d | d <- [1..], div n d - div n (d+1) <= 1]
    -- Reinhard Zumkeller, Apr 19 2015
  • Mathematica
    f[n_] := Block[{d, k}, Reap@ For[k = 0, k <= n, k++, d = 1; While[Floor[k/d] - Floor[k/(d + 1)] > 1, d++]; Sow[d]] // Flatten // Rest]; f@ 86 (* Michael De Vlieger, Apr 18 2015 *)
    ld[n_]:=Module[{d=1},While[Floor[n/d]-Floor[n/(d+1)]>1,d++];d]; Array[ ld,90,0] (* Harvey P. Dale, Oct 18 2015 *)
  • PARI
    a(n)=for(d=1,n+1,1>=n\d-n\(d+1)&&return(d))
    

Formula

a(n) <= ceiling(sqrt(n)) <= A257213(n) for all n>0.
Showing 1-4 of 4 results.