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-10 of 12 results. Next

A022554 a(n) = Sum_{k=0..n} floor(sqrt(k)).

Original entry on oeis.org

0, 1, 2, 3, 5, 7, 9, 11, 13, 16, 19, 22, 25, 28, 31, 34, 38, 42, 46, 50, 54, 58, 62, 66, 70, 75, 80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 131, 137, 143, 149, 155, 161, 167, 173, 179, 185, 191, 197, 203, 210, 217, 224, 231, 238, 245, 252, 259, 266, 273, 280
Offset: 0

Views

Author

Michel Tixier (tixier(AT)dyadel.net)

Keywords

Comments

Partial sums of A000196. - Michel Marcus, Mar 01 2016
It seems that a(47) = 197 is the largest prime in this sequence. Tested for n <= 10^11. - Hugo Pfoertner, Oct 26 2020 [This is true. See A214036]
By drawing a picture of the sum Integral_{x=0..n} ceiling(sqrt(x)) dx, one easily sees that it is equal to n*m - Sum_{k=1..m} (k^2 - 1) with m = floor(sqrt(n)), whence the formula. - M. F. Hasler, Apr 23 2022
We can prove that 197 is the largest prime in this sequence. From the formula, 6*a(n) = m*(6n - 2m^2 - 3m + 5) where m = floor(sqrt(n)). Therefore 6*a(n) is divisible by m, which means that a(n) is divisible by A060789(m). For n>48, we have m>6, so A060789(m)>1, so a(n) is not prime; testing all n up to 48, we see that a(47)=197 is the last prime. - Mikhail Lavrov, Dec 09 2023

Examples

			G.f. = x + 2*x^2 + 3*x^3 + 5*x^4 + 7*x^5 + 9*x^6 + 11*x^7 + 13*x^8 + 16*x^9 + ...
		

References

  • R. L. Graham, D. E. Knuth, and O. Patashnik, Concrete Mathematics, 2nd Edition, Addison-Wesley, 1994, Eq. 3.27 on page 87.
  • D. E. Knuth, The Art of Computer Programming, Vol. 1, 3rd Edition, Addison-Wesley, 1997, Ex. 43 of section 1.2.4.
  • K. H. Rosen, Discrete Mathematics and Its Application, 6th Edition, McGraw-Hill, 2007, Ex. 25 of section 2.4.

Crossrefs

Cf. A000196 (first differences), A025224, A214036, A000330.

Programs

  • Magma
    [&+[Floor(Sqrt(k)): k in [0..n]]: n in [0..50]]; // G. C. Greubel, Feb 26 2018
    
  • Maple
    seq(add(floor(sqrt(k)), k=0..n), n=0..59);
  • Mathematica
    Accumulate[Floor[Sqrt[Range[0,60]]]] (* Harvey P. Dale, Feb 16 2011 *)
    Table[Sum[Floor[Sqrt[i]], {i,0,n}], {n,0,50}] (* G. C. Greubel, Dec 22 2016 *)
  • PARI
    a(n)=sum(k=1,n,sqrtint(k)) \\ Charles R Greathouse IV, Jan 12 2012
    
  • PARI
    a(n)=my(k=sqrtint(n));k*(n-(2*k+5)/6*(k-1)) \\ Charles R Greathouse IV, Jan 12 2012
    
  • Python
    from math import isqrt
    def A022554(n): return (m:=isqrt(n))*(m*(-(m<<1)-3)+6*n+5)//6 # Chai Wah Wu, Aug 03 2022

Formula

