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.

Previous Showing 11-20 of 54 results. Next

A065730 Largest square <= n-th prime.

Original entry on oeis.org

1, 1, 4, 4, 9, 9, 16, 16, 16, 25, 25, 36, 36, 36, 36, 49, 49, 49, 64, 64, 64, 64, 81, 81, 81, 100, 100, 100, 100, 100, 121, 121, 121, 121, 144, 144, 144, 144, 144, 169, 169, 169, 169, 169, 196, 196, 196, 196, 225, 225, 225, 225, 225, 225, 256, 256, 256, 256, 256
Offset: 1

Views

Author

Labos Elemer, Nov 15 2001

Keywords

Comments

For n > 2: a(n) = A257053(n,0). - Reinhard Zumkeller, Apr 15 2015

Crossrefs

Programs

Formula

a(n) = A048760(A000040(n)).

A065741 Largest square <= sum of squares of divisors of n.

Original entry on oeis.org

1, 4, 9, 16, 25, 49, 49, 81, 81, 121, 121, 196, 169, 225, 256, 324, 289, 441, 361, 529, 484, 576, 529, 841, 625, 841, 784, 1024, 841, 1296, 961, 1296, 1156, 1444, 1296, 1849, 1369, 1764, 1681, 2209, 1681, 2500, 1849, 2500, 2304, 2601, 2209, 3364, 2401
Offset: 1

Views

Author

