A118262 Duplicate of A065484.
2, 2, 0, 3, 8, 5, 6, 5, 9, 6, 4, 3, 7, 8, 5, 9, 7, 8, 7, 8, 7, 2, 8, 2, 8, 3, 1, 6, 4, 8, 0, 0, 8, 9, 6
Offset: 1
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.
a(4) = 8 since phi(4) = 2 and 4 * 2 = 8. a(5) = 20 since phi(5) = 4 and 5 * 4 = 20.
a002618 n = a000010 n * n -- Reinhard Zumkeller, Dec 21 2012
[n*EulerPhi(n): n in [1..150]]; // Vincenzo Librandi, Apr 04 2011
with(numtheory):a:=n->phi(n^2): seq(a(n), n=1..50); # Zerinvary Lajos, Oct 07 2007
Table[n EulerPhi[n], {n, 100}] (* Artur Jasinski, Jan 22 2008 *)
numlib::phi(n^2)$ n=1..81 // Zerinvary Lajos, May 13 2008
a(n)=n*eulerphi(n) \\ Charles R Greathouse IV, Nov 20 2012
from sympy import totient as phi def a(n): return n*phi(n) print([a(n) for n in range(1, 51)]) # Michael S. Branicky, Mar 16 2022
[euler_phi(n^2) for n in range(1,51)] # Zerinvary Lajos, Jun 06 2009
G.f. = x + x^2 + 3*x^3 + 4*x^4 + 10*x^5 + 6*x^6 + 21*x^7 + 16*x^8 + 27*x^9 + ... a(12) = 1 + 5 + 7 + 11 = 24. n = 40: The smallest positive reduced residue system modulo 40 is {1, 3, 7, 9, 11, 13, 17, 19, 21, 23, 27, 29, 31, 33, 37, 39}. The sum is a(40) = 320. Average is 20.
a023896 = sum . a038566_row -- Reinhard Zumkeller, Mar 04 2012
[1] cat [n*EulerPhi(n)/2: n in [2..70]]; // Vincenzo Librandi, May 16 2015
A023896 := proc(n) if n = 1 then 1; else n*numtheory[phi](n)/2 ; end if; end proc: # R. J. Mathar, Sep 26 2013
a[ n_ ] = n/2*EulerPhi[ n ]; a[ 1 ] = 1; Table[a[n], {n, 56}] a[ n_] := If[ n < 2, Boole[n == 1], Sum[ k Boole[1 == GCD[n, k]], { k, n}]]; (* Michael Somos, Jul 08 2014 *)
{a(n) = if(n<2, n>0, n*eulerphi(n)/2)};
A023896(n)=n*eulerphi(n)\/2 \\ about 10% faster. - M. F. Hasler, Feb 01 2021
from sympy import totient def A023896(n): return 1 if n == 1 else n*totient(n)//2 # Chai Wah Wu, Apr 08 2022
def A023896(n): return 1 if n == 1 else n*euler_phi(n)//2 print([A023896(n) for n in range(1, 57)]) # Peter Luschny, Dec 03 2023
3.17045934214256636532648824888226302856125443631798948742143398...
digits = 98; B3 = EulerGamma - NSum[PrimeZetaP'[n], {n, 2, Infinity}, WorkingPrecision -> 2 digits, NSumTerms -> 200]; RealDigits[Log[2 Pi] + B3, 10, digits][[1]]
1.339784153574347246599152586514886052775...
$MaxExtraPrecision = 500; digits = 99; terms = 500; P[n_] := PrimeZetaP[n]; LR = Join[{0, 0, 0}, LinearRecurrence[{2, -1, -1, 1}, {3, 4, 5, 3}, terms + 10]]; r[n_Integer] := LR[[n]]; Exp[NSum[r[n]*P[n - 1]/(n - 1), {n, 3, terms}, NSumTerms -> terms, WorkingPrecision -> digits + 10]] // RealDigits[#, 10, digits]& // First (* Jean-François Alcover, Apr 18 2016 *)
prodeulerrat(1 + 1/(p^2*(p-1))) \\ Vaclav Kotesovec, Sep 19 2020
[DivisorSigma(1, NthPrime(n)-1): n in [1..60]]; // Vincenzo Librandi, Aug 20 2018
for i from 1 to 500 do if isprime(i) then print(sigma(i-1)); fi; od;
Table[DivisorSigma[1, Prime[n] - 1], {n, 80}] (* Vincenzo Librandi, Aug 20 2018 *)
a(n) = sigma(prime(n)-1); \\ Michel Marcus, Aug 19 2018
3.39064200557250391614259566300263079374053738121447169118...
$MaxExtraPrecision = 1000; f[p_] := (1 + p^2/((p - 1)^2*(p^2 - 1))); Do[cc = Rest[CoefficientList[Series[Log[f[1/x]], {x, 0, m}], x]]; Print[f[2] * Exp[N[Sum[Indexed[cc, n]*(PrimeZetaP[n] - 1/2^n), {n, 2, m}], 120]]], {m, 100, 1000, 100}] (* Vaclav Kotesovec, Jun 25 2020 *)
my(N=1000000000); prodeuler(p=2,N,1.+p^2/((p-1)^2*(p^2-1)))*(1+1/(N*log(N)))
prodeulerrat(1 + p^2/((p-1)^2*(p^2-1))) \\ Amiram Eldar, Mar 15 2021
2.476194748165025794326855444125145160045456856355284384345707879150949...
$MaxExtraPrecision = 1000; f[p_] := (1 + 1/((1 - 1/p)^s * (p^s - 1))) /. s -> 3; Do[cc = Rest[CoefficientList[Series[Log[f[1/x]], {x, 0, m}], x]]; Print[f[2] * Exp[N[Sum[Indexed[cc, n]*(PrimeZetaP[n] - 1/2^n), {n, 2, m}], 120]]], {m, 100, 1000, 100}]
prodeulerrat(1 + 1/((1 - 1/p)^3 * (p^3 - 1))) \\ Amiram Eldar, Mar 15 2021
0.5592286807124280424254343367039820674865653612424...
1 - prodeulerrat(1 + p/((p-1)^2*(p+1)))/5 \\ Amiram Eldar, Nov 11 2020
1.450032145362120831608395887189223422325062117447167...
$MaxExtraPrecision = 1000; m = 1000; c = LinearRecurrence[{-1, 1, 2, 0, -1}, {0, 2, -3, 6, -5}, m]; RealDigits[Exp[NSum[Indexed[c, n]*(PrimeZetaP[n])/n, {n, 2, m}, NSumTerms -> m, WorkingPrecision -> m]], 10, 100][[1]]
prodeulerrat(1 + p/((p-1)*(p+1)^2)) \\ Amiram Eldar, Mar 18 2021
Comments