a(0)=0, a(1)=1; a(n) = 2*a(n-1) - a(n-2) if n is not a perfect square; a(n) = 2*a(n-1) - a(n-2) + 1 if n is a perfect square.
a(n) = floor(sqrt(n)) * (n-1/6*(2*floor(sqrt(n))+5)*(floor(sqrt(n))-1)). - Yong Kong (ykong(AT)curagen.com), Mar 10 2001
a(n) = (2/3)*n^(3/2) - (1/2)*n + O(sqrt(n)). - Charles R Greathouse IV, Jan 12 2012
G.f.: Sum_{k>=1} x^(k^2)/(1 - x)^2. - Ilya Gutkovskiy, Dec 22 2016
a(n) = m*(n - m^2/3 - m/2 + 5/6) where m = floor(sqrt(n)). - M. F. Hasler, Apr 23 2022
a(n) = n*t(n) - A000330(t(n)), where t(n) = floor(sqrt(n)). - Ridouane Oudra, Mar 05 2025

Extensions

More terms from Yong Kong (ykong(AT)curagen.com), Mar 10 2001

A282168 a(n) is the minimal sum of a positive integer sequence of length n with no duplicate substrings (forward or backward) of length greater than 1.

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 13, 16, 19, 22, 25, 29, 33, 37, 41, 45, 49, 53, 57, 62, 67, 72, 77, 82, 87, 92, 97, 102, 108, 114, 120, 126, 132, 138, 144, 150, 156, 162, 168, 174, 181, 188, 195, 202, 209, 216, 223, 230, 237, 244, 251, 258, 265, 273, 281, 289, 297, 305, 313, 321, 329, 337, 345, 353
Offset: 1

Views

Author

Peter Kagey, Feb 07 2017

Keywords

Comments

This sequence shares first 12 terms with A025224, but then they diverge: a(13) = 33 > 32 = A025224(13).
We seem to have a(n) = a(n-1) + a(n-2) - a(n-3) + d(n), where d(n) is 0 or 1. Compare to A282166. - Max Alekseyev, Jun 13 2025

Examples

			[1,2,3,1,2] is invalid because the substring [1,2] appears twice.
[1,2,1] is invalid because the substring [1,2] appears twice (once forward and once backward).
a(1)  = 1   via [1];
a(2)  = 2   via [1,1];
a(3)  = 4   via [1,1,2];
a(4)  = 6   via [1,1,2,2];
a(5)  = 8   via [1,1,2,3,1];
a(6)  = 10  via [1,1,2,2,3,1];
a(7)  = 13  via [1,1,2,2,3,3,1];
a(8)  = 16  via [1,1,2,2,3,1,4,2];
a(9)  = 19  via [1,1,2,2,3,3,1,4,2];
a(10) = 22  via [1,1,2,2,3,1,4,2,5,1];
a(11) = 25  via [1,1,2,2,3,3,1,4,2,5,1];
a(12) = 29  via [1,1,2,2,3,3,1,4,4,2,5,1].
		

Crossrefs

Extensions

Edited and terms a(13) onward added by Max Alekseyev, Feb 05 2025

A174058 Round(Sum_{k=1..n} {sqrt(k)}).

Original entry on oeis.org

0, 1, 2, 4, 6, 8, 11, 13, 16, 19, 22, 26, 29, 33, 37, 40, 44, 49, 53, 57, 62, 66, 71, 76, 81, 86, 91, 96, 101, 107, 112, 118, 123, 129, 135, 141, 147, 153, 159, 165, 172, 178, 184, 191, 198, 204, 211, 218, 225, 232, 239, 246, 253, 261, 268, 275, 283, 290, 298, 306
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    s=0;lst={};Do[s+=Sqrt[n];AppendTo[lst,Round[s]],{n,0,6!}];lst
    Accumulate[Sqrt[Range[0,60]]]//Round (* Harvey P. Dale, Oct 16 2018 *)

A137262 Floor of sum of the first 10^n square roots.

Original entry on oeis.org

1, 22, 671, 21097, 666716, 21082008, 666667166, 21081852648, 666666671666, 21081851083600, 666666666716666, 21081851067947309, 666666666667166666, 21081851067790776685, 666666666666671666666, 21081851067789211358047, 666666666666666716666666, 21081851067789195704773173
Offset: 0

