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

A000603 Number of nonnegative solutions to x^2 + y^2 <= n^2.

Original entry on oeis.org

1, 3, 6, 11, 17, 26, 35, 45, 58, 73, 90, 106, 123, 146, 168, 193, 216, 243, 271, 302, 335, 365, 402, 437, 473, 516, 557, 600, 642, 687, 736, 782, 835, 886, 941, 999, 1050, 1111, 1167, 1234, 1297, 1357, 1424, 1491, 1564, 1636, 1703, 1778, 1852, 1931, 2012, 2095
Offset: 0

Views

Author

Keywords

Comments

Row sums of triangle A255238. - Wolfdieter Lang, Mar 15 2015

References

  • H. Gupta, A Table of Values of N_3(t), Proc. National Institute of Sciences of India, 13 (1947), 35-63.
  • 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

Column k=2 of A302998.

Programs

  • Haskell
    a000603 n = length [(x,y) | x <- [0..n], y <- [0..n], x^2 + y^2 <= n^2]
    -- Reinhard Zumkeller, Jan 23 2012
    
  • Mathematica
    Table[cnt = 0; Do[If[x^2 + y^2 <= n^2, cnt++], {x, 0, n}, {y, 0, n}]; cnt, {n, 0, 51}] (* T. D. Noe, Apr 02 2013 *)
    Table[If[n==1,1,2*Sum[Sum[A255195[[n, n - k + 1]], {k, 1, k}], {k, 1, n}] - Ceiling[(n - 1)/Sqrt[2]]],{n,1,52}] (* Mats Granvik, Feb 19 2015 *)
  • PARI
    a(n)=my(n2=n^2);sum(a=0,n,sqrtint(n2-a^2)+1) \\ Charles R Greathouse IV, Apr 03 2013
    
  • Python
    from math import isqrt
    def A000603(n): return (m:=n<<1)+sum(isqrt(k*(m-k)) for k in range(1,n))+1 # Chai Wah Wu, Jul 18 2024

Formula

a(n) = n^2 * Pi/4 + O(n). - Charles R Greathouse IV, Apr 03 2013
a(n) = A001182(n) + 2*n + 1. - R. J. Mathar, Jan 07 2015
a(n) = 2*A026702(n) - (1 + floor(n/sqrt(2))), n >= 0. - Wolfdieter Lang, Mar 15 2015
a(n) = [x^(n^2)] (1 + theta_3(x))^2/(4*(1 - x)), where theta_3() is the Jacobi theta function. - Ilya Gutkovskiy, Apr 15 2018

Extensions

More terms from David W. Wilson, May 22 2000

A302995 a(n) = [x^(n^2)] (theta_3(x) - 1)^n/(2^n*(1 - x)), where theta_3() is the Jacobi theta function.

Original entry on oeis.org

1, 1, 1, 7, 32, 177, 1269, 9263, 74452, 652710, 6078048, 60447082, 631870024, 6915613084, 79113376037, 941759419159, 11630647314564, 148799595377384, 1966441829785081, 26793749867965515, 375812005722920406, 5416574818546042067, 80123280319100908258, 1214860029446181979357
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 17 2018

Keywords

Comments

a(n) = number of positive solutions to (x_1)^2 + (x_2)^2 + ... + (x_n)^2 <= n^2.

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[(EllipticTheta[3, 0, x] - 1)^n/(2^n (1 - x)), {x, 0, n^2}], {n, 0, 23}]
    Join[{1}, Table[SeriesCoefficient[1/(1 - x) Sum[x^k^2, {k, 1, n}]^n, {x, 0, n^2}], {n, 23}]]

A341423 Number of positive solutions to (x_1)^2 + (x_2)^2 + (x_3)^2 + (x_4)^2 <= n^2.

Original entry on oeis.org

1, 5, 32, 94, 219, 437, 804, 1362, 2177, 3271, 4768, 6708, 9227, 12381, 16254, 20954, 26707, 33461, 41480, 50884, 61703, 74183, 88606, 104862, 123481, 144241, 167604, 193648, 222799, 254731, 290244, 329512, 372545, 419661, 470822, 526646, 587481, 653505
Offset: 2

Views

Author

Ilya Gutkovskiy, Feb 11 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(k=0, 1, `if`(n=0, 0,
          add((s->`if`(s>n, 0, b(n-s, k-1)))(j^2), j=1..isqrt(n))))
        end:
    a:= n-> b(n^2, 4):
    seq(a(n), n=2..39);  # Alois P. Heinz, Feb 11 2021
  • Mathematica
    Table[SeriesCoefficient[(EllipticTheta[3, 0, x] - 1)^4/(16 (1 - x)), {x, 0, n^2}], {n, 2, 39}]

