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

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

Original entry on oeis.org

1, 17, 129, 577, 1713, 3729, 6865, 12369, 21697, 33809, 47921, 69233, 101041, 136209, 174737, 231185, 306049, 384673, 469457, 579217, 722353, 876465, 1025649, 1220337, 1481521, 1733537, 1979713, 2306753, 2697537, 3087777, 3482913, 3959585, 4558737, 5155473
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 10 2021

Keywords

Comments

Partial sums of A000143.

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1, `if`(n<0 or k<1, 0,
          b(n, k-1)+2*add(b(n-j^2, k-1), j=1..isqrt(n))))
        end:
    a:= proc(n) option remember; b(n, 8)+`if`(n>0, a(n-1), 0) end:
    seq(a(n), n=0..33);  # Alois P. Heinz, Feb 10 2021
  • Mathematica
    nmax = 33; CoefficientList[Series[EllipticTheta[3, 0, x]^8/(1 - x), {x, 0, nmax}], x]
    Table[SquaresR[8, n], {n, 0, 33}] // Accumulate
  • Python
    from math import prod
    from sympy import factorint
    def A341397(n): return (sum((prod((p**(3*(e+1))-(1 if p&1 else 15))//(p**3-1) for p, e in factorint(m).items()) for m in range(1,n+1)))<<4)+1 # Chai Wah Wu, Jun 21 2024

Formula

G.f.: theta_3(x)^8 / (1 - x).
a(n^2) = A055414(n).

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

Original entry on oeis.org

1, 3, 9, 27, 89, 333, 1341, 5449, 21697, 84663, 327829, 1275739, 5020457, 19964623, 79883141, 320317827, 1284656385, 5152761033, 20686311261, 83182322509, 335110196569, 1352277390001, 5463873556381, 22097867887045, 89441286136465, 362277846495883, 1468465431530457
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 14 2018

Keywords

Comments

a(n) = number of integer lattice points inside the n-dimensional hypersphere of radius sqrt(n).

Crossrefs

Programs

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

Formula

a(n) = A122510(n,n).
a(n) ~ c / (sqrt(n) * r^n), where r = 0.241970723224463308846762732757915397312... (= radius of convergence A166952) and c = 0.716940866073606328... - Vaclav Kotesovec, Apr 14 2018

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

Original entry on oeis.org

1, 15, 99, 379, 953, 1793, 3081, 5449, 8893, 12435, 16859, 24419, 33659, 42115, 53203, 69779, 88273, 106081, 125821, 153541, 187981, 217437, 248741, 298469, 351277, 394691, 446939, 515259, 589307, 657683, 728803, 828259, 939223, 1029159, 1124023, 1260103
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 10 2021

Keywords

Comments

Partial sums of A008451.

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1, `if`(n<0 or k<1, 0,
          b(n, k-1)+2*add(b(n-j^2, k-1), j=1..isqrt(n))))
        end:
    a:= proc(n) option remember; b(n, 7)+`if`(n>0, a(n-1), 0) end:
    seq(a(n), n=0..35);  # Alois P. Heinz, Feb 10 2021
  • Mathematica
    nmax = 35; CoefficientList[Series[EllipticTheta[3, 0, x]^7/(1 - x), {x, 0, nmax}], x]
    Table[SquaresR[7, n], {n, 0, 35}] // Accumulate
  • PARI
    my(q='q+O('q^(55))); Vec((eta(q^2)^5/(eta(q)^2*eta(q^4)^2))^7/(1-q)) \\ Joerg Arndt, Jun 21 2024

Formula

G.f.: theta_3(x)^7 / (1 - x).
a(n^2) = A055413(n).

A014198 Number of integer solutions to x^2 + y^2 <= n excluding (0,0).

Original entry on oeis.org

0, 4, 8, 8, 12, 20, 20, 20, 24, 28, 36, 36, 36, 44, 44, 44, 48, 56, 60, 60, 68, 68, 68, 68, 68, 80, 88, 88, 88, 96, 96, 96, 100, 100, 108, 108, 112, 120, 120, 120, 128, 136, 136, 136, 136, 144, 144, 144, 144, 148, 160, 160, 168, 176, 176, 176, 176, 176, 184, 184
Offset: 0

Views

Author

Keywords

Comments

a(32)/32 = 100/32 = 3.125; lim_{n->infinity} a(n)/n = Pi.
The terms of this sequence are four times the running total of the excess of the 4k + 1 divisors of the natural numbers (from 1 through to n) over their 4k + 3 divisors. - Ant King, Mar 12 2013

Examples

			For n=2 the 8 solutions are (x,y) = (+-1,0), (0,+-1), (+-1,+-1).
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, th. 339

Crossrefs

Programs

  • Maple
    A014198 := proc(n)
        nops([ numtheory[thue]( abs( x^2+y^2) <= n, [ x, y ] ) ]);
    end proc:
    seq(A014198(n),n=0..60) ;
  • Mathematica
    Prepend[SquaresR[2,#] &/@Range[59],0]//Accumulate (* Ant King, Mar 12 2013 *)
  • PARI
    a(n)=local(j); j=sqrtint(n); sum(x=-j,j,sum(y=-j,j,x^2+y^2<=n))-1
    
  • Python
    from math import prod
    from itertools import count, accumulate, islice
    from sympy import factorint
    def A014198_gen(): # generator of terms
        return accumulate(map(lambda n:prod(e+1 if p & 3 == 1 else (e+1) & 1 for p, e in factorint(n).items() if p > 2) << 2, count(1)),initial=0)
    A014198_list = list(islice(A014198_gen(),30)) # Chai Wah Wu, Jun 28 2022

Formula

a(n) = 4*A014200(n).
a(n) = A057655(n)-1.

A036704 a(n)=number of Gaussian integers z=a+bi satisfying |z|<=n+1/2.

Original entry on oeis.org

1, 9, 21, 37, 69, 97, 137, 177, 225, 293, 349, 421, 489, 577, 665, 749, 861, 973, 1085, 1201, 1313, 1457, 1597, 1741, 1885, 2053, 2217, 2377, 2561, 2733, 2933, 3125, 3313, 3521, 3745, 3969, 4197, 4421, 4669, 4905, 5169, 5417
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A057655.

Formula

a(n) = A057655(n^2+n). - Robert Israel, Sep 29 2014

A038589 Sizes of successive clusters in hexagonal lattice A_2 centered at lattice point.

Original entry on oeis.org

1, 7, 7, 13, 19, 19, 19, 31, 31, 37, 37, 37, 43, 55, 55, 55, 61, 61, 61, 73, 73, 85, 85, 85, 85, 91, 91, 97, 109, 109, 109, 121, 121, 121, 121, 121, 127, 139, 139, 151, 151, 151, 151, 163, 163, 163, 163, 163, 169, 187, 187, 187, 199, 199, 199
Offset: 0

Views

Author

Keywords

Comments

The hexagonal lattice is the familiar 2-dimensional lattice in which each point has 6 neighbors. This is sometimes called the triangular lattice.

Examples

			1 + 7*x + 7*x^2 + 13*x^3 + 19*x^4 + 19*x^5 + 19*x^6 + 31*x^7 + 31*x^8 + 37*x^9 + ...
		

Crossrefs

Cf. A035019.
Cf. A057655 (for square lattice).

Programs

  • Mathematica
    a[n_] := 1 + Sum[ Length[ {ToRules[ Reduce[ x^2 + x*y + y^2 == k, {x, y}, Integers] ]}], {k, 1, n}]; Table[a[n], {n, 0, 54}] (* Jean-François Alcover, Feb 23 2012, after Neven Juric *)
  • PARI
    a(n)=1+6*sum(k=0,n\3,(n\(3*k+1))-(n\(3*k+2)))

Formula

Partial sums of A004016.
Expansion of a(x) / (1 - x) in powers of x where a() is a cubic AGM theta function (cf. A004016). - Michael Somos, Aug 21 2012
Equals 1 + A014201(n). - Neven Juric, May 10 2010
a(n) = 1 + 6*Sum_{k=1..n/3} floor(n/(3k+1)) - floor(n/(3k+2)). a(n) is asymptotic to 2*(Pi/sqrt(3))*n. Conjecture: a(n) = 2*(Pi/sqrt(3))*n + O(n^(1/4 + epsilon)) as for the Gauss circle or Dirichlet divisor problems. - Benoit Cloitre, Oct 27 2012
a(n) = A014201(n) + 1. - Hugo Pfoertner, Nov 09 2023

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

Original entry on oeis.org

1, 19, 163, 835, 2869, 7189, 14581, 27253, 49861, 84663, 129303, 190071, 284055, 409335, 550455, 732855, 995241, 1312617, 1656153, 2077497, 2634777, 3300057, 4003641, 4804281, 5872665, 7129227, 8363307, 9784491, 11635755, 13670475, 15727755, 18066315, 20950491
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 10 2021

Keywords

Comments

Partial sums of A008452.

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1, `if`(n<0 or k<1, 0,
          b(n, k-1)+2*add(b(n-j^2, k-1), j=1..isqrt(n))))
        end:
    a:= proc(n) option remember; b(n, 9)+`if`(n>0, a(n-1), 0) end:
    seq(a(n), n=0..32);  # Alois P. Heinz, Feb 10 2021
  • Mathematica
    nmax = 32; CoefficientList[Series[EllipticTheta[3, 0, x]^9/(1 - x), {x, 0, nmax}], x]
    Table[SquaresR[9, n], {n, 0, 32}] // Accumulate

Formula

G.f.: theta_3(x)^9 / (1 - x).
a(n^2) = A055415(n).

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

Original entry on oeis.org

1, 21, 201, 1161, 4541, 12965, 29285, 58085, 110105, 198765, 327829, 503509, 765589, 1152509, 1642109, 2243069, 3083569, 4221529, 5551949, 7115789, 9166133, 11777333, 14763893, 18121973, 22316213, 27634481, 33512921, 39812441, 47674841, 57294401, 67510721, 78592961
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 10 2021

Keywords

Comments

Partial sums of A000144.

Crossrefs

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1, `if`(n<0 or k<1, 0,
          b(n, k-1)+2*add(b(n-j^2, k-1), j=1..isqrt(n))))
        end:
    a:= proc(n) option remember; b(n, 10)+`if`(n>0, a(n-1), 0) end:
    seq(a(n), n=0..31);  # Alois P. Heinz, Feb 10 2021
  • Mathematica
    nmax = 31; CoefficientList[Series[EllipticTheta[3, 0, x]^10/(1 - x), {x, 0, nmax}], x]
    Table[SquaresR[10, n], {n, 0, 31}] // Accumulate

Formula

G.f.: theta_3(x)^10 / (1 - x).
a(n^2) = A055416(n).

A341198 Number of points on or inside the circle of radius n, as rasterized by the midpoint circle algorithm.

Original entry on oeis.org

1, 5, 21, 37, 61, 97, 129, 177, 221, 277, 349, 413, 489, 569, 657, 749, 845, 957, 1073, 1193, 1313, 1441, 1581, 1733, 1877, 2025, 2209, 2369, 2553, 2725, 2909, 3117, 3305, 3513, 3721, 3941, 4181, 4405, 4645, 4889, 5145, 5401, 5653, 5941, 6213, 6493, 6769, 7065
Offset: 0

Views

Author

Pontus von Brömssen, Feb 06 2021

Keywords

Comments

The number of points on the rasterized circle itself (of radius n) is given by 4*A022846(n) for n > 0.

Examples

			In the figure below, the points on the rasterized circle of radius n are labeled with the number n. (Points without a label do not lie on any such circle.)
                9 9 9 9 9
            9 9 8 8 8 8 8 9 9
        9 9 8 8 7 7 7 7 7 8 8 9 9
      9 . 8 7 7 6 6 6 6 6 7 7 8 . 9
      9 8 7 . 6 5 5 5 5 5 6 . 7 8 9
    9 8 7 . 6 5 . 4 4 4 . 5 6 . 7 8 9
    9 8 7 6 5 4 4 3 3 3 4 4 5 6 7 8 9
  9 8 7 6 5 . 4 3 2 2 2 3 4 . 5 6 7 8 9
  9 8 7 6 5 4 3 2 . 1 . 2 3 4 5 6 7 8 9
  9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9
  9 8 7 6 5 4 3 2 . 1 . 2 3 4 5 6 7 8 9
  9 8 7 6 5 . 4 3 2 2 2 3 4 . 5 6 7 8 9
    9 8 7 6 5 4 4 3 3 3 4 4 5 6 7 8 9
    9 8 7 . 6 5 . 4 4 4 . 5 6 . 7 8 9
      9 8 7 . 6 5 5 5 5 5 6 . 7 8 9
      9 . 8 7 7 6 6 6 6 6 7 7 8 . 9
        9 9 8 8 7 7 7 7 7 8 8 9 9
            9 9 8 8 8 8 8 9 9
                9 9 9 9 9
Counting the points on or inside a circle of given radius, one obtains a(0)=1, a(1)=5, a(2)=21, a(3)=37, a(4)=61, a(5)=97, ...
		

Crossrefs

First differences: A341199.

Programs

  • Python
    def A341198(n):
      n2=n**2
      x=n
      y=A=0
      while y<=x:
        dx=x**2+(y+1)**2-n2-x>=0
        A+=x+(y!=0 and y!=x)*(x-2*y)+(dx and y==x-1)*(x-1)
        x-=dx
        y+=1
      return 4*A+1

Formula

a(n) == 1 (mod 4).
a(n) ~ Pi*n^2. More precisely, it is reasonable to expect that a(n) = Pi*n^2 + sqrt(8)*n + o(n), because there are Pi*n^2 + o(n) points in the disk x^2 + y^2 <= n^2 (Gauss's circle problem), all of which are inside the rasterized circle, and we can expect about half of the 4*sqrt(2)*n + O(1) points on the rasterized circle itself to be outside this disk (and there are no points between the disk and the rasterized circle).

A175363 Partial sums of A175362.

Original entry on oeis.org

1, 5, 9, 9, 9, 9, 9, 9, 13, 21, 21, 21, 21, 21, 21, 21, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 29, 37, 37, 37, 37, 37, 37, 37, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 53, 61, 61, 61, 61, 61, 61, 61
Offset: 0

Views

Author

R. J. Mathar, Apr 24 2010

Keywords

Comments

Number of integer pairs (x,y) satisfying |x|^3+|y|^3 <= n, any -n <= x,y <=n. Cubic variant of A057655.

Examples

			a(1) = 5 counts (x,y) = (-1,0), (0,-1), (0,0), (0,1) and (1,0).
		
Previous Showing 11-20 of 29 results. Next