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.

A355159 Numbers k such that (fractional part of k^(3/2)) < 1/2.

Original entry on oeis.org

0, 1, 3, 4, 5, 9, 11, 14, 15, 16, 17, 18, 20, 21, 22, 23, 25, 27, 28, 29, 30, 32, 34, 35, 36, 37, 38, 42, 47, 49, 51, 56, 57, 59, 61, 62, 63, 64, 65, 66, 67, 69, 71, 79, 81, 83, 87, 91, 92, 94, 97, 98, 99, 100, 101, 102, 103, 106, 108, 111, 112, 113, 114, 115
Offset: 0

Views

Author

Clark Kimberling, Jun 22 2022

Keywords

Comments

For each nonnegative integer K there is a greatest nonnegative integer h such that h/K <= sqrt(K); a(n) is the n-th number h such that h/K is closer to sqrt(K) than (h+1)/K is.

Crossrefs

Cf. A000093, A355160 (complement).

Programs

  • Mathematica
    Select[-1 + Range[300], N[FractionalPart[#^(3/2)]] < 1/2 &]  (* A355159 *)
    Select[-1 + Range[300], N[FractionalPart[#^(3/2)]] > 1/2 &]  (* A355160 *)
  • PARI
    isok(k) = frac(k^(3/2)) < 1/2; \\ Michel Marcus, Jul 11 2022
    
  • Python
    from math import isqrt
    from itertools import count, islice
    def A355159_gen(startvalue=0): # generator of terms >= startvalue
        return filter(lambda n:int(((r:=n**3)-(m:=isqrt(r))*(m+1))<<2<=1),count(max(startvalue,0)))
    A355159_list = list(islice(A355159_gen(),30)) # Chai Wah Wu, Aug 03 2022