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-3 of 3 results.

A056161 Solutions (value of x) of Diophantine equation 2*x^2 + 3*x + 2 = r^2.

Original entry on oeis.org

2, 7, 94, 263, 3218, 8959, 109342, 304367, 3714434, 10339543, 126181438, 351240119, 4286454482, 11931824527, 145613270974, 405330793823, 4946564758658, 13769315165479, 168037588523422, 467751384832487, 5708331445037714, 15889777769139103, 193915231542758878
Offset: 0

Views

Author

Helge Robitzsch (hrobi(AT)math.uni-goettingen.de), Aug 01 2000

Keywords

Comments

The same equation also has negative solutions x=-c(n), where c would be the sequence {1,2,17,46,553,1538,18761,52222,...} with the corresponding values of r being {1,2,23,64,781,2174,26531,73852,...}. Moreover, replacing x with x+K, one obtains the Diophantine equation 2*x^2+(4*K+3)*x+(2*K^2+3*K+2)=r^2. Since K can be any integer (for example K=-1, giving 2*x^2-x+1=r^2), this amounts to an infinite family of Diophantine equations with closely related solutions. For example, if the present equation has a solution pair {a(n), A055979(n)}, the one with x replaced by x+K will have a solution {a(n)-K, A055979(n)}.

Crossrefs

Cf. A055979.

Programs

  • Magma
    I:=[2,7,94,263,3218]; [n le 5 select I[n] else Self(n-1)+34*Self(n-2)-34*Self(n-3)-Self(n-4)+Self(n-5): n in [1..30]]; // Vincenzo Librandi, Jan 10 2016
  • Maple
    a:= n-> (Matrix([94,7,2,-1,-2]). Matrix([[1,1,0,0,0], [34,0,1,0,0], [ -34,0,0,1,0], [ -1,0,0,0,1], [1,0,0,0,0]])^n)[1,3]: seq(a(n), n=0..25); # Alois P. Heinz, Jun 03 2009
  • Mathematica
    CoefficientList[Series[(x^4 + x^3 - 19 x^2 - 5 x - 2)/(x^5 - x^4 - 34 x^3 + 34 x^2 + x - 1), {x, 0, 22}], x] (* Michael De Vlieger, Jan 09 2016 *)
    LinearRecurrence[{1, 34, -34, -1, 1}, {2, 7, 94, 263, 3218}, 30] (* Vincenzo Librandi, Jan 10 2016 *)
  • PARI
    Vec((x^4+x^3-19*x^2-5*x-2)/((x-1)*(x^2-6*x+1)*(x^2+6*x+1)) + O(x^100)) \\ Colin Barker, May 17 2015
    

Formula

a(n) = floor(A055979(n)/sqrt(2)).
G.f.: (x^4 + x^3 - 19*x^2 - 5*x - 2) / (x^5 - x^4 - 34*x^3 + 34*x^2 + x - 1). - Alois P. Heinz, Jun 03 2009
a(n) = a(n-1) + 34*a(n-2) - 34*a(n-3) - a(n-4) + a(n-5). - Colin Barker, May 17 2015

Extensions

More terms from Alois P. Heinz, Jun 03 2009

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).

A133217 Indices of decagonal numbers (A001107) that are also triangular (A000217).

Original entry on oeis.org

0, 1, 2, 20, 55, 667, 1856, 22646, 63037, 769285, 2141390, 26133032, 72744211, 887753791, 2471161772, 30157495850, 83946756025, 1024467105097, 2851718543066, 34801724077436, 96874483708207, 1182234151527715, 3290880727535960, 40161159427864862
Offset: 1

Views

Author

Richard Choulet, Oct 11 2007; Ant King, Nov 04 2011

Keywords

Comments

For n>0, a(n) = (A055979(n) - A056161(n))/2, with those two sequences related through the Diophantine equation 2x^2 + 3x + 2 = r^2. - Richard R. Forberg, Nov 24 2013

Examples

			The third number which is both decagonal (A001107) and triangular (A000217) is A133216(3)=10. As this is the second decagonal number, we have a(3) = 2.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{1, 34, -34, -1, 1} , {0, 1, 2, 20, 55, 667}, 24] (* first term 0 corrected by Georg Fischer, Apr 02 2019 *)

Formula

For n>5, a(n) = 34*a(n-2) - a(n-4) - 12.
For n>6, a(n) = a(n-1) + 34*a(n-2) - 34*a(n-3) - a(n-4) + a(n-5).
For n>1, a(n) = 1/16 * ((2*sqrt(2) + (-1)^n)*(1 + sqrt(2))^(2*n - 3) - (2*sqrt(2) - (-1)^n)*(1 - sqrt(2))^(2*n - 3) + 6).
For n>1, a(n) = ceiling (1/16*(2*sqrt(2) + (-1)^n)*(1 + sqrt(2))^(2*n - 3)).
G.f.: ( 1 - 33*x^2 + 18*x^3 + 2*x^4 ) / ((1 - x ) * (1 - 6*x + x^2 ) * (1 + 6*x + x^2)).
lim (n -> Infinity, a(2n+1)/a(2n)) = 1/7*(43 + 30*sqrt(2)).
lim (n -> Infinity, a(2n)/a(2n-1)) = 1/7*(11 + 6*sqrt(2)).

Extensions

Entry revised by Max Alekseyev, Nov 06 2011
Showing 1-3 of 3 results.