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

A185543 Numbers not of the form floor(k^(3/2)); complement of A000093.

Original entry on oeis.org

3, 4, 6, 7, 9, 10, 12, 13, 15, 16, 17, 19, 20, 21, 23, 24, 25, 26, 28, 29, 30, 32, 33, 34, 35, 37, 38, 39, 40, 42, 43, 44, 45, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 77, 78, 79, 80, 81, 83, 84, 85, 86, 87, 88, 90
Offset: 1

Views

Author

Clark Kimberling, Jan 30 2011

Keywords

Crossrefs

Cf. A000093.

Programs

  • Mathematica
    f[n_]=Floor[n^(3/2)]
    t1=Table[f[n],{n,1,80}];t1  (* A000093 *)
    t2=Complement[Range[200], Table[f[n],{n,1,80}]];t2  (* A185543 *)
  • Python
    def A185543(n):
        def f(x): return n-1+(a:=integer_nthroot((x+1)**2,3))[0]+(a[1]^1)
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m # Chai Wah Wu, Sep 10 2024

A216155 Numbers n such that floor(sqrt(n + n^3)) = 1 + floor(sqrt(n^3)) = 1 + A000093(n).

Original entry on oeis.org

2, 13, 40, 43, 46, 52, 109, 152, 190, 243, 336, 351, 356, 366, 422, 584, 592, 741, 937, 978, 1011, 1040, 1137, 1330, 1355, 1362, 1376, 1398, 1434, 2063, 2320, 2520, 2553, 2660, 2665, 2928, 2940, 2993, 3067, 3075, 3092, 3296, 3532, 3631, 3703, 3712, 3730
Offset: 1

Views

Author

Zak Seidov, Sep 02 2012

Keywords

Comments

The sequence is infinite. For values of n not in the sequence we have floor(sqrt(n+n^3)) = floor(sqrt(n^3)) = A000093(n).

Crossrefs

Cf. A000093 (floor(n^(3/2))).
Cf. A000196, A000578, A034262, A247628 (subsequence).

