login
AGM transform of the primes.
4

%I #16 Jan 31 2024 13:09:23

%S 0,1,190,29761,9991618,3349024561,1787557230622,1073002497284641,

%T 913569251212186570,1211439486817121619201,1701996355944048723430570,

%U 3350440495714062711027347281,7769260076569386601943106748798,18992268581018658446853739996365841,54445901270324824915088660223022735282

%N AGM transform of the primes.

%C See A368366 for the definition of the AGM transform.

%H Paolo Xausa, <a href="/A369394/b369394.txt">Table of n, a(n) for n = 1..195</a>

%t A369394[n_] := With[{p = Prime[Range[n]]}, Total[p]^n - n^n*Apply[Times, p]];

%t Array[A369394, 15] (* _Paolo Xausa_, Jan 29 2024 *)

%o (PARI) a369394(n) = {my(v=primes(n)); vecsum(v)^n - n^n*vecprod(v)};

%o (Python)

%o from sympy import prime, primorial

%o def A369394(n): return sum(prime(i) for i in range(1,n+1))**n-n**n*primorial(n) # _Chai Wah Wu_, Jan 25 2024

%Y Cf. A368366.

%K nonn,easy

%O 1,3

%A _Hugo Pfoertner_, Jan 24 2024