Displaying 1-10 of 18 results found.
Nonprimes q such that antiharmonic mean B(q) of the numbers k < q such that gcd(k, q) = 1 is integer, where B(q) = A053818(q) / A023896(q) = A175505(q) / A175506(q).
+20
20
1, 10, 22, 34, 46, 55, 58, 82, 85, 91, 94, 106, 110, 115, 118, 133, 142, 145, 166, 170, 178, 182, 187, 202, 205, 214, 217, 226, 230, 235, 247, 253, 259, 262, 265, 266, 274, 290, 295, 298, 301, 319, 334, 346, 355, 358, 374, 382, 391, 394, 403, 410, 415, 427
EXAMPLE
a(6) = 55 because B(55) = A053818(55) / A023896(55) = 40700 / 1100 = 37 (integer).
MATHEMATICA
f[n_] := 2 Plus @@ (Select[ Range@n, GCD[ #, n] == 1 &]^2)/(n*EulerPhi@n); Select[ Range@ 433, ! PrimeQ@# && IntegerQ@ f@# &] (* Robert G. Wilson v, Aug 02 2010 *)
CROSSREFS
Cf. A179871, A179872, A179873, A179874, A179875, A179876, A179877, A179878, A179879, A179880, A179882, A179883, A179884, A179885, A179887, A179890, A179891.
Values of antiharmonic mean B(q) of the numbers k < q such that gcd(k, q) = 1 is integer for nonprimes q from A179887, where B(q) = A053818(q) / A023896(q) = A175505(q) / A175506(q).
+20
20
1, 7, 15, 23, 31, 37, 39, 55, 57, 61, 63, 71, 73, 77, 79, 89, 95, 97, 111, 113, 119, 121, 125, 135, 137, 143, 145, 151, 153, 157, 165, 169, 173, 175, 177, 177, 183
CROSSREFS
Cf. A179871, A179872, A179873, A179874, A179875, A179876, A179877, A179878, A179879, A179880, A179882, A179883, A179884, A179885, A179886, A179887, A179890, A179891.
6, 7, 65, 66, 69, 70, 77, 78, 129, 130, 185, 186, 194, 195, 210, 211, 221, 222, 237, 238, 254, 255, 309, 310, 321, 322, 330, 331, 365, 366, 398, 399, 417, 418, 437, 438, 462, 463, 473, 474, 482, 483, 497, 498
CROSSREFS
Cf. A179871, A179872, A179873, A179874, A179875, A179876, A179877, A179878, A179879, A179880, A179882, A179883, A179884, A179886, A179887, A179890, A179891.
Sum of positive integers in smallest positive reduced residue system modulo n. a(1) = 1 by convention.
+10
92
1, 1, 3, 4, 10, 6, 21, 16, 27, 20, 55, 24, 78, 42, 60, 64, 136, 54, 171, 80, 126, 110, 253, 96, 250, 156, 243, 168, 406, 120, 465, 256, 330, 272, 420, 216, 666, 342, 468, 320, 820, 252, 903, 440, 540, 506, 1081, 384, 1029, 500, 816, 624, 1378, 486, 1100, 672
COMMENTS
Sum of totatives of n, i.e., sum of integers up to n and coprime to n.
a(1) = 1, since 1 is coprime to any positive integer.
Islam & Manzoor prove that a(n) is an injection for n > 1, see links. In other words, if a(m) = a(n), and min(m, n) > 1, then m = n. - Muhammed Hedayet, May 19 2024
REFERENCES
Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 48, problem 16, the function phi_1(n).
David M. Burton, Elementary Number Theory, p. 171.
James J. Tattersall, Elementary Number Theory in Nine Chapters, Cambridge University Press, 2001, p. 163.
J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, p. 111.
FORMULA
a(n) = phi(n^2)/2 = n*phi(n)/2 = A002618(n)/2 if n > 1, a(1)=1. See the Apostol reference for this exercise.
a(n) = Sum_{1 <= k < n, gcd(k, n) = 1} k.
If m,n > 1 and gcd(m,n) = 1 then a(m*n) = 2*a(m)*a(n). - Thomas Ordowski, Nov 09 2014
G.f. A(x) satisfies A(x) = x/(1 - x)^3 - Sum_{k>=2} k * A(x^k). - Ilya Gutkovskiy, Sep 06 2019
EXAMPLE
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.
MAPLE
if n = 1 then
1;
else
n*numtheory[phi](n)/2 ;
end if;
MATHEMATICA
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 *)
PROG
(PARI) {a(n) = if(n<2, n>0, n*eulerphi(n)/2)};
(Haskell)
(Python)
from sympy import totient
(SageMath)
def A023896(n): return 1 if n == 1 else n*euler_phi(n)//2
EXTENSIONS
Typos in programs corrected by Zak Seidov, Aug 03 2010
Generalized cuban primes: primes of the form x^2 + xy + y^2; or primes of the form x^2 + 3*y^2; or primes == 0 or 1 (mod 3).
(Formerly M2637)
+10
88
3, 7, 13, 19, 31, 37, 43, 61, 67, 73, 79, 97, 103, 109, 127, 139, 151, 157, 163, 181, 193, 199, 211, 223, 229, 241, 271, 277, 283, 307, 313, 331, 337, 349, 367, 373, 379, 397, 409, 421, 433, 439, 457, 463, 487, 499, 523, 541, 547, 571, 577, 601, 607, 613
COMMENTS
Also, odd primes p such that -3 is a square mod p. - N. J. A. Sloane, Dec 25 2017
Equivalently, primes of the form p = (x^3 - y^3)/(x - y). If x=y+1 we get the cuban primes A002407, which is therefore a subsequence.
These are not to be confused with the Eisenstein primes, which are the primes in the ring of integers Z[w], where w = (-1+sqrt(-3))/2. The present sequence gives the rational primes which are also Eisenstein primes. - N. J. A. Sloane, Feb 06 2008
Also primes of the form x^2+3y^2 and, except for 3, x^2+xy+7y^2. See A140633. - T. D. Noe, May 19 2008
Primes p such that antiharmonic mean B(p) of the numbers k < p such that gcd(k, p) = 1 is not integer, where B(p) = A053818(p) / A023896(p) = A175505(p) / A175506(p) = (2p - 1) / 3. Primes p such that A175506(p) > 1. Subsequence of A179872. Union a(n) + A179891 = A179872. Example: a(6) = 37 because B(37) = A053818(37) / A023896(37) = A175505(37) / A175506(37) = 16206 / 666 = 73 / 3 (not integer). Cf. A179871, A179872, A179873, A179874, A179875, A179876, A179877, A179878, A179879, A179880, A179882, A179883, A179884, A179885, A179886, A179887, A179890, A179891, A003627, A034934. - Jaroslav Krizek, Aug 01 2010
Primes such that there exist a unique x, y, with 1 < x <= y < p, x + y == 1 (mod p) and x * y == 1 (mod p). - Jon Perry, Feb 02 2014
This sequence gives the primes p which solve s^2 == -3 (mod 4*p) (see Buell, Proposition 4.1., p. 50, for Delta = -3). p = 2 is not a solution. x^2 == -3 (mod 4) has solutions for all odd x. x^2 == -3 (mod p) has for odd primes p, not 3, the solutions of Legendre(-3|p) = +1 which are p == {1, 7} (mod 12). For p = 3 the representative solution is x = 0. Hence the solution of s^2 == -3 (mod 4*p) are the odd primes p = 3 and p == {1, 7} (mod 12) (or the primes p = 0, 1 (mod 3)). - Wolfdieter Lang, May 22 2021
REFERENCES
D. A. Buell, Binary Quadratic Forms. Springer-Verlag, NY, 1989, p. 50.
Conway, J. H. and Guy, R. K. The Book of Numbers. New York: Springer-Verlag, pp. 220-223, 1996.
David A. Cox, "Primes of the Form x^2 + n y^2", Wiley, 1989, p. 7.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Wagon, S. "Eisenstein Primes." Section 9.8 in Mathematica in Action. New York: W. H. Freeman, pp. 319-323, 1991.
MAPLE
select(isprime, [3, seq(6*k+1, k=1..1000)]); # Robert Israel, Dec 12 2014
MATHEMATICA
Join[{3}, Select[Prime[Range[150]], Mod[#, 3]==1&]] (* Harvey P. Dale, Aug 21 2021 *)
PROG
(Haskell)
a007645 n = a007645_list !! (n-1)
a007645_list = filter ((== 1) . a010051) $ tail a003136_list
CROSSREFS
Apart from initial term, same as A045331.
a(n) = Sum_{k=1..n, gcd(n,k) = 1} k^2.
+10
33
1, 1, 5, 10, 30, 26, 91, 84, 159, 140, 385, 196, 650, 406, 620, 680, 1496, 654, 2109, 1080, 1806, 1650, 3795, 1544, 4150, 2756, 4365, 3164, 7714, 2360, 9455, 5456, 7370, 6256, 9940, 5196, 16206, 8778, 12324, 8560, 22140, 6972, 25585
COMMENTS
n does not divide a(n) iff n is a term in A316860, that is, either n is a power of 2 or n is a multiple of 3 and no prime factor of n is congruent to 1 mod 3. - Jianing Song, Jul 16 2018
REFERENCES
Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, page 48, problem 15, the function phi_2(n).
Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 199, #2.
FORMULA
If n = p_1^e_1 * ... *p_r^e_r then a(n) = n^2*phi(n)/3 + (-1)^r*p_1*..._p_r*phi(n)/6.
G.f. A(x) satisfies: A(x) = x*(1 + x)/(1 - x)^4 - Sum_{k>=2} k^2 * A(x^k). - Ilya Gutkovskiy, Mar 29 2020
Sum_{k=1..n} a(k) ~ n^4 / (2*Pi^2). - Amiram Eldar, Dec 03 2023
MAPLE
local a, k;
a := 0 ;
for k from 1 to n do
if igcd(k, n) = 1 then
a := a+k^2 ;
end if;
end do:
a ;
MATHEMATICA
a[n_] := Plus @@ (Select[ Range@n, GCD[ #, n] == 1 &]^2); Array[a, 43] (* Robert G. Wilson v, Jul 01 2010 *)
a[1] = 1; a[n_] := Module[{f = FactorInteger[n], p, e}, p = f[[;; , 1]]; e = f[[;; , 2]]; (n^2/3) * Times @@ ((p - 1)*p^(e - 1)) + (n/6) * Times @@ (1 - p)]; Array[a, 100] (* Amiram Eldar, Dec 03 2023 *)
PROG
(PARI) a(n) = sum(k=1, n, k^2*(gcd(n, k) == 1)); \\ Michel Marcus, Jan 30 2016
(PARI) a(n) = {my(f = factor(n)); if(n == 1, 1, (n^2/3) * eulerphi(f) + (n/6) * prod(i = 1, #f~, 1 - f[i, 1])); } \\ Amiram Eldar, Dec 03 2023
Numbers h such that antiharmonic mean B(h) of the numbers k < h such that gcd(k, h) = 1 is integer.
+10
22
1, 2, 5, 10, 11, 17, 22, 23, 29, 34, 41, 46, 47, 53, 55, 58, 59, 71, 82, 83, 85, 89, 91, 94, 101, 106, 107, 110, 113, 115, 118, 131, 133, 137, 142, 145, 149, 166, 167, 170, 173, 178, 179, 182, 187, 191, 197, 202, 205, 214
EXAMPLE
Example: a(9) = 29 because B(29) = A053818(29) / A023896(29) = 7714/406 = 19 (integer).
MATHEMATICA
B[n_] := Plus @@ ((ks = Select[Range[n], GCD[n, #] == 1 &])^2)/Plus @@ ks; Select[Range[215], IntegerQ[B[#]] &] (* Ivan Neretin, May 22 2015 *)
CROSSREFS
Cf. A179872, A179873, A179874, A179875, A179876, A179877, A179878, A179879, A179880, A179882, A179883, A179884, A179885, A179886, A179887, A179890, A179891.
a(n) is the corresponding value of contraharmonic mean B(h) of numbers k such that gcd(k, h) = 1 (k < h) for numbers h from A179877(n) and A179878(n).
+10
21
1, 7, 15, 31, 39, 55, 71, 111, 119, 151, 175, 177, 231, 239, 255, 303, 311, 313, 319, 329, 335, 337, 345, 375, 391, 393, 479, 521, 559, 575, 591, 593, 601, 607, 623, 655, 657, 679, 777, 785, 791, 823, 855, 863, 871, 879, 889, 905, 911, 929, 937, 959, 961, 991
COMMENTS
This happens for this subsequence of A179877: 10, 22, 46, 58, 82, 106, 166, 178, ... apparently "Semiprimes of form prime - 1" >= 10 (see A077065). - Michel Marcus, Jul 27 2018
MATHEMATICA
{1}~Join~Select[Partition[Table[ContraharmonicMean@ Select[Range[n - 1], GCD[#, n] == 1 &], {n, 2, 1500}], 2, 1], And[IntegerQ@ First@ #, SameQ @@ #] &][[All, 1]] (* Michael De Vlieger, Jul 30 2018 *)
PROG
(PARI) lista(nn) = {vch = vector(nn, k, ch(k)); for (i=1, nn-1, if ((vch[i] == vch[i+1]) && !frac(vch[i]), print1(vch[i], ", ")); ); } \\ Michel Marcus, Jul 27 2018
CROSSREFS
Cf. A179871, A179872, A179873, A179874, A179875, A179876, A179877, A179878, A179879, A179880, A179883, A179884, A179885, A179886, A179887, A179890, A179891.
Composites h such that antiharmonic mean B(h) of the numbers k < h such that gcd(k, h) = 1 is not integer.
+10
21
4, 6, 8, 9, 12, 14, 15, 16, 18, 20, 21, 24, 25, 26, 27, 28, 30, 32, 33, 35, 36, 38, 39, 40, 42, 44, 45, 48, 49, 50, 51, 52, 54, 56, 57, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 84, 86, 87, 88, 90, 92, 93, 95, 96, 98, 99, 100, 102, 104, 105, 108, 111
EXAMPLE
a(6) = 14 because B(14) = A053818(14) / A023896(14) = 406/42 = 29/3 (not integer).
MATHEMATICA
f[n_] := 2 Plus @@ (Select[ Range@n, GCD[ #, n] == 1 &]^2)/(n*EulerPhi@n); Select[ Range@ 111, ! PrimeQ@# && ! IntegerQ@f@# &] (* Robert G. Wilson v, Aug 02 2010 *)
CROSSREFS
Cf. A179871, A179872, A179873, A179874, A179875, A179876, A179877, A179878, A179879, A179880, A179882, A179883, A179884, A179885, A179886, A179887, A179890.
Numbers h such that h and h+1 have same antiharmonic mean of the numbers k < h such that gcd(k, h) = 1.
+10
19
1, 6, 10, 22, 46, 58, 65, 69, 77, 82, 106, 129, 166, 178, 185, 194, 210, 221, 226, 237, 254, 262, 265, 309, 321, 330, 346, 358, 365, 382, 398, 417, 437, 454, 462, 466, 469, 473, 478, 482, 493, 497, 502
COMMENTS
Corresponding values of numbers h+1 see A179876.
Antiharmonic mean B(h) of numbers k such that gcd(k, h) = 1 for numbers h >= 1 and k < h = A053818(n) / A023896(n) = A175505(h) / A175506(h).
Conjecture: also numbers k such that mu(k) = 1 and mu(k+1) = -1, where mu is the Möbius function (tested on the first 10^4 terms). - Amiram Eldar, Mar 06 2021
CROSSREFS
Cf. A179871, A179872, A179873, A179874, A179876, A179877, A179878, A179879, A179880, A179882, A179883, A179884, A179885, A179886, A179887, A179890, A179891.
Search completed in 0.014 seconds
|