Views

Author

Cino Hilliard, Mar 12 2008

Keywords

Examples

			The first 10^0 square roots is 1. The sum of the first 10^1 square roots is 22.468278186... . So 22 is the second entry in the sequence.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Floor[Sum[Sqrt[j],{j,10^n}]];Array[a,17,0] (* James C. McMahon, May 17 2025 *)
    a[n_] := Floor[HarmonicNumber[10^n, -1/2]]; Array[a, 20, 0] (* Amiram Eldar, Jul 18 2025 *)
  • PARI
    g2(n,p=2) = for(j=0,n,s=0;for(x=0,10^j,s+=x^(1/p)); print1(floor(s)", "))

Formula

From Amiram Eldar, Jul 18 2025: (Start)
a(n) = A025224(10^n).
a(n) ~ (2/3) * 10^(3*n/2). (End)

Extensions

a(10)-a(16) from James C. McMahon, May 17 2025
a(17) from Amiram Eldar, Jul 18 2025

A174059 a(n) = ceiling(Sum_{k=1..n} sqrt(k)).

Original entry on oeis.org

0, 1, 3, 5, 7, 9, 11, 14, 17, 20, 23, 26, 30, 33, 37, 41, 45, 49, 53, 58, 62, 67, 71, 76, 81, 86, 91, 96, 102, 107, 113, 118, 124, 130, 135, 141, 147, 153, 160, 166, 172, 179, 185, 192, 198, 205, 212, 219, 225, 232, 240, 247, 254, 261, 269, 276, 283, 291, 299, 306
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    map(ceil,ListTools:-PartialSums([seq((sqrt(k)),k=0..100)])); # Robert Israel, May 06 2019
  • Mathematica
    s=0;lst={};Do[s+=Sqrt[n];AppendTo[lst,Ceiling[s]],{n,0,6!}];lst
    Ceiling[Accumulate[Sqrt[Range[0,60]]]] (* Harvey P. Dale, Aug 29 2016 *)

Formula

a(n) = 2/3*n^(3/2) + 1/2*n^(1/2) + O(1). It appears that the absolute value of the difference is always less than 1. - Robert Israel, May 06 2019

Extensions

Offset corrected by Robert Israel, May 06 2019

A225154 Floor(Sum_{i=1..n} (Sum_{j=1..i} sqrt(1/j))).

Original entry on oeis.org

1, 2, 4, 7, 11, 14, 18, 23, 27, 32, 38, 43, 49, 55, 62, 68, 75, 82, 90, 97, 105, 113, 121, 130, 138, 147, 156, 166, 175, 185, 194, 204, 214, 225, 235, 246, 257, 267, 279, 290, 301, 313, 325, 336, 349, 361, 373, 385, 398
Offset: 1

Views

Author

Balarka Sen, Apr 30 2013

Keywords

Comments

The fact that a(n)/n diverges (it is greater than sqrt(n)) implies sum_{k>=1} 1/sqrt(k) is not Cesaro summable.

Crossrefs

Programs

  • PARI
    for(n=1,100,print1(floor(sum(i=1,n,sum(j=1,i,1/sqrt(j))))","))
    
  • PARI
    a(n)=sum(j=1,n,(n+1-j)/sqrt(j))\1 \\ Charles R Greathouse IV, May 02 2013

Formula

a(n) ~ 2*Sum_{k=1..n} sqrt(k) ~ (4/3) n^(3/2).

A338277 Greatest integer whose square root is less than or equal to Sum_{j=0..n} sqrt(j).

Original entry on oeis.org

0, 1, 5, 17, 37, 70, 117, 181, 265, 372, 504, 664, 855, 1079, 1339, 1637, 1977, 2361, 2791, 3271, 3802, 4388, 5032, 5735, 6501, 7333, 8232, 9202, 10245, 11364, 12562, 13841, 15204, 16654, 18193, 19824, 21549, 23372, 25295, 27321, 29451, 31690, 34040, 36502, 39081, 41778, 44597, 47539, 50609, 53807
Offset: 0

