A368366
AGM transform of positive integers (see Comments for definition).
Original entry on oeis.org
0, 1, 54, 3856, 384375, 52173801, 9342271792, 2144652558336, 616093495529805, 217007162119140625, 92121505246667356416, 46444033776765696086016, 27459259766085858672714571, 18830590227539089561714381425, 14834398958231516437500000000000
Offset: 1
The AGM transform of (n mod 2) is
A276978.
A368374 gives another way to look at the problem.
-
AGM := proc(f,M) local b,n,S,P,i,t; b:=[];
for n from 1 to M do
S:=add(f(i),i=1..n); P:=mul(f(i),i=1..n); t:=S^n-n^n*P;
b:=[op(b),t];
od:
b;
end;
fid:=proc(n) n; end; # the identity map
AGM(fid,20);
-
A368366[n_] := n^n (((n + 1)/2)^n - n!);
Array[A368366, 10] (* Paolo Xausa, Jan 29 2024 *)
-
a368366(n) = {my(v=vector(n,i,i)); vecsum(v)^n - n^n*vecprod(v)}; \\ Hugo Pfoertner, Jan 24 2024
-
from itertools import count, islice
def AGM(g): # generator of AGM transform of sequence given by generator g
S, P = 0, 1
for n, an in enumerate(g, 1):
S += an
P *= an
yield S**n-n**n*P
print(list(islice(AGM(count(1)), 15))) # Michael S. Branicky, Jan 24 2024
-
from math import factorial
def A368366(n): return ((m:=n**n)*(n+1)**n>>n)-m*factorial(n) # Chai Wah Wu, Jan 25 2024
A368372
a(n) = numerator of AM(n)-HM(n), where AM(n) and HM(n) are the arithmetic and harmonic means of the first n positive integers.
Original entry on oeis.org
0, 1, 4, 29, 111, 103, 472, 2369, 12965, 30791, 197346, 452993, 3337271, 7485915, 4160656, 18358463, 170991927, 124184839, 1278605110, 110351535, 98802055, 211524139, 2595194516, 16562041459, 219589922071, 464651871609, 2207044831642, 4649180818987, 70862100349605, 148699793966557
Offset: 1
0, 1/6, 4/11, 29/50, 111/137, 103/98, 472/363, 2369/1522, 12965/7129, 30791/14762, 197346/83711, 452993/172042, 3337271/1145993, 7485915/2343466, 4160656/1195757, 18358463/4873118, ...
-
AM:=proc(n) local i; (add(i,i=1..n)/n); end;
HM:=proc(n) local i; (add(1/i,i=1..n)/n)^(-1); end;
s1:=[seq(AM(n)-HM(n),n=1..50)];
-
A368372[n_] := Numerator[(n+1)/2 - n/HarmonicNumber[n]];
Array[A368372, 35] (* Paolo Xausa, Jan 29 2024 *)
-
a368372(n) = numerator((n+1)/2 - n/harmonic(n)) \\ Hugo Pfoertner, Jan 25 2024
-
from fractions import Fraction
from itertools import count, islice
def agen(): # generator of terms
A = H = 0
for n in count(1):
A += n
H += Fraction(1, n)
yield ((A*Fraction(1, n) - n/H)).numerator
print(list(islice(agen(), 30))) # Michael S. Branicky, Jan 24 2024
-
from fractions import Fraction
from sympy import harmonic
def A368372(n): return (Fraction(n+1,2)-Fraction(n,harmonic(n))).numerator # Chai Wah Wu, Jan 25 2024
Showing 1-2 of 2 results.
Comments