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 19 results. Next

A025224 a(n) = floor(Sum_{k=1..n} sqrt(k)).

Original entry on oeis.org

0, 1, 2, 4, 6, 8, 10, 13, 16, 19, 22, 25, 29, 32, 36, 40, 44, 48, 52, 57, 61, 66, 70, 75, 80, 85, 90, 95, 101, 106, 112, 117, 123, 129, 134, 140, 146, 152, 159, 165, 171, 178, 184, 191, 197, 204, 211, 218, 224, 231, 239, 246, 253, 260, 268, 275, 282, 290, 298, 305, 313, 321, 329, 337
Offset: 0

Views

Author

Keywords

Comments

Shekatkar took Ramanujan's formula for sum of the square roots of first n natural numbers, and generalized to include r-th roots where r is any real number greater than 1, using simple properties of Riemann integrable functions. - Jonathan Vos Post, Apr 05 2012

Crossrefs

Programs

Formula

a(n) ~= floor ((4n + 3)sqrt(n)/6 - exp(-Pi / 2)). - Charles R Greathouse IV, Jul 29 2007. Corrected by Carl R. White, Jan 22 2009

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

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 48, 51, 54, 57, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 111, 114, 117, 120, 123, 126, 129, 132, 135, 138, 141, 144, 147, 150, 153, 156, 160
Offset: 0

Views

Author

Michel Tixier (tixier(AT)dyadel.net)

Keywords

References

  • K. H. Rosen, Discrete Mathematics and Its Application, 6th Edition, McGraw-Hill, 2007, Ex. 26 of section 2.4.

Crossrefs

Cf. A022554.

Programs

  • Mathematica
    Accumulate[Floor[Surd[Range[0,70],3]]] (* Harvey P. Dale, Nov 03 2013 *)
    Table[Sum[Floor[i^(1/3)], {i,0,n}], {n,0,50}] (* G. C. Greubel, Dec 22 2016 *)
  • PARI
    a(n) = sum(k=1, n, sqrtnint(k, 3)); \\ Michel Marcus, Mar 12 2016
    
  • PARI
    a(n)=my(t=sqrtnint(n,3)); t*(4*n-t^3-2*t^2-t+4)/4 \\ Charles R Greathouse IV, Aug 23 2017

Formula

a(0) = 0, a(1) = 1, a(n) = 2*a(n-1) - a(n-2) if n not a perfect cube, else a(n) = 2*a(n-1) - a(n-2) + 1 if n is a perfect cube.
a(n) = -1/4*floor(n^(1/3))*(floor(n^(1/3))^3+2*floor(n^(1/3))^2+floor(n^(1/3))-4*(n+1)). - John M. Campbell, Mar 22 2016
G.f.: Sum_{k>=1} x^(k^3)/(1 - x)^2. - Ilya Gutkovskiy, Dec 22 2016
a(n) = (3/4)*n^(4/3) + O(n). - Charles R Greathouse IV, Aug 23 2017

A230779 Numbers which are uniquely decomposable into a sum of two squares, the unique decomposition being with two distinct nonzero squares.

Original entry on oeis.org

5, 10, 13, 17, 20, 26, 29, 34, 37, 40, 41, 45, 52, 53, 58, 61, 68, 73, 74, 80, 82, 89, 90, 97, 101, 104, 106, 109, 113, 116, 117, 122, 136, 137, 146, 148, 149, 153, 157, 160, 164, 173, 178, 180, 181, 193, 194, 197, 202, 208, 212, 218, 226, 229, 232, 233, 234, 241, 244, 245, 257, 261, 269, 272
Offset: 1

Views

Author

Jean-Christophe Hervé, Nov 16 2013

Keywords

Comments

Numbers with exactly one prime factor of form 4*k+1, that must have multiplicity one, and no prime factor of the form 4*k+3 with odd multiplicity. There is thus no square in the sequence.
These are the primitive elements of A004431, the integers which are the sum of two nonzero distinct squares.
Numbers such that A004018(a(n)) = 8.
The square of these numbers is also uniquely decomposable into a sum of two squares, thus this sequence is a subsequence of A084645.
Also a subsequence of A191217: the two sequences are equal up to a(76) = 320, then A191217(77) = 325, the value which is missing from this sequence, as a(77) = 328 = A191217(78). (3125 is also missing from this sequence, although present in A191217, and it is the 31st such number). - Corrected by Antti Karttunen, May 14 2022.
Numbers n such that n^3 is the sum of two nonzero squares in exactly two ways. - Altug Alkan, Jul 01 2016
Sequence A125022 (numbers with a unique partition as the sum of 2 squares x^2 + y^2), but without any terms of A028982 (squares and twice squares) that might occur there. - Antti Karttunen, May 14 2022