Programs

  • Haskell
    a216155 n = a216155_list !! (n-1)
    a216155_list = filter
       (\x -> a000196 (a034262 x) == a000196 (a000578 x) + 1) [1..]
    -- Reinhard Zumkeller, Sep 26 2014
  • Mathematica
    Select[Range[10000], Floor[Sqrt[# + #^3]] - Floor[Sqrt[#^3]] == 1 &]

A000161 Number of partitions of n into 2 squares.

Original entry on oeis.org

1, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 2, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 2, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 2, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 2, 1, 0, 0, 1, 0, 1, 0
Offset: 0

Views

Author

Keywords

Comments

Number of ways of writing n as a sum of 2 (possibly zero) squares when order does not matter.
Number of similar sublattices of square lattice with index n.
Let Pk = the number of partitions of n into k nonzero squares. Then we have A000161 = P0 + P1 + P2, A002635 = P0 + P1 + P2 + P3 + P4, A010052 = P1, A025426 = P2, A025427 = P3, A025428 = P4. - Charles R Greathouse IV, Mar 08 2010, amended by M. F. Hasler, Jan 25 2013
a(A022544(n))=0; a(A001481(n))>0; a(A125022(n))=1; a(A118882(n))>1. - Reinhard Zumkeller, Aug 16 2011

Examples

			25 = 3^2+4^2 = 5^2, so a(25) = 2.
		

References

  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 339

Crossrefs

Equivalent sequences for other numbers of squares: A010052 (1), A000164 (3), A002635 (4), A000174 (5).

Programs

  • Haskell
    a000161 n =
       sum $ map (a010052 . (n -)) $ takeWhile (<= n `div` 2) a000290_list
    a000161_list = map a000161 [0..]
    -- Reinhard Zumkeller, Aug 16 2011
    
  • Maple
    A000161 := proc(n) local i,j,ans; ans := 0; for i from 0 to n do for j from i to n do if i^2+j^2=n then ans := ans+1 fi od od; RETURN(ans); end; [ seq(A000161(i), i=0..50) ];
    A000161 := n -> nops( numtheory[sum2sqr](n) ); # M. F. Hasler, Nov 23 2007
  • Mathematica
    Length[PowersRepresentations[ #,2,2]] &/@Range[0,150] (* Ant King, Oct 05 2010 *)
  • PARI
    a(n)=sum(i=0,n,sum(j=0,i,if(i^2+j^2-n,0,1))) \\ for illustrative purpose
    
  • PARI
    A000161(n)=sum(k=sqrtint((n-1)\2)+1,sqrtint(n),issquare(n-k^2)) \\ Charles R Greathouse IV, Mar 21 2014, improves earlier code by M. F. Hasler, Nov 23 2007
    
  • PARI
    A000161(n)=#sum2sqr(n) \\ See A133388 for sum2sqr(). - M. F. Hasler, May 13 2018
    
  • Python
    from math import prod
    from sympy import factorint
    def A000161(n):
        f = factorint(n)
        return int(not any(e&1 for e in f.values())) + (((m:=prod(1 if p==2 else (e+1 if p&3==1 else (e+1)&1) for p, e in f.items()))+((((~n & n-1).bit_length()&1)<<1)-1 if m&1 else 0))>>1) if n else 1 # Chai Wah Wu, Sep 08 2022

Formula

a(n) = card { { a,b } c N | a^2+b^2 = n }. - M. F. Hasler, Nov 23 2007
Let f(n)= the number of divisors of n that are congruent to 1 modulo 4 minus the number of its divisors that are congruent to 3 modulo 4, and define delta(n) to be 1 if n is a perfect square and 0 otherwise. Then a(n)=1/2 (f(n)+delta(n)+delta(1/2 n)). - Ant King, Oct 05 2010

A094683 Juggler sequence: if n mod 2 = 0 then floor(sqrt(n)) else floor(n^(3/2)).

Original entry on oeis.org

0, 1, 1, 5, 2, 11, 2, 18, 2, 27, 3, 36, 3, 46, 3, 58, 4, 70, 4, 82, 4, 96, 4, 110, 4, 125, 5, 140, 5, 156, 5, 172, 5, 189, 5, 207, 6, 225, 6, 243, 6, 262, 6, 281, 6, 301, 6, 322, 6, 343, 7, 364, 7, 385, 7, 407, 7, 430, 7, 453, 7, 476, 7, 500, 8, 524, 8, 548, 8, 573, 8, 598, 8, 623, 8, 649
Offset: 0

Views

Author

N. J. A. Sloane, Jun 09 2004

Keywords

Comments

Interspersion of A000093 and A000196. - Michel Marcus, Nov 11 2013

References

  • C. Pickover, Computers and the Imagination, St. Martin's Press, NY, 1991, p. 233.

Crossrefs

Programs

  • Maple
    A094683 :=proc(n) if n mod 2 = 0 then RETURN(floor(sqrt(n))) else RETURN(floor(n^(3/2))); end if; end proc;
  • Mathematica
    Table[If[EvenQ[n], Floor[Sqrt[n]], Floor[n^(3/2)]], {n, 0, 100}] (* Indranil Ghosh, Apr 07 2017 *)
  • PARI
    a(n) = if(n%2,sqrtint(n^3), sqrtint(n)); \\ Indranil Ghosh, Apr 08 2017
    
  • Python
    import math
    from sympy import sqrt
    def a(n): return int(math.floor(sqrt(n))) if n%2 == 0 else int(math.floor(n**(3/2)))
    print([a(n) for n in range(51)]) # Indranil Ghosh, Apr 08 2017
    
  • Python
    from math import isqrt
    def A094683(n): return isqrt(n**3 if n % 2 else n) # Chai Wah Wu, Feb 18 2022

A065733 Largest square <= n^3.

Original entry on oeis.org

0, 1, 4, 25, 64, 121, 196, 324, 484, 729, 961, 1296, 1681, 2116, 2704, 3364, 4096, 4900, 5776, 6724, 7921, 9216, 10609, 12100, 13689, 15625, 17424, 19600, 21904, 24336, 26896, 29584, 32761, 35721, 39204, 42849, 46656, 50625, 54756, 59049, 63504
Offset: 0

Views

Author

Labos Elemer, Nov 15 2001

Keywords

Examples

			a(10) = 961, as 961 = 31^2 is the largest square <= 1000 = 10^3.
		

Crossrefs

Programs

  • Haskell
    a065733 n = head [x | x <- reverse [0.. n^3], a010052 x == 1] -- Reinhard Zumkeller, Oct 10 2013
  • Mathematica
    Table[Floor[Sqrt[w^3]//N]^2, {w, 1, 50}]
  • PARI
    A065733(n)=sqrtint(n^3)^2  \\ M. F. Hasler, Oct 05 2013
    

Formula

a(n) + A077116(n) = n^3.
a(n) = A048760(n^3).
n^3 - 2*n^(3/2) <= a(n) <= n^3. - Charles R Greathouse IV, Dec 05 2022
a(n) = A000093(n)^2. - Amiram Eldar, Jul 14 2024

A077121 Number of integer squares <= n^3.

Original entry on oeis.org

1, 2, 3, 6, 9, 12, 15, 19, 23, 28, 32, 37, 42, 47, 53, 59, 65, 71, 77, 83, 90, 97, 104, 111, 118, 126, 133, 141, 149, 157, 165, 173, 182, 190, 199, 208, 217, 226, 235, 244, 253, 263, 273, 282, 292, 302, 312, 323, 333, 344, 354, 365, 375, 386, 397, 408, 420
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 29 2002

Keywords

Comments

a(n) = number of terms in n-th row of A167222. - Reinhard Zumkeller, Oct 31 2009

Examples

			Squares <= 3^3 = 27: 0, 1, 4, 9, 16 and 25, hence a(3) = 6.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Floor[Sqrt[n^3]] + 1; Array[a, 100, 0] (* Amiram Eldar, Apr 06 2025 *)
  • Python
    from math import isqrt
    def A077121(n): return isqrt(n**3)+1 # Chai Wah Wu, Sep 08 2024

Formula

a(n) = floor(n^(3/2))+1 = A000093(n) + 1.

A155013 Integer part of square root of n^5 = A000584(n).

Original entry on oeis.org

1, 5, 15, 32, 55, 88, 129, 181, 243, 316, 401, 498, 609, 733, 871, 1024, 1191, 1374, 1573, 1788, 2020, 2270, 2536, 2821, 3125, 3446, 3787, 4148, 4528, 4929, 5350, 5792, 6255, 6740, 7247, 7776, 8327, 8901, 9498, 10119, 10763, 11432, 12124, 12841, 13584, 14351
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A000093.
Integer part of square root of n^k: A000196 (k=1), A000093 (k=3), this sequence (k=5), A155014 (k=7), A155015 (k=11), A155016 (k=13), A155018 (k=15), A155019 (k=17),

Programs

  • Magma
    [Floor(Sqrt(n^5)): n in [1..30]]; // G. C. Greubel, Dec 30 2017
    
  • Mathematica
    a={};Do[AppendTo[a,IntegerPart[(n^5)^(1/2)]],{n,5!}];a
    IntegerPart[Sqrt[Range[50]^5]] (* Harvey P. Dale, May 14 2012 *)
    Table[Floor[Sqrt[n^5]], {n,1,30}] (* G. C. Greubel, Dec 30 2017 *)
  • PARI
    for(n=1,30, print1(sqrtint(n^5), ", ")) \\ G. C. Greubel, Dec 30 2017
    
  • Python
    from math import isqrt
    def A155013(n): return isqrt(n**5) # Chai Wah Wu, Aug 08 2025

Formula

a(n) = floor(n^2 * sqrt(n)). - Davide Rotondo, Dec 01 2024

A002821 a(n) = nearest integer to n^(3/2).

Original entry on oeis.org

0, 1, 3, 5, 8, 11, 15, 19, 23, 27, 32, 36, 42, 47, 52, 58, 64, 70, 76, 83, 89, 96, 103, 110, 118, 125, 133, 140, 148, 156, 164, 173, 181, 190, 198, 207, 216, 225, 234, 244, 253, 263, 272, 282, 292, 302, 312, 322, 333, 343, 354, 364, 375, 386, 397
Offset: 0

Views

Author

Keywords

References

  • M. Boll, Tables Numériques Universelles. Dunod, Paris, 1947, p. 46.
  • M. Hall, Jr., The Diophantine equation x^3-y^2=k, pp. 173-198 of A. O. L. Atkin and B. J. Birch, editors, Computers in Number Theory. Academic Press, NY, 1971.
  • A. V. Lebedev and R. M. Fedorova, A Guide to Mathematical Tables. Pergamon, Oxford, 1960, p. 17.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    a002821 = round . sqrt . fromIntegral . (^ 3)
    -- Reinhard Zumkeller, Jul 11 2014
    
  • Maple
    A002821 := proc(n)
        round(n^(3/2)) ;
    end proc:
    seq(A002821(n),n=0..100) ;
  • Mathematica
    t[n_]:=Module[{flt=Floor[n],cet=Ceiling[n]},If[n-fltHarvey P. Dale, May 12 2011 *)
  • Python
    from math import isqrt
    def A002821(n): return (m:=isqrt(k:=n**3))+int((k-m*(m+1)<<2)>=1) # Chai Wah Wu, Jul 30 2022

Formula

a(n) = floor(n^(3/2) + 1/2). - Ridouane Oudra, Nov 13 2019
a(n) = sqrt(A077118(n)). - Chai Wah Wu, Jul 30 2022

A155016 Integer part of square root of A010801.

Original entry on oeis.org

0, 1, 90, 1262, 8192, 34938, 114283, 311269, 741455, 1594323, 3162277, 5875603, 10343751, 17403307, 28172943, 44115700, 67108864, 99521746, 144301645, 205068240, 286216701, 393029741, 531798888, 709955183, 936209559, 1220703125
Offset: 0

Views

Author

Keywords

Crossrefs

Integer part of square root of n^k: A000196 (k=1), A000093 (k=3), A155013 (k=5), A155014 (k=7), A155015 (k=11), this sequence (k=13), A155018 (k=15), A155019 (k=17).

Programs

  • Magma
    [Floor(Sqrt(n^13)): n in [1..30]]; // G. C. Greubel, Dec 30 2017
  • Mathematica
    a={};Do[AppendTo[a,IntegerPart[(n^13)^(1/2)]],{n,0,5!}];a
    Table[Floor[Sqrt[n^13]], {n,1,30}] (* G. C. Greubel, Dec 30 2017 *)
  • PARI
    for(n=1,30, print1(floor(sqrt(n^13)), ", ")) \\ G. C. Greubel, Dec 30 2017
    

Extensions

Offset corrected by Karl V. Keller, Jr., Sep 27 2014

A155018 Integer part of square root of n^15 = A010803(n).

Original entry on oeis.org

0, 1, 181, 3787, 32768, 174692, 685700, 2178889, 5931641, 14348907, 31622776, 64631634, 124125023, 226242995, 394421215, 661735513, 1073741824, 1691869691, 2597429617, 3896296578, 5724334022, 8253624572, 11699575548, 16328969210
Offset: 0

Views

Author

Keywords

Crossrefs

Integer part of square root of n^k: A000196 (k=1), A000093 (k=3), A155013 (k=5), A155014 (k=7), A155015 (k=11), A155016 (k=13), this sequence (k=15), A155019 (k=17).

Programs

  • Magma
    [Floor(Sqrt(n^15)): n in [1..30]]; // G. C. Greubel, Dec 30 2017
  • Mathematica
    a={};Do[AppendTo[a,IntegerPart[(n^15)^(1/2)]],{n,0,5!}];a
    Table[Floor[Sqrt[n^15]], {n,1,30}] (* G. C. Greubel, Dec 30 2017 *)
  • PARI
    for(n=1,30, print1(floor(sqrt(n^15)), ", ")) \\ G. C. Greubel, Dec 30 2017
    

Extensions

Offset corrected by Alois P. Heinz, Sep 27 2014
Showing 1-10 of 43 results. Next