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 41-43 of 43 results.

A357576 Half area of the convex hull of {(x,y)| x,y integers and x^2 + y^2 < n^2}.

Original entry on oeis.org

0, 2, 8, 17, 28, 46, 63, 87, 112, 142, 173, 204, 244, 287, 333, 378, 428, 485, 540, 602, 661, 737, 802, 869, 947, 1030, 1118, 1197, 1278, 1378, 1469, 1575, 1670, 1776, 1889, 1990, 2108, 2219, 2353, 2472, 2587, 2723, 2854, 3002, 3135, 3275, 3424, 3563, 3721
Offset: 1

Views

Author

Gerhard Kirchner, Oct 05 2022

Keywords

Comments

a(n) is odd if there is an edge connecting two vertices (x,y) and (y,x), x > y > 0, such that x-y is odd. Otherwise, a(n) is even. a(n)/n^2 is not monotonous but tends to Pi/2. The convex hull has four symmetry axes: x=0, y=0, y=x, y=-x. Therefore it is sufficient to find the least area of a quarter polygon (multiplied by 2). The half area is an integer because the area of any convex polygon whose vertex coordinates are integers is a multiple of 1/2.

Examples

			For n=4: 5+6+6 = 17 square units -> a(4)=17.
     _______
   /|_|_|_|_|\  5
  |_|_|_|_|_|_| 6
  |_|_|_|_|_|_| 6
		

Crossrefs

Programs

  • Maxima
    block(nmax: 40, a: makelist(0,i,1,nmax), a[1]:0,
    for n from 2 thru nmax do
      (x0:0, y0:n, xa:0, ya:n, m1:0, m0:2, ar:0,
        while xa
    				
  • Python
    from math import isqrt
    from sympy import convex_hull
    def A357576(n): return 0 if n == 1 else int(2*convex_hull(*[(0,0),(n-1,0)]+[(x,isqrt((n-x)*(n+x)-1)) for x in range(n)]).area) # Chai Wah Wu, Oct 23 2022

Formula

a(n) = A357575(n) - 2*floor(sqrt(2*n-1)) if n is a nonhypotenuse number (A004144).

A244662 Decimal expansion of 'C' (as designated by D. Shanks), a constant appearing in the second order term of the asymptotic expansion of the number of non-hypotenuse numbers not exceeding a given bound.

Original entry on oeis.org

7, 0, 4, 7, 5, 3, 4, 5, 1, 7, 0, 5, 9, 4, 7, 8, 8, 4, 1, 2, 2, 5, 5, 8, 1, 9, 7, 5, 9, 1, 8, 9, 8, 8, 1, 8, 5, 2, 1, 5, 9, 9, 7, 6, 4, 5, 4, 9, 2, 3, 5, 8, 3, 1, 6, 1, 7, 4, 4, 5, 4, 8, 8, 3, 4, 1, 3, 6, 2, 8, 4, 6, 3, 9, 0, 3, 1, 8, 8, 4, 4, 4, 6, 0, 6, 3, 6, 4, 9, 2, 5, 3, 5, 2, 2, 3, 0, 2, 6, 4
Offset: 0

Views

Author

Jean-François Alcover, Jul 04 2014

Keywords

Examples

			0.70475345170594788412255819759189881852...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, 2.3 Landau-Ramanujan Constant, p. 101.

Crossrefs

Cf. A009003, A004144, A062539, A227158, A244659 (first order term).

Programs

  • Mathematica
    digits = 100; m0 = 5; dm = 5; beta[x_] := 1/4^x*(Zeta[x, 1/4] - Zeta[x, 3/4]); L = Pi^(3/2)/Gamma[3/4]^2*2^(1/2)/2; Clear[f]; f[m_] := f[m] = 1/2*(1 - Log[Pi*E^EulerGamma/(2*L)]) - 1/4*NSum[Zeta'[2^k]/Zeta[2^k] - beta'[2^k]/beta[2^k] + Log[2]/(2^(2^k) - 1), {k, 1, m}, WorkingPrecision -> digits + 10]; f[m0]; f[m = m0 + dm]; While[RealDigits[f[m], 10, digits] != RealDigits[f[m - dm], 10, digits], m = m + dm]; c = A227158 = f[m]; c + 1/2 Log[(Pi/L)^2*Exp[EulerGamma]/2] // RealDigits[#, 10, digits] & // First

Formula

C = c + 1/2*log((Pi/L)^2*exp(gamma)/2), where c is A227158 and L the Lemniscate constant A062539.

A309228 a(n) is the greatest possible height of a binary tree where all nodes hold positive squares and all interior nodes also equal the sum of their two children and the root node has value n^2.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 3, 1, 2, 1, 3, 1, 1, 2, 1, 1, 1, 1, 3, 3, 1, 1, 3, 2, 1, 1, 1, 3, 2, 1, 3, 1, 3, 2, 3, 1, 1, 1, 2, 1, 1, 1, 1, 3, 3, 3, 3, 1, 2, 1, 1, 3, 1, 2, 3, 1, 1, 1, 4, 1, 1, 3, 1, 2, 1, 1, 3, 3, 3, 1, 1, 3, 1, 2, 1, 3, 1, 1, 4, 1, 3
Offset: 1

Views

Author

Rémy Sigrist, Jul 16 2019

Keywords

Comments

The sequence is unbounded and for any k > 0, A309167(k) is the least n such that a(n) = k.

Examples

			a(1) = 1:
              1^2
               |
a(5) = 2:
           3^2    4^2
            \     /
             \   /
              5^2
               |
a(13) = 3:
          3^2    4^2
           \     /
            \   /
             5^2    12^2
              \      /
               \    /
                13^2
                  |
		

Crossrefs

Programs

  • Maple
    f:= proc(n) option remember; local S,x,y;
       S:= map(t -> subs(t,[x,y]), {isolve(x^2+y^2=n^2)});
       S:= select(t -> type(t,list(posint)) and t[2]>=t[1], S);
       if S = {} then 1 else 1+max(map(procname,map(op,S))) fi
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 27 2022
  • Mathematica
    a = Table[1, {m = 100}];
    Do[Do[If[IntegerQ@ Sqrt[v2 = n^2-u^2], a[[n]] = Max[a[[n]], 1+Max[a[[u]], a[[Floor@ Sqrt[v2]]]]]], {u, 1, n-1}], {n, 1, m}];
    Table[a[[n]], {n, 1, m}] (* Jean-François Alcover, Aug 19 2022, after PARI code *)
  • PARI
    a = vector(87,n,1); for (n=1, #a, for (u=1, n-1, if (issquare(v2=n^2-u^2), a[n]=max(a[n],1+max(a[u],a[sqrtint(v2)])))); print1 (a[n]", "))

Formula

a(n) = 1 iff n belongs to A004144.
a(A309167(n)) = n.
If n^2 = u^2 + v^2 with u > v > 0, then a(n) >= 1 + max(a(u), a(v)).
Previous Showing 41-43 of 43 results.