cp's OEIS Frontend

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.

Showing 1-10 of 32 results. Next

A179887 Nonprimes q such that antiharmonic mean B(q) of the numbers k < q such that gcd(k, q) = 1 is an integer, where B(q) = A053818(q) / A023896(q) = A175505(q) / A175506(q).

Original entry on oeis.org

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
Offset: 1

Views

Author

Jaroslav Krizek, Jul 30 2010, Jul 31 2010

Keywords

Comments

Nonprimes q such that A175506(q) = 1.
Subsequence of A179871.
A179871 is the union of this sequence and A003627.
Corresponding values of B(q) in A179890.

Examples

			a(6) = 55 because B(55) = A053818(55) / A023896(55) = 40700 / 1100 = 37 (integer).
		

Crossrefs

Programs

  • 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 *)
  • PARI
    isok(k) = if(isprime(k), 0, my(f = factor(k)); if(k == 1, 1, denominator(2*k/3 + (1/3) * prod(i = 1, #f~, 1 - f[i, 1])/eulerphi(f)) == 1)); \\ Amiram Eldar, May 26 2025

Extensions

More terms from Robert G. Wilson v, Aug 02 2010

A179890 Values of antiharmonic mean B(q) of the numbers k < q such that gcd(k, q) = 1 is an integer for nonprimes q from A179887, where B(q) = A053818(q) / A023896(q) = A175505(q) / A175506(q).

Original entry on oeis.org

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, 193, 197, 199, 201, 213, 223, 231, 237, 239, 249, 255, 261, 263, 269, 273, 277, 285, 289, 297, 301, 303, 303
Offset: 1

Views

Author

Jaroslav Krizek, Jul 30 2010, Jul 31 2010

Keywords

Examples

			a(6) = 37 because for A179887(6) = 55 holds: B(55) = A053818(55)/A023896(55) = 40700/1100 = 37.
		

Crossrefs

Programs

  • PARI
    list(lim) = print1(1, ", "); for(k = 2, lim, if(!isprime(k), my(f = factor(k), b = 2*k/3 + (1/3) * prod(i = 1, #f~, 1 - f[i, 1])/eulerphi(f)); if(denominator(b) == 1, print1(b, ", ")))); \\ Amiram Eldar, May 26 2025

Extensions

Incorrect formula removed by Amiram Eldar, May 26 2025

A175505 Numerator of A053818(n)/A023896(n) = antiharmonic mean of numbers k such that gcd(k,n) = 1, 1 <= k < n.

Original entry on oeis.org

1, 1, 5, 5, 3, 13, 13, 21, 53, 7, 7, 49, 25, 29, 31, 85, 11, 109, 37, 27, 43, 15, 15, 193, 83, 53, 485, 113, 19, 59, 61, 341, 67, 23, 71, 433, 73, 77, 79, 107, 27, 83, 85, 59, 271, 31, 31, 769, 685, 167, 103, 209, 35, 973, 37, 449, 115, 39, 39, 239, 121, 125, 379, 1365
Offset: 1

Views

Author

Jaroslav Krizek, May 31 2010, Jun 01 2010

Keywords

Comments

See A175506 - denominators of the antiharmonic means B of numbers k such that gcd(k, n) = 1 for numbers n >= 1 and k < n where B = A053818(n) / A023896(n) = a(n) / A175506(n).

Crossrefs

Cf. A023896, A053818, A175506 (denominators).

Programs

  • Maple
    antiHMean := proc(L)
        add(i^2,i=L)/add(i,i=L) ;
    end proc:
    A175505 := proc(n)
        local kset,k ;
        kset := [1] ;
        for k from 2 to n do
            if igcd(k,n) = 1 then
                kset := [op(kset),k] ;
            end if;
        end do:
        antiHMean(kset) ;
        numer(%) ;
    end proc: # R. J. Mathar, Sep 26 2013
  • Mathematica
    f[n_] := 2Plus @@ (Select[ Range@n, GCD[ #, n] == 1 &]^2)/(n*EulerPhi@n); f[1] = 1; Numerator@Array[f, 65] (* Robert G. Wilson v, Jul 01 2010 *)
  • PARI
    A175505(n)=numerator((2*n+(-1)^omega(n)*A007947(n)/n)/3) \\ M. F. Hasler, Nov 29 2010
    
  • PARI
    a(n) = {my(f = factor(n)); numerator(if(n == 1, 1, 2*n/3 + (1/3) * prod(i = 1, #f~, 1 - f[i, 1])/eulerphi(f)));} \\ Amiram Eldar, Dec 07 2023

Formula

a(n) = A053818(n) * A175506(n) / A023896(n).
Sum_{k=1..n} a(k)/A175506(k) ~ n^2/3. - Amiram Eldar, Dec 07 2023

Extensions

More terms from Robert G. Wilson v, Jul 01 2010

A179885 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).

Original entry on oeis.org

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, 533, 534, 546, 547, 554, 555, 570, 571, 573, 574, 581
Offset: 1

Views

Author

Jaroslav Krizek, Jul 30 2010, Jul 31 2010

Keywords

Crossrefs

Formula

a(2*n-1) = A179879(n), a(2*n) = A179880(n) = A179879(n) + 1. - Amiram Eldar, May 26 2025

Extensions

More terms from Amiram Eldar, May 26 2025

A316860 Integers k that do not divide A053818(k).

Original entry on oeis.org

2, 3, 4, 6, 8, 9, 12, 15, 16, 18, 24, 27, 30, 32, 33, 36, 45, 48, 51, 54, 60, 64, 66, 69, 72, 75, 81, 87, 90, 96, 99, 102, 108, 120, 123, 128, 132, 135, 138, 141, 144, 150, 153, 159, 162, 165, 174, 177, 180, 192, 198, 204, 207, 213, 216, 225, 240, 243, 246, 249
Offset: 1

Views

Author

Jianing Song, Jul 15 2018

Keywords

Comments

k is a term iff k = 2^e or k = 3^e*Product_{i=1..s} p_i^e_i, p_i == 2 (mod 3) and e >= 1. If k = 2^e, A053818(k) == (1/2)*k (mod k); if k = 3^e*Product_{i=1..s} p_i^e_i, A053818(k) == (2/3)*k for even s and (1/3)*k for odd s. - Corrected by Robert Israel, Nov 15 2020
Terms < N are getting more and more sparse as N increases. The number of terms below 100, 1000, 10000 and 100000 are 31, 187, 1431 and 12059, respectively.

Examples

			A053818(16) mod 16 = 680 mod 16 = 8 != 0, so 16 is a term.
A053818(33) mod 33 = 7370 mod 33 = 11 != 0, so 33 is a term.
A053818(21) mod 21 = 1806 mod 21 = 0, so 21 is not a term.
		

Crossrefs

Cf. A053818.

Programs

  • Mathematica
    Select[Range@ 250, Function[n, Mod[Total[Select[Range@ n, GCD[#, n] == 1 &]^2], n] != 0]] (* Michael De Vlieger, Jul 19 2018 *)
  • PARI
    pr(n)=my(f=factor(n)[, 1]); prod(i=1, #f, abs(f[i]%3-1));
    for(n=2, 1000, if(omega(2*n)==1, print1(n, ", "), if(n%3==0&&pr(n), print1(n, ", "))))

A351910 Numbers k >= 1 such that A053818(k) divided by A000010(k) is an integer.

Original entry on oeis.org

1, 2, 4, 6, 8, 10, 12, 16, 18, 20, 22, 24, 30, 32, 34, 36, 40, 42, 44, 46, 48, 50, 54, 58, 60, 64, 66, 68, 72, 78, 80, 82, 84, 88, 90, 92, 94, 96, 100, 102, 106, 108, 110, 114, 116, 118, 120, 126, 128, 132, 136, 138, 142, 144, 150, 156, 160, 162, 164, 166, 168, 170
Offset: 1

Views

Author

Ctibor O. Zizka, Feb 25 2022

Keywords

Comments

Also numbers k >= 1 such that the mean square of the Euler set of k is an integer.
Also numbers k >= 1 such that Sum_{i=1..k, gcd(k,i) = 1} i^2 is a multiple of phi(k), where phi is Euler's totient function.

Examples

			k = 40: A053818(40) = 8560, A000010(40) = 16, 8560/16 = 535 thus 40 is a term.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := -p^(1 - e); q[1] = True; q[n_] := IntegerQ[n * Times @@ f @@@ FactorInteger[n]/6 + n^2/3]; Select[Range[160], q] (* Amiram Eldar, Feb 25 2022, based on Brown's formula at A053818 *)
  • PARI
    isok(m) = denominator(sum(k=1, m, k^2*(gcd(m, k) == 1))/eulerphi(m)) == 1; \\ Michel Marcus, Feb 25 2022

A023896 Sum of positive integers in smallest positive reduced residue system modulo n. a(1) = 1 by convention.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

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.
Row sums of A038566. - Wolfdieter Lang, May 03 2015
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

Examples

			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.
		

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.

Crossrefs

Programs

  • Haskell
    a023896 = sum . a038566_row  -- Reinhard Zumkeller, Mar 04 2012
    
  • Magma
    [1] cat [n*EulerPhi(n)/2: n in [2..70]]; // Vincenzo Librandi, May 16 2015
    
  • Maple
    A023896 := proc(n)
        if n = 1 then
            1;
        else
            n*numtheory[phi](n)/2 ;
        end if;
    end proc: # R. J. Mathar, Sep 26 2013
  • 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 *)
  • PARI
    {a(n) = if(n<2, n>0, n*eulerphi(n)/2)};
    
  • PARI
    A023896(n)=n*eulerphi(n)\/2 \\ about 10% faster. - M. F. Hasler, Feb 01 2021
    
  • Python
    from sympy import totient
    def A023896(n): return 1 if n == 1 else n*totient(n)//2 # Chai Wah Wu, Apr 08 2022
    
  • SageMath
    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

Formula

a(n) = n*A023022(n) for n > 2.
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 n = p is a prime, a(p) = T(p-1) where T(k) is the k-th triangular number (A000217). - Robert G. Wilson v, Jul 31 2004
Equals A054521 * [1,2,3,...]. - Gary W. Adamson, May 20 2007
a(n) = A053818(n) * A175506(n) / A175505(n). - Jaroslav Krizek, Aug 01 2010
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.: Sum_{n>=1} mu(n)*n*x^n/(1-x^n)^3, where mu(n) = A008683(n). - Mamuka Jibladze, Apr 24 2015
G.f. A(x) satisfies A(x) = x/(1 - x)^3 - Sum_{k>=2} k * A(x^k). - Ilya Gutkovskiy, Sep 06 2019
For n > 1: a(n) = (n*A076512(n)/2)*A009195(n). - Jamie Morken, Dec 16 2019
Sum_{n>=1} 1/a(n) = 2 * A065484 - 1 = 3.407713... . - Amiram Eldar, Oct 09 2023

Extensions

Typos in programs corrected by Zak Seidov, Aug 03 2010
Name and example edited by Wolfdieter Lang, May 03 2015

A007645 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).

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

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
Conjecture: this sequence is Union(A002383,A162471). - Daniel Tisdale, Jul 04 2009
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
Subsequence of Loeschian numbers, cf. A003136 and A024614; A088534(a(n)) > 0. - Reinhard Zumkeller, Oct 30 2011
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
The prime factors of A002061. - Richard R. Forberg, Dec 10 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.

Crossrefs

Subsequence of A003136.
Subsequences include A002407, A002648, and A201477.
Apart from initial term, same as A045331.
Cf. A001479, A001480 (x and y such that a(n) = x^2 + 3y^2).
Primes in A003136 and A034017.

Programs

  • Haskell
    a007645 n = a007645_list !! (n-1)
    a007645_list = filter ((== 1) . a010051) $ tail a003136_list
    -- Reinhard Zumkeller, Jul 11 2013, Oct 30 2011
  • 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 *)
  • PARI
    forprime(p=2,1e3,if(p%3<2,print1(p", "))) \\ Charles R Greathouse IV, Jun 16 2011
    

Formula

p == 0 or 1 (mod 3).
{3} UNION A002476. - R. J. Mathar, Oct 28 2008

Extensions

Entry revised by N. J. A. Sloane, Jan 29 2013

A179871 Numbers h such that antiharmonic mean B(h) of the numbers k < h such that gcd(k, h) = 1 is an integer.

Original entry on oeis.org

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
Offset: 1

Views

Author

Jaroslav Krizek, Jul 30 2010, Jul 31 2010

Keywords

Comments

Numbers h such that B(h) = A053818(h) / A023896(h) = A175505(h) / A175506(h) is an integer.
Numbers h such that A175506(h) = 1.
Complement of A179872.
See A179873 (odd positive integers) for corresponding values A175505(a(n)).
Union of A003627 (primes of form 3n-1) and A179887.

Examples

			a(9) = 29 because B(29) = A053818(29) / A023896(29) = 7714/406 = 19 (integer).
		

Crossrefs

Programs

  • Mathematica
    B[n_] := Plus @@ ((ks = Select[Range[n], GCD[n, #] == 1 &])^2)/Plus @@ ks; Select[Range[215], IntegerQ[B[#]] &] (* Ivan Neretin, May 22 2015 *)
  • PARI
    isok(k) = {my(f = factor(k)); if(k == 1, 1, denominator(2*k/3 + (1/3) * prod(i = 1, #f~, 1 - f[i, 1])/eulerphi(f)) == 1);} \\ Amiram Eldar, May 24 2025

A179891 Composites h such that antiharmonic mean B(h) of the numbers k < h such that gcd(k, h) = 1 is not integer.

Original entry on oeis.org

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
Offset: 1

Views

Author

Jaroslav Krizek, Jul 30 2010

Keywords

Comments

Composites h such that B(h) = A053818(h) / A023896(h) = A175505(h) / A175506(h) is not integer.
Composites h such that A175506(h) > 1.
Subsequence of A179872.
A179872 is the union of this sequence and A007645.

Examples

			a(6) = 14 because B(14) = A053818(14) / A023896(14) = 406/42 = 29/3 (not integer).
		

Crossrefs

Programs

  • 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 *)
  • PARI
    isok(k) = if(isprime(k), 0, my(f = factor(k)); if(k == 1, 0, denominator(2*k/3 + (1/3) * prod(i = 1, #f~, 1 - f[i, 1])/eulerphi(f)) > 1)); \\ Amiram Eldar, May 25 2025

Extensions

More terms from Robert G. Wilson v, Aug 02 2010
Showing 1-10 of 32 results. Next