A263319 a(n) = pi(n^2)*phi(n)/2, where pi(x) denotes the number of primes not exceeding x, and phi(.) is Euler's totient function given by A000010.
0, 1, 4, 6, 18, 11, 45, 36, 66, 50, 150, 68, 234, 132, 192, 216, 488, 198, 648, 312, 510, 460, 1089, 420, 1140, 732, 1161, 822, 2044, 616, 2430, 1376, 1810, 1528, 2400, 1260, 3942, 2052, 2880, 2008, 5260, 1644, 5943, 2950, 3672, 3509, 7567, 2736, 7497, 3670
Offset: 1
Keywords
Examples
a(1) = 0 since pi(1^2)*phi(1)/2 = 0*1/2 = 0. a(2) = 1 since pi(2^2)*phi(2)/2 = 2*1/2 = 1. a(3) = 4 since pi(3^2)*phi(3)/2 = 4*2/2 = 4.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[#PrimesUpTo(n^2)*EulerPhi(n)/2: n in [1..80]]; // Vincenzo Librandi, Oct 15 2015
-
Mathematica
a[n_]:=a[n]=PrimePi[n^2]*EulerPhi[n]/2 Do[Print[n," ",a[n]],{n,1,50}]
-
PARI
a(n) = primepi(n^2)*eulerphi(n)/2; \\ Michel Marcus, Oct 15 2015
Comments