login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A231603 Floor of the arithmetic-geometric mean of n+n and n*n. 1

%I #16 Jun 20 2021 19:18:13

%S 0,1,4,7,11,16,22,28,35,43,52,61,70,81,92,103,115,128,141,155,170,185,

%T 200,216,233,250,268,286,305,325,344,365,386,408,430,452,475,499,523,

%U 548,573,598,625,651,678,706,734,763,792,822,852,883,914,945,978,1010,1043,1077,1111,1145,1180,1216,1252,1288,1325

%N Floor of the arithmetic-geometric mean of n+n and n*n.

%C Arithmetic-geometric mean of n+n and n*n.

%C AGM of the sum and product of n and n.

%C a(n) = agm(A005843(n), A000290(n)).

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Arithmetic_geometric_mean">Arithmetic-geometric mean</a>

%F a(n) = floor(agm(n+n,n*n)).

%e a(2) = floor(agm(2+2, 2*2)) = floor(agm(4, 4)) = 4.

%e a(5) = floor(agm(10.0, 25.0)) = floor(agm(17.5, 15.811388)) = floor(agm(16.655695, 16.634281)) = floor(agm(16.644987, 16.644983)) = floor(16.644987) = 16.

%t Table[Floor[ArithmeticGeometricMean[2n,n^2]],{n,0,70}] (* _Harvey P. Dale_, Aug 03 2014 *)

%o (Java) public class Agmnxn {

%o private static final double TOLERANCE = Math.pow(10, -4);

%o private static final long LENGTH = 250;

%o public static void main(String[] args) {

%o String series="";

%o long n=0;

%o while (series.length()<LENGTH) {

%o long x=(long) Math.floor(agm(n+n,n*n));

%o series+=x+",";

%o n++;

%o }

%o System.out.println(series);

%o }

%o private static double agm(double a, double g) {

%o return Math.abs(a-g)<TOLERANCE?a:agm((a+g)/2,Math.sqrt(a*g));

%o }

%o }

%Y Cf. A005843, A005843, A090852.

%K nonn,easy

%O 0,3

%A _John R Phelan_, Nov 11 2013

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)