Labos Elemer, Nov 15 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Floor[Sqrt[DivisorSigma[2, w]]//N]^2, {w, 1, 100}]
  • PARI
    a(n) = { sqrtint(sigma(n,2))^2 } \\ Harry J. Smith, Oct 29 2009

Formula

a(n) = A048760(A001157(n)).

A260740 a(n) = n minus the number of positive squares needed to sum to n using the greedy algorithm: a(n) = n - A053610(n).

Original entry on oeis.org

0, 0, 0, 0, 3, 3, 3, 3, 6, 8, 8, 8, 8, 11, 11, 11, 15, 15, 15, 15, 18, 18, 18, 18, 21, 24, 24, 24, 24, 27, 27, 27, 27, 30, 32, 32, 35, 35, 35, 35, 38, 38, 38, 38, 41, 43, 43, 43, 43, 48, 48, 48, 48, 51, 51, 51, 51, 54, 56, 56, 56, 56, 59, 59, 63, 63, 63, 63, 66, 66, 66, 66, 69, 71, 71, 71, 71, 74, 74, 74, 78, 80
Offset: 0

Views

Author

Antti Karttunen, Aug 12 2015

Keywords

Crossrefs

Formula

a(n) = n - A053610(n).
As a recurrence:
a(0) = 0; for n >= 1, a(n) = -1 + A048760(n) + a(n-A048760(n)). [Where A048760(n) gives the largest square <= n.]
Other identities. For all n >= 1:
a(n) = A255131(n) - A062535(n).

A060984 a(1) = 1; a(n+1) = a(n) + (largest square <= a(n)).

Original entry on oeis.org

1, 2, 3, 4, 8, 12, 21, 37, 73, 137, 258, 514, 998, 1959, 3895, 7739, 15308, 30437, 60713, 121229, 242333, 484397, 967422, 1933711, 3865811, 7730967, 15459367, 30912128, 61814609, 123625653, 247235577, 494448306, 988888002, 1977738918, 3955408759, 7910812423
Offset: 1

Views

Author

R. K. Guy, May 11 2001

Keywords

Comments

Arises in analyzing "put-or-take" games (see Winning Ways, 484-486, 501-503), the prototype being Epstein's Put-or-Take-a-Square game.

References

  • E. R. Berlekamp, J. H. Conway and R. K. Guy, Winning Ways, Academic Press, NY, 2 vols., 1982.
  • R. K. Guy, Unsolved Problems in Number Theory, Springer, 1st edition, 1981. See section E26.

Crossrefs

Programs

  • Haskell
    a060984 n = a060984_list !! (n-1)
    a060984_list = iterate (\x -> x + a048760 x) 1
    -- Reinhard Zumkeller, Dec 24 2013
    
  • Mathematica
    a[1] = 1; a[n_] := a[n] = a[n - 1] + Floor[ Sqrt[ a[n - 1] ] ]^2; Table[ a[n], {n, 1, 40} ]
    RecurrenceTable[{a[1]==1,a[n]==a[n-1]+Floor[Sqrt[a[n-1]]]^2},a,{n,40}] (* Harvey P. Dale, Nov 19 2011 *)
    NestList[#+Floor[Sqrt[#]]^2&,1,40] (* Harvey P. Dale, Jan 22 2013 *)
  • PARI
    { default(realprecision, 100); for (n=1, 500, if (n==1, a=1, a+=floor(sqrt(a))^2); write("b060984.txt", n, " ", a); ) } \\ Harry J. Smith, Jul 15 2009
    
  • Python
    from sympy import integer_nthroot
    A060984_list = [1]
    for i in range(10**3): A060984_list.append(A060984_list[-1]+integer_nthroot(A060984_list[-1],2)[0]**2) # Chai Wah Wu, Apr 02 2021
    
  • Python
    from math import isqrt
    from itertools import accumulate
    def f(an, _): return an + isqrt(an)**2
    print(list(accumulate([1]*36, f))) # Michael S. Branicky, Apr 02 2021

Formula

a(n+1) = a(n)+[sqrt(a(n))]^2 = a(n)+A061886(n) = a(n)+A048760(a(n)) = A061887(a(n)). - Henry Bottomley, May 12 2001
a(n) ~ c * 2^n, where c = 0.11511532187216693... (see A237888). - Vaclav Kotesovec, Feb 15 2014

Extensions

More terms from David W. Wilson, Henry Bottomley and Robert G. Wilson v, May 12 2001

A154333 Difference between n^3 and the next smaller square.

Original entry on oeis.org

1, 4, 2, 15, 4, 20, 19, 28, 53, 39, 35, 47, 81, 40, 11, 127, 13, 56, 135, 79, 45, 39, 67, 135, 249, 152, 83, 48, 53, 104, 207, 7, 216, 100, 26, 431, 28, 116, 270, 496, 277, 104, 546, 503, 524, 615, 139, 368, 685, 391, 155, 732, 652, 648, 726, 55, 293, 631, 170, 704, 405
Offset: 1

Views

Author

M. F. Hasler, Jan 07 2009

Keywords

Comments

The sequence A077116(n) = n^3-[sqrt(n^3)]^2 satisfies A077116(n)=0 <=> n^3 is a square <=> n is a square. It differs from the present sequence (which is always positive) only in these indices, where a(k^2)=2k^3-1.

Crossrefs

Cf. A087285 (range of this sequence, excluding the initial term 1).

Programs

  • Maple
    A154333 := proc(n)
        A071797(n^3) ;
    end proc: # R. J. Mathar, May 29 2016
  • Mathematica
    nss[n_]:=Module[{n3=n^3,s},s=Floor[Sqrt[n3]]^2;If[s==n3,s=(Sqrt[s]- 1)^2, s]]; Table[n^3-nss[n],{n,70}] (* Harvey P. Dale, Jan 19 2017 *)
  • PARI
    A154333(n) = n^3-sqrtint(n^3-1)^2
    a154333 = vector(90,n,n^3-sqrtint(n^3-1)^2)

Formula

a(n) = n^3 - [sqrt(n^3 - 1)]^2 = A000578(n) - A048760(n^3-1). a(k^2) = 2 k^3 - 1.
a(n) = A071797(n^3). - R. J. Mathar, May 29 2016

A202304 a(n) = floor(sqrt(3*n)).

Original entry on oeis.org

0, 1, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14
Offset: 0

Views

Author

Vincenzo Librandi, Jan 17 2012

Keywords

Crossrefs

Programs

  • Magma
    [Isqrt(3*n) : n in [0..80]];
    
  • Mathematica
    Table[Floor[Sqrt[3n]],{n,0,80}]
  • PARI
    a(n)=sqrtint(3*n) \\ Charles R Greathouse IV, Jan 17 2012

Formula

a(n) = A000196(3n), a(n)^2 = A048760(3n). - Bruno Berselli, Jan 18 2012

A005240 P-positions in Epstein's Put or Take a Square game.

Original entry on oeis.org

0, 5, 20, 29, 45, 80, 101, 116, 135, 145, 165, 173, 236, 257, 397, 404, 445, 477, 540, 565, 580, 585, 629, 666, 836, 845, 885, 909, 944, 949, 954, 975, 1125, 1177
Offset: 1

Views

Author

Keywords

Comments

The game is played with two players alternatingly removing or adding chips on a heap. If C denotes the number of chips on the heap, a player must either put or take the largest possible square number of chips in his move, C -> C +- A048760(C). The player capable of taking all chips wins. The P positions are numbers of chips where the player to draw first will lose (assuming the opponent has a full analysis of the game). - R. J. Mathar, May 06 2016

Examples

			5 is a term because either putting 4 or taking 4 leads to squares (9 or 1) and the opponent wins by taking.
20 is a term because either putting 16 or taking 16 leads to squares (36 or 4) and the opponent wins by taking.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, E26.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A056893 Smallest prime with square excess of n.

Original entry on oeis.org

2, 3, 7, 13, 41, 31, 23, 89, 73, 59, 47, 61, 113, 239, 79, 97, 593, 139, 163, 461, 277, 191, 167, 193, 281, 251, 223, 317, 353, 991, 431, 761, 433, 563, 359, 397, 521, 479, 439, 569, 617, 571, 619, 773, 829, 887, 947, 673, 1493, 1571, 727, 1013, 953, 1279
Offset: 1

Views

Author

Henry Bottomley, Jul 05 2000

Keywords

Examples

			a(4)=13 since 13=3^2+4, while 2, 3, 5, 7 and 11 have square excesses of 1, 2, 1, 3 and 3 respectively.
		

Crossrefs

Programs

  • Maple
    A056893 := proc(n)
        local p ;
        p :=2 ;
        while A053186(p) <> n do
            p := nextprime(p) ;
        end do:
        return p ;
    end proc: # R. J. Mathar, Jul 28 2013
  • PARI
    A056893(n)={
        local(p=2) ;
        while( A053186(p)!=n,
            p=nextprime(p+1)
        ) ;
        return(p)
    } /* R. J. Mathar, Jul 28 2013 */

Formula

a(n) =n+A056894(n).
a(n) = min{p in A000040: A053186(p) = n}. - R. J. Mathar, Jul 28 2013

A066857 Smallest number k such that n! - k is a square.

Original entry on oeis.org

0, 1, 2, 8, 20, 44, 140, 320, 476, 3584, 12311, 4604, 74879, 414119, 2071775, 5703551, 11551671, 45680444, 442548224, 1960632176, 2657058876, 24923993276, 130518272975, 1478154932316, 5446454455004, 38610655379975
Offset: 1

Views

Author

Reinhard Zumkeller, Jan 21 2002

Keywords

Comments

Sequence is not monotonic: a(n) < a(n-1) for n = 12, 71, 90, 143, 145, 151, 172, 218, 257. - Zak Seidov, Jun 25 2013

Examples

			a(10) = 3628800 - 1904 * 1904 = 3628800 - 3625216 = 3584.
		

Crossrefs

Cf. A068869.

Programs

  • Mathematica
    Table[n! - Floor[Sqrt[n! ]]^2, {n, 1, 27}]
  • PARI
    a(n)=my(N=n!); N-sqrtint(N)^2 \\ Charles R Greathouse IV, Jun 25 2013

Formula

a(n) = A053186(n!) = n!-A048760(n!) = n!-floor(sqrt(n!))^2 = n!-A055226(n)^2.

Extensions

More terms from Vladeta Jovovic, Mar 21 2002
Edited by Robert G. Wilson v and N. J. A. Sloane, Mar 22 2002

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
Previous Showing 11-20 of 54 results. Next