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.

A038759 a(n) = ceiling(sqrt(n))*floor(sqrt(n)).

Original entry on oeis.org

0, 1, 2, 2, 4, 6, 6, 6, 6, 9, 12, 12, 12, 12, 12, 12, 16, 20, 20, 20, 20, 20, 20, 20, 20, 25, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 36, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 49, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 64, 72, 72, 72, 72, 72, 72, 72
Offset: 0

Views

Author

Henry Bottomley, May 03 2000

Keywords

Comments

a(n) = n iff n is a square or a pronic (or heteromecic) number of form k(k+1). The sequence interleaves individual squares with 2k copies of each pronic.

Examples

			a(31) = 30 since 6 and 5 are on either side of the square root of 31 and 6*5 = 30.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Ceiling[Sqrt[n]]*Floor[Sqrt[n]]; Array[a, 70, 0] (* Amiram Eldar, Dec 04 2022 *)
  • PARI
    a(n) = my(r,s=sqrtint(n,&r)); if(r, n-r+s, n); \\ Kevin Ryde, Jul 30 2022
  • Python
    from math import isqrt
    def A038759(n): return m+n+k if (m:=(k:=isqrt(n))**2-n) else n # Chai Wah Wu, Jul 28 2022
    

Formula

a(n) = A003059(n)*A000196(n) = n - A038760(n).
a(A002620(n)) = A002620(n). - Bernard Schott, Nov 06 2022
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/12 (A072691). - Amiram Eldar, Dec 04 2022

A174803 a(n) = n + ceiling(sqrt(n))*floor(sqrt(n)).

Original entry on oeis.org

0, 2, 4, 5, 8, 11, 12, 13, 14, 18, 22, 23, 24, 25, 26, 27, 32, 37, 38, 39, 40, 41, 42, 43, 44, 50, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 72, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 98, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 128, 137
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A000290 (n^2), A001105 (2*n^2).

Programs

  • Mathematica
    f[n_]:=n+Floor[Sqrt[n]]*Ceiling[Sqrt[n]];Table[f[n],{n,0,5!}]

Formula

a(n) = n + A038759(n). - Robert G. Wilson v, Apr 17 2010
a(n^2) = 2*n^2. - Bernard Schott, Jul 30 2022

A174804 a(n) = n*ceiling(sqrt(n))*floor(sqrt(n)).

Original entry on oeis.org

0, 1, 4, 6, 16, 30, 36, 42, 48, 81, 120, 132, 144, 156, 168, 180, 256, 340, 360, 380, 400, 420, 440, 460, 480, 625, 780, 810, 840, 870, 900, 930, 960, 990, 1020, 1050, 1296, 1554, 1596, 1638, 1680, 1722, 1764, 1806, 1848, 1890, 1932, 1974, 2016, 2401, 2800
Offset: 0

Views

Author

Keywords

Comments

As a(n^2) = n^4, A000583 is a subsequence. - Bernard Schott, Feb 01 2023

Crossrefs

Programs

  • Mathematica
    f[n_]:=n*Floor[Sqrt[n]]*Ceiling[Sqrt[n]];Table[f[n],{n,0,5!}]
  • PARI
    a(n) = n*sqrtint(n)*ceil(sqrt(n)); \\ Michel Marcus, Feb 14 2018
    
  • Python
    from math import isqrt
    def A174804(n): return n*(n if (k:=(m:=isqrt(n))**2)==n else k+m) # Chai Wah Wu, Jul 29 2022

Formula

a(n) = n*A000196(n)*A003059(n). - Michel Marcus, Feb 14 2018

A174805 n+ceiling[sqrt(n)]+floor[sqrt(n)].

Original entry on oeis.org

0, 3, 5, 6, 8, 10, 11, 12, 13, 15, 17, 18, 19, 20, 21, 22, 24, 26, 27, 28, 29, 30, 31, 32, 33, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 63, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 80, 82, 83, 84, 85, 86, 87
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_]:=n+Floor[Sqrt[n]]+Ceiling[Sqrt[n]];Table[f[n],{n,0,5!}]
Showing 1-4 of 4 results.