Formula

a(n) is the coefficient of x^(n^2) in expansion of (theta_3(x) - 1)^4 / (16 * (1 - x)).

A341424 Number of positive solutions to (x_1)^2 + (x_2)^2 + ... + (x_5)^2 <= n^2.

Original entry on oeis.org

6, 51, 177, 547, 1348, 2958, 5574, 10084, 16974, 27450, 41970, 62671, 90216, 128082, 175867, 238018, 316373, 414998, 534094, 682144, 859705, 1075165, 1326551, 1627896, 1976582, 2390057, 2862607, 3411273, 4039483, 4760419, 5571729, 6500650, 7541560, 8722096
Offset: 3

Views

Author

Ilya Gutkovskiy, Feb 11 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(k=0, 1, `if`(n=0, 0,
          add((s->`if`(s>n, 0, b(n-s, k-1)))(j^2), j=1..isqrt(n))))
        end:
    a:= n-> b(n^2, 5):
    seq(a(n), n=3..36);  # Alois P. Heinz, Feb 11 2021
  • Mathematica
    Table[SeriesCoefficient[(EllipticTheta[3, 0, x] - 1)^5/(32 (1 - x)), {x, 0, n^2}], {n, 3, 36}]

Formula

a(n) is the coefficient of x^(n^2) in expansion of (theta_3(x) - 1)^5 / (32 * (1 - x)).

A341425 Number of positive solutions to (x_1)^2 + (x_2)^2 + ... + (x_6)^2 <= n^2.

Original entry on oeis.org

7, 48, 331, 1269, 3698, 9382, 20927, 42683, 79844, 142173, 238810, 387615, 603589, 915324, 1345294, 1939221, 2729723, 3783313, 5138567, 6895632, 9108626, 11909496, 15362753, 19642539, 24832744, 31179476, 38757032, 47877886, 58647957, 71447776, 86391220
Offset: 3

Views

Author

Ilya Gutkovskiy, Feb 11 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(k=0, 1, `if`(n=0, 0,
          add((s->`if`(s>n, 0, b(n-s, k-1)))(j^2), j=1..isqrt(n))))
        end:
    a:= n-> b(n^2, 6):
    seq(a(n), n=3..33);  # Alois P. Heinz, Feb 11 2021
  • Mathematica
    Table[SeriesCoefficient[(EllipticTheta[3, 0, x] - 1)^6/(64 (1 - x)), {x, 0, n^2}], {n, 3, 33}]

Formula

a(n) is the coefficient of x^(n^2) in expansion of (theta_3(x) - 1)^6 / (64 * (1 - x)).

A341426 Number of positive solutions to (x_1)^2 + (x_2)^2 + ... + (x_7)^2 <= n^2.

Original entry on oeis.org

1, 71, 491, 2522, 9263, 27723, 71480, 163908, 345657, 679802, 1252185, 2203724, 3715206, 6041979, 9510283, 14591324, 21788606, 31894205, 45741815, 64467383, 89363919, 122254946, 164721244, 219526449, 289133792, 377013829, 486522424, 622759365
Offset: 3

Views

Author

Ilya Gutkovskiy, Feb 11 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(k=0, 1, `if`(n=0, 0,
          add((s->`if`(s>n, 0, b(n-s, k-1)))(j^2), j=1..isqrt(n))))
        end:
    a:= n-> b(n^2, 7):
    seq(a(n), n=3..30);  # Alois P. Heinz, Feb 11 2021
  • Mathematica
    Table[SeriesCoefficient[(EllipticTheta[3, 0, x] - 1)^7/(128 (1 - x)), {x, 0, n^2}], {n, 3, 30}]

Formula

a(n) is the coefficient of x^(n^2) in expansion of (theta_3(x) - 1)^7 / (128 * (1 - x)).

A341427 Number of positive solutions to (x_1)^2 + (x_2)^2 + ... + (x_8)^2 <= n^2.

Original entry on oeis.org

1, 45, 767, 4452, 21178, 74452, 224313, 586035, 1387583, 2999430, 6102276, 11656386, 21282969, 37159993, 62687904, 102213426, 162345824, 251064745, 379922217, 562833191, 819351646, 1171991382, 1651937498, 2294227971, 3147090871, 4263499419
Offset: 3

Views

Author

Ilya Gutkovskiy, Feb 11 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(k=0, 1, `if`(n=0, 0,
          add((s->`if`(s>n, 0, b(n-s, k-1)))(j^2), j=1..isqrt(n))))
        end:
    a:= n-> b(n^2, 8):
    seq(a(n), n=3..28);  # Alois P. Heinz, Feb 11 2021
  • Mathematica
    Table[SeriesCoefficient[(EllipticTheta[3, 0, x] - 1)^8/(256 (1 - x)), {x, 0, n^2}], {n, 3, 28}]