Examples

			a(1) = 5 = 4+1, a(2) = 10 = 9+1, a(3) =  13 = 9+4. However 2 = 1+1, 4 = 4+0, 8 = 4+4 are excluded because the unique decomposition of these numbers in two squares is not with two distinct nonzero squares; 25, 50, 100 are also excluded because there are two decompositions of these numbers in two squares (including one with equal or zero squares).
		

Crossrefs

Cf. A001481, A004431, A002144, A028982, A353813 (characteristic function).
Subsequence of A004431, of A084645, of A125022, and of A191217.

Programs

  • PARI
    isok(n) = {f = factor(n); nb1 = 0; for (i=1, #f~, p = f[i, 1]; ep = f[i, 2]; if (p % 4 == 1, nb1 ++; if (ep != 1, return (0))); if (p % 4 == 3, if (ep % 2, return (0)));); return (nb1 == 1);} \\ Michel Marcus, Nov 17 2013

Formula

Terms are obtained by the products A125853(k)*A002144(p) for k, p > 0, ordered by increasing values.
{k | A004018(k) = 8}.

A174723 a(n) = n*(4*n^2 - 3*n + 5)/6.

Original entry on oeis.org

1, 5, 16, 38, 75, 131, 210, 316, 453, 625, 836, 1090, 1391, 1743, 2150, 2616, 3145, 3741, 4408, 5150, 5971, 6875, 7866, 8948, 10125, 11401, 12780, 14266, 15863, 17575, 19406, 21360, 23441, 25653, 28000, 30486, 33115, 35891, 38818, 41900, 45141
Offset: 1

Views

Author

Michel Lagneau, Mar 28 2010

Keywords

Comments

We prove that a(n) = Sum_{k=1..n^2} floor(sqrt(k)): a(n) = Sum_{k=1..3} 1 + Sum_{k=4..8} 2 + ... + Sum_{k=(n-1)^2..n^2 - 1} (n-1) + n = 3*1 + 5*2 + 7*3 + ... + (2n-1)(n-1)+ n = Sum_{k=1..n} (2k-1)*(k-1) + n = 2*Sum_{k=1..n} k^2 - 3*Sum_{k=1..n} k + 2n = 2n(n+1)(2n+1)/6 - 3n(n+1)/2 + 2n = n*(4n^2 - 3n + 5) / 6.
Notice that a(4) = 4 + 3*5 + 2*6 + 1*7 and a(8) = 8 + 7*9 + 6*10 + 5*11 + 4*12 + 3*13 + 2*14 + 1*15. In general, a(n) = n + Sum_{k=1..n-1} (n-k)*(n+k). - J. M. Bergot, Jul 31 2013

Examples

			From _Bruno Berselli_, Feb 17 2015: (Start)
Third differences:  1, 2,  4,  4,   4,   4,   4, (repeat 4) ... (A151798)
Second differences: 1, 3,  7, 11,  15,  19,  23,  27,   31, ... (A131098)
First differences:  1, 4, 11, 22,  37,  56,  79, 106,  137, ... (A084849)
-------------------------------------------------------------------------
This sequence:      1, 5, 16, 38,  75, 131, 210, 316,  453, ...
-------------------------------------------------------------------------
Partial sums:       1, 6, 22, 60, 135, 266, 476, 792, 1245, ... (A071239)
(End)
		

References

  • T. M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 3rd ed., Oxford Univ. Press, 1954.

Crossrefs

Programs

  • Magma
    I:=[1, 5, 16, 38]; [n le 4 select I[n] else 4*Self(n-1)-6*Self(n-2)+4*Self(n-3)-Self(n-4): n in [1..50]]; // Vincenzo Librandi, Jul 04 2012
    
  • Maple
    A174723 := proc(n)
            n*(4*n^2-3*n+5)/6 ;
    end proc:
    seq( A174723(n),n=1..20) ; # R. J. Mathar, Nov 07 2011
  • Mathematica
    Table[n (4n^2-3n+5)/6,{n,50}] (* or *) LinearRecurrence[{4,-6,4,-1},{1,5,16,38},50] (* Harvey P. Dale, Jan 16 2012 *)
  • PARI
    a(n)=n*(4*n^2-3*n+5)/6 \\ Charles R Greathouse IV, Oct 07 2015

Formula

G.f. x*(1 + x + 2*x^2) / (x-1)^4. - R. J. Mathar, Nov 07 2011
a(1)=1, a(2)=5, a(3)=16, a(4)=38; for n > 4, a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Harvey P. Dale, Jan 16 2012
a(n) = A022554(n^2). - Ridouane Oudra, Jun 13 2025

A032512 Sum of the integer part of 4th roots of integers <= n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119
Offset: 0

Views

Author

Michel Tixier (tixier(AT)dyadel.net)

Keywords

Crossrefs

Partial sums of A255270.

Programs

  • Mathematica
    Accumulate[Floor[Surd[Range[0,70],4]]] (* Harvey P. Dale, Dec 14 2024 *)
  • PARI
    a(n) = sum(k=1, n, sqrtnint(k, 4)); \\ Michel Marcus, Mar 12 2016

Formula

G.f.: Sum_{k>=1} x^(k^4)/(1 - x)^2. - Ilya Gutkovskiy, Dec 22 2016
a(n) = -(1/30) * floor(n^(1/4)) * (-31 - 30 * n + 10 * floor(n^(1/4))^2 + 15 * floor(n^(1/4))^3 + 6 * floor(n^(1/4))^4). - Pooya Farshim, Sep 28 2024

Extensions

NAME adapted to offset. - Giovanni Resta, May 08 2020

A032513 Sum of the integer part of 5th roots of positive integers less than or equal to n.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107
Offset: 0

Views

Author

Michel Tixier (tixier(AT)dyadel.net)

Keywords

Crossrefs

Partial sums of A178487.

Programs

  • Mathematica
    Accumulate[Floor[Surd[Range[0,70],5]]] (* Harvey P. Dale, Jan 21 2019 *)
  • PARI
    a(n) = sum(k=1, n, sqrtnint(k, 5)); \\ Michel Marcus, Mar 12 2016

Formula

G.f.: Sum_{k>=1} x^(k^5)/(1 - x)^2. - Ilya Gutkovskiy, Dec 22 2016
a(n) = -(1/12) * floor(n^(1/5)) * (-12 - 12*n - floor(n^(1/5)) + 5*floor(n^(1/5))^3 + 6*floor(n^(1/5))^4 + 2*floor(n^(1/5))^5). - Pooya Farshim, Sep 28 2024

A174060 a(n) = Sum_{k=0..n} floor(sqrt(k))^2.

Original entry on oeis.org

0, 1, 2, 3, 7, 11, 15, 19, 23, 32, 41, 50, 59, 68, 77, 86, 102, 118, 134, 150, 166, 182, 198, 214, 230, 255, 280, 305, 330, 355, 380, 405, 430, 455, 480, 505, 541, 577, 613, 649, 685, 721, 757, 793, 829, 865, 901, 937, 973, 1022, 1071, 1120, 1169, 1218, 1267, 1316
Offset: 0

Views

Author

Keywords

Comments

Partial sums of A048760. - R. J. Mathar, Mar 31 2010

Crossrefs

Cf. A022554 (1st), this sequence (2nd), A363497 (3rd).
Cf. A363498 (4th), A363499 (5th), A048760.

Programs

Formula

a(n) = (1/6)*m*(6*m*n - (m+1)*(3*m^2+m-1)) with m = floor(sqrt(n)). - Yalcin Aktar, Jan 30 2012

A268173 a(n) = Sum_{k=0..n} (-1)^k*floor(sqrt(k)).

Original entry on oeis.org

0, -1, 0, -1, 1, -1, 1, -1, 1, -2, 1, -2, 1, -2, 1, -2, 2, -2, 2, -2, 2, -2, 2, -2, 2, -3, 2, -3, 2, -3, 2, -3, 2, -3, 2, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -3, 3, -4, 3, -4, 3, -4, 3, -4, 3, -4, 3, -4, 3, -4, 3, -4, 4, -4, 4, -4, 4, -4, 4, -4, 4, -4, 4, -4, 4, -4, 4, -4, 4
Offset: 0

Views

Author

John M. Campbell, Jan 28 2016

Keywords

Examples

			a(5) = -1 = floor(sqrt(0)) - floor(sqrt(1)) + floor(sqrt(2)) - floor(sqrt(3)) + floor(sqrt(4)) - floor(sqrt(5)).
		

Crossrefs

Programs

  • Maple
    seq(add((-1)^k*floor(sqrt(k)), k=0..n), n=0..80); # Ridouane Oudra, Jan 21 2024
  • Mathematica
    Table[Sum[(-1)^k Floor[Sqrt@ k], {k, 0, n}], {n, 0, 50}] (* Michael De Vlieger, Mar 15 2016 *)
  • PARI
    a(n) = sum(k=0, n, (-1)^k*sqrtint(k)); \\ Michel Marcus, Jan 28 2016
    
  • PARI
    a(n) = sqrtint(n)*(-1)^n/2-((-1)^(sqrtint(n)+1)+1)/4; \\ John M. Campbell, Mar 15 2016

Formula

a(n) = floor(sqrt(n))*(-1)^n/2 - ((-1)^(floor(sqrt(n))+1)+1)/4.
a(n) = (-1)^n * Sum_{i=1..ceiling(n/2)} c(n+2-2*i), where c is the square characteristic (A010052). - Wesley Ivan Hurt, Nov 26 2020
From Ridouane Oudra, Jan 21 2024: (Start)
a(n) = (-1)^n*floor((sqrt(n) + (n mod 2))/2);
a(2*n) = floor(sqrt(n/2));
a(2*n+1) = -floor(sqrt((n+1)/2) + 1/2). (End)

Extensions

Terms a(55) and beyond from Andrew Howroyd, Mar 02 2020

A363497 a(n) = Sum_{k=0..n} floor(sqrt(k))^3.

Original entry on oeis.org

0, 1, 2, 3, 11, 19, 27, 35, 43, 70, 97, 124, 151, 178, 205, 232, 296, 360, 424, 488, 552, 616, 680, 744, 808, 933, 1058, 1183, 1308, 1433, 1558, 1683, 1808, 1933, 2058, 2183, 2399, 2615, 2831, 3047, 3263, 3479, 3695, 3911, 4127, 4343, 4559, 4775, 4991, 5334
Offset: 0

Views

Author

Hans J. H. Tuenter, Jun 05 2023

Keywords

Comments

Partial sums of the third powers of the terms of A000196.

Crossrefs

Sums of powers of A000196: A022554 (1st), A174060 (2nd), this sequence (3rd), A363498 (4th), A363499 (5th).

Programs

  • Mathematica
    Table[(n + 1) #^3 - (1/60) # (# + 1) (3 # - 1) (12 #^2 + 7 # - 4) &[Floor@ Sqrt[n]], {n, 0, 50}] (* Michael De Vlieger, Jun 10 2023 *)
  • PARI
    a(n) = sum(k=0, n, sqrtint(k)^3); \\ Michel Marcus, Jun 06 2023
    
  • Python
    from math import isqrt
    A363497 = [0]
    for n in range(1,50): A363497.append(A363497[-1] + isqrt(n)**3)
    print(A363497) # Karl-Heinz Hofmann, Jun 14 2023
    
  • Python
    from math import isqrt
    def A363497(n):return (m:=isqrt(n))**3*(n+1)-(m*(m+1)*(3*m-1)*(12*m**2+7*m-4))//60
    # Karl-Heinz Hofmann, Jun 14 2023

Formula

a(n) = (n+1)*m^3 - (1/60)*m*(m+1)*(3*m-1)*(12*m^2+7*m-4), where m = floor(sqrt(n)).

A363498 a(n) = Sum_{k=0..n} floor(sqrt(k))^4.

Original entry on oeis.org

0, 1, 2, 3, 19, 35, 51, 67, 83, 164, 245, 326, 407, 488, 569, 650, 906, 1162, 1418, 1674, 1930, 2186, 2442, 2698, 2954, 3579, 4204, 4829, 5454, 6079, 6704, 7329, 7954, 8579, 9204, 9829, 11125, 12421, 13717, 15013, 16309, 17605, 18901, 20197, 21493, 22789
Offset: 0

Views

Author

Hans J. H. Tuenter, Jun 05 2023

Keywords

Comments

Partial sums of the fourth powers of the terms of A000196.

Crossrefs

Sums of powers of A000196: A022554 (1st), A174060 (2nd), A363497 (3rd), this sequence (4th), A363499 (5th).

Programs

  • Mathematica
    Table[(n + 1) #^4 - (1/30) # (# + 1)*(20 #^4 + 4 #^3 - 14 #^2 + 4 # + 1) &[Floor@ Sqrt[n]], {n, 0, 45}] (* Michael De Vlieger, Jun 10 2023 *)
  • Python
    from math import isqrt
    def A363498(n):
        return (m:=isqrt(n))**4 *(n+1) - (m*(m+1)*(20*m**4+4*m**3-14*m**2+4*m+1))//30
    print([A363498(n) for n in range(0,46)]) # Karl-Heinz Hofmann, Jul 15 2023

Formula

a(n) = (n+1)*m^4 - (1/30)*m*(m+1)*(20*m^4+4*m^3-14*m^2+4*m+1), where m = floor(sqrt(n)).
Showing 1-10 of 19 results. Next