Views

Author

Robert G. Wilson v, Oct 21 2020

Keywords

Crossrefs

Cf. A025224.

Programs

  • Maple
    f:= n -> floor(add(sqrt(i),i=1..n)^2):
    map(f, [$0..100]); # Robert Israel, Oct 28 2020
  • Mathematica
    a[n_] := Floor[(Sum[ Sqrt[k], {k, 0, n}])^2]; Array[a, 50, 0]
  • PARI
    a(n) = floor(sum(j=0, n, sqrt(j))^2); \\ Michel Marcus, Oct 26 2020

Formula

a(n) ~ (4/9)*n^3 + (2/3)*n^2 + (4*zeta(-1/2)/3)*n^(3/2) + (11/36)*n + zeta(-1/2)*sqrt(n). - Robert Israel, Oct 28 2020

A352077 a(n) = floor( Sum_{k=1..n} k^(1/3) ).

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 8, 10, 12, 14, 16, 19, 21, 23, 26, 28, 31, 33, 36, 39, 41, 44, 47, 50, 53, 56, 58, 61, 65, 68, 71, 74, 77, 80, 83, 87, 90, 93, 97, 100, 104, 107, 110, 114, 117, 121, 125, 128, 132, 136, 139, 143, 147, 150, 154, 158, 162, 166, 170, 173, 177, 181, 185, 189, 193, 197
Offset: 0

Views

Author

Robert G. Wilson v, Mar 02 2022

Keywords

Examples

			a(6) = 8 because 1^(1/3) + 2^(1/3) + 3^(1/3) + 4^(1/3) + 5^(1/3) + 6^(1/3) = 8.81667... .
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Floor[ HarmonicNumber[n, -1/3]]; Array[ a, 66, 0]
  • PARI
    a(n) = floor(sum(k=0, n, k^(1/3))); \\ Michel Marcus, Mar 02 2022

A025199 a(n) = floor(floor(S2)/floor(S1)), where S2 and S1 are, respectively, the 2nd and first elementary symmetric functions of {sqrt(k), k = 1,2,...,n}.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 7, 8, 10, 11, 13, 15, 17, 18, 20, 23, 25, 27, 29, 31, 34, 36, 38, 41, 43, 46, 48, 51, 54, 57, 59, 62, 65, 68, 71, 74, 77, 80, 83, 86, 90, 93, 96, 99, 103, 106, 110, 113, 116, 120, 124, 127, 131, 135, 139, 142, 146, 150
Offset: 2

Views

Author

Keywords

Formula

a(n) = floor(A025193(n) / A025224(n)). - Sean A. Irvine, Aug 16 2019

Extensions

Title improved by Sean A. Irvine, Aug 16 2019

A025200 a(n) = floor(floor(S3)/floor(S1)), where S3 and S1 are, respectively, the 3rd and first elementary symmetric functions of {sqrt(k), k = 1,2,...,n}.

Original entry on oeis.org

0, 2, 5, 11, 18, 28, 42, 60, 82, 107, 140, 176, 218, 267, 324, 389, 455, 538, 622, 726, 830, 945, 1072, 1211, 1363, 1513, 1692, 1868, 2076, 2282, 2502, 2759, 3013, 3283, 3572, 3854, 4178, 4523, 4860, 5244, 5621, 6048, 6467, 6907, 7370, 7890, 8400, 8896, 9454, 10037, 10647, 11241, 11903, 12594, 13268, 13968
Offset: 2

Views

Author

Keywords

Crossrefs

Formula

a(n) = floor(A025194(n) / A025224(n)). - Sean A. Irvine, Aug 16 2019

Extensions

Title improved and more terms from Sean A. Irvine, Aug 16 2019
Showing 1-10 of 12 results. Next