Formula

a(n) is the coefficient of x^(n^2) in expansion of (theta_3(x) - 1)^8 / (256 * (1 - x)).

A341428 Number of positive solutions to (x_1)^2 + (x_2)^2 + ... + (x_9)^2 <= n^2.

Original entry on oeis.org

1, 46, 760, 7751, 43910, 186098, 652710, 1943742, 5178030, 12411211, 27773308, 57798904, 114152429, 214399664, 387571706, 673189698, 1135916808, 1857320784, 2966816950, 4623984661, 7066527283, 10577150039, 15589368584, 22580091614, 32256768126
Offset: 3

Views

Author

Ilya Gutkovskiy, Feb 11 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(k=0, 1, `if`(n=0, 0,
          add((s->`if`(s>n, 0, b(n-s, k-1)))(j^2), j=1..isqrt(n))))
        end:
    a:= n-> b(n^2, 9):
    seq(a(n), n=3..27);  # Alois P. Heinz, Feb 11 2021
  • Mathematica
    Table[SeriesCoefficient[(EllipticTheta[3, 0, x] - 1)^9/(512 (1 - x)), {x, 0, n^2}], {n, 3, 27}]

Formula

a(n) is the coefficient of x^(n^2) in expansion of (theta_3(x) - 1)^9 / (512 * (1 - x)).

A341429 Number of positive solutions to (x_1)^2 + (x_2)^2 + ... + (x_10)^2 <= n^2.

Original entry on oeis.org

56, 1108, 12098, 84624, 439371, 1785368, 6078048, 18139393, 48586117, 118929400, 270250734, 578320470, 1169522013, 2261784392, 4193751331, 7509793133, 13008356489, 21921125415, 35951569269, 57666975238, 90464266824, 139295784464, 210514511189, 313228848537
Offset: 4

Views

Author

Ilya Gutkovskiy, Feb 11 2021

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(k=0, 1, `if`(n=0, 0,
          add((s->`if`(s>n, 0, b(n-s, k-1)))(j^2), j=1..isqrt(n))))
        end:
    a:= n-> b(n^2, 10):
    seq(a(n), n=4..27);  # Alois P. Heinz, Feb 11 2021
  • Mathematica
    Table[SeriesCoefficient[(EllipticTheta[3, 0, x] - 1)^10/(1024 (1 - x)), {x, 0, n^2}], {n, 4, 27}]

Formula

a(n) is the coefficient of x^(n^2) in expansion of (theta_3(x) - 1)^10 / (1024 * (1 - x)).

A125228 Maximal number of squares of side 1 in a disk of radius n.

Original entry on oeis.org

1, 7, 21, 39, 65, 93, 135, 179, 227, 285, 349, 415, 495, 573, 663, 759, 859, 963, 1071, 1199, 1325, 1457, 1591, 1735, 1891, 2049, 2207, 2383, 2557, 2735, 2929, 3123, 3327, 3529, 3739, 3955, 4191, 4427, 4665, 4901, 5159, 5413, 5681, 5951, 6231, 6515, 6799
Offset: 1

Views

Author

Filippo ALUFFI PENTINI (falpen(AT)gmail.com), Jan 25 2007

Keywords

Examples

			a(2)=7 since you cannot pack more than 7 unit-side squares in a disk of radius 2
		

Crossrefs

Similar to A001182 but less constrained.
A124484 is another version.

Programs

  • Mathematica
    f[n_] := 2 Sum[ IntegerPart[2 Sqrt[n^2 - (n - k - 1/2)^2]], {k, 0, n - 2}] + IntegerPart[2 Sqrt[n^2 - 1/2^2]]; Array[f, 47] (* Robert G. Wilson v, Jan 27 2007 *)
    a[n_]:=2 Sum[Floor[2 Sqrt[n^2-(k+1/2)^2]],{k,n-1}]+2n-1;
    Array[a, 47]  (*  David Dewan, Jun 07 2024*)
  • Python
    from math import isqrt
    def A125228(n): return (m:=n<<1)-1+(sum(isqrt((k*(m-k+1)-n<<2)-1) for k in range(1,n))<<1) # Chai Wah Wu, Jul 18 2024

Formula

a(n) = 2*Sum_{k=1..n-1} floor(2*sqrt(n^2 - (k+1/2)^2)) + 2*n - 1.

Extensions

More terms from Robert G. Wilson v, Jan 27 2007
Showing 1-10 of 19 results. Next