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

A028391 a(n) = n - floor(sqrt(n)).

Original entry on oeis.org

0, 0, 1, 2, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 12, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65
Offset: 0

Views

Author

John Mellor (u15630(AT)snet.net)

Keywords

Comments

Number of nonsquares <= n.
Number of k <= n with an even number of divisors. - Benoit Cloitre, Sep 07 2002
Construct the pyramid
............a(0)
.......a(1).a(2).a(3)
..a(4).a(5).a(6).a(7).a(8).. etc.
Now circle all the primes and the result will be a pattern very similar to the famous Ulam spiral. - Sam Alexander, Nov 14 2003
The sequence floor(n-n^(1/2)) gives the same numbers with a different offset. - Mohammad K. Azarian, R. J. Mathar and M. F. Hasler, Apr 30 2008
The number of nonzero values of floor (j^2/n) taken over 1 <= j <= n-1.
a(n) = A173517(n) iff n is not a square. - Reinhard Zumkeller, Feb 20 2010
a(n) - a(n-1) = 0 if n is a square, otherwise 1. - Robert Israel, Dec 30 2014

References

  • B. Alspach, K. Heinrich and G. Liu, Orthogonal factorizations of graphs, pp. 13-40 of Contemporary Design Theory, ed. J. H. Dinizt and D. R. Stinson, Wiley, 1992 (see Theorem 2.7).

Crossrefs

Programs

Formula

a(n) = ceiling(n - sqrt(n)), as follows from ceiling(-x) = -floor(x). [Corrected by M. F. Hasler, Feb 21 2010]
a(n) = 2*n - A028392(n). - Reinhard Zumkeller, Oct 28 2012
G.f.: (1+x)/(2*(1-x)^2) - Theta3(0,x)/(2*(1-x)) where Theta3 is a Jacobi theta function. - Robert Israel, Dec 30 2014

Extensions

Edited by N. J. A. Sloane at the suggestion of R. J. Mathar, May 01 2008
Comment and cross-reference added by Christopher Hunt Gribble, Oct 13 2009
Formula corrected by M. F. Hasler, Feb 21 2010
More terms from Vladimir Joseph Stephan Orlovsky, Mar 29 2010

A080344 Partial sums of A023969.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 1, 2, 3, 3, 3, 3, 3, 4, 5, 6, 6, 6, 6, 6, 6, 7, 8, 9, 10, 10, 10, 10, 10, 10, 10, 11, 12, 13, 14, 15, 15, 15, 15, 15, 15, 15, 15, 16, 17, 18, 19, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 23, 24, 25, 26, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 30, 31, 32, 33, 34, 35
Offset: 0

Views

Author

N. J. A. Sloane, Mar 20 2003

Keywords

Crossrefs

Programs

  • Magma
    [1/2*(n+1-Floor(Sqrt(n+1)+1/2)-Abs(n+1-(Floor(Sqrt(n+1)+1/2))^2)):n in [0..90]]; // Marius A. Burtea, May 09 2019
    
  • PARI
    f(n) = sqrtint(4*n)-2*sqrtint(n); \\ A023969
    a(n) = sum(k=0, n, f(k)); \\ Michel Marcus, May 10 2019
    
  • Python
    from math import isqrt
    def A080344(n): return n+1-(k:=(m:=isqrt(n+1))+int(n>=m*(m+1)))-abs(n+1-k**2)>>1 # Chai Wah Wu, Jun 05 2025

Formula

From Ridouane Oudra, May 11 2019: (Start)
a(n) = (1/2)*(n + 1 - t - abs(n + 1 - t^2)), where t = floor(sqrt(n+1) + 1/2).
a(n) = (1/2)*(n + 1 - A000194(n+1) - abs(n + 1 - A000194(n+1)^2)).
a(n) = (1/2)*(A056847(n+1) - A053188(n+1)). (End)

A213077 a(n) = round(n^2 - sqrt(n)).

Original entry on oeis.org

0, 0, 3, 7, 14, 23, 34, 46, 61, 78, 97, 118, 141, 165, 192, 221, 252, 285, 320, 357, 396, 436, 479, 524, 571, 620, 671, 724, 779, 836, 895, 955, 1018, 1083, 1150, 1219, 1290, 1363, 1438, 1515, 1594, 1675, 1758, 1842, 1929, 2018, 2109, 2202, 2297, 2394
Offset: 0

Views

Author

Ian Stewart, Jun 04 2012

Keywords

Examples

			0^2 - sqrt(0) = 0;
1^2 - sqrt(1) = 0;
2^2 - sqrt(2) = 3,
3^2 - sqrt(3) = 7;
4^2 - sqrt(4) = 14.
		

Crossrefs

Cf. A056847.

Programs

  • Maple
    seq(round(n^2-sqrt(n)), n=0..100); # Robert Israel, Jul 29 2022
  • Mathematica
    Table[Round[n^2 - Sqrt[n]], {n, 0, 100}] (* T. D. Noe, Jun 06 2012 *)
  • Python
    count = 0
    while count < 50:
        ns = count * count
        ns = ns - math.sqrt(count)
        ns = round(ns)
        print(ns, end=',')
        count += 1
    
  • Python
    from math import isqrt
    def A213077(n): return n**2-(m:=isqrt(n))-int((n-m*(m+1)<<2)>=1) # Chai Wah Wu, Jul 29 2022
Showing 1-3 of 3 results.