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 19 results. Next

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

A053818 a(n) = Sum_{k=1..n, gcd(n,k) = 1} k^2.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Apr 07 2000

Keywords

Comments

Equals row sums of triangle A143612. - Gary W. Adamson, Aug 27 2008
a(n) = A175505(n) * A023896(n) / A175506(n). For number n >= 1 holds B(n) = a(n) / A023896(n) = A175505(n) / A175506(n), where B(n) = antiharmonic mean of numbers k such that GCD(k, n) = 1 for k < n. - Jaroslav Krizek, Aug 01 2010
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.

Crossrefs

Programs

  • Maple
    A053818 := proc(n)
        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 ;
    end proc: # R. J. Mathar, Sep 26 2013
  • 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 *)
  • 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

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.
a(n) = n^2*A000010(n)/3 + n*A023900(n)/6, n>1. [Brown]
a(n) = (A000010(n)/3) * (n^2 + (-1)^A001221(n)*A007947(n)/2) for n>=2. - Jaroslav Krizek, Aug 24 2010
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

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

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

Original entry on oeis.org

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

Views

Author

Jaroslav Krizek, Jul 30 2010, Jul 31 2010

Keywords

Comments

Subsequence of A179873 and A179874.
It appears that for n >= 3, (4*A005384(n)+1)/3 is a subsequence. - Hilko Koning, Jul 27 2018
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

Crossrefs

Programs

  • 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 *)
  • 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

Formula

a(n) = A175505(A179877(n)) / A175506(A179877(n)).
a(n) = A175505(A179878(n)) / A175506(A179878(n)).

Extensions

More terms from Michel Marcus, Jul 27 2018

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

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

A179875 Numbers h such that h and h+1 have same antiharmonic mean of the numbers k < h such that gcd(k, h) = 1.

Original entry on oeis.org

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

Views

Author

Jaroslav Krizek, Jul 30 2010, Jul 31 2010

Keywords

Comments

Corresponding values of numbers h+1 see A179876.
Numbers h such that A175505(h) = A175505(h+1).
numbers h such that A175506(h) = A175506(h+1).
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

Examples

			For n=3: a(3) = 10; B(10) = A175505(10) / A175506(10) = 7, B(11) = A175505(11) / A175506(11) = 7.
		

Crossrefs

A179876 Numbers h such that h and h-1 have same antiharmonic mean of the numbers k < h such that gcd(k, h) = 1.

Original entry on oeis.org

2, 7, 11, 23, 47, 59, 66, 70, 78, 83, 107, 130, 167, 179, 186, 195, 211, 222, 227, 238, 255, 263, 266, 310, 322, 331, 347, 359, 366, 383, 399, 418, 438, 455, 463, 467, 470, 474, 479, 483, 494, 498, 503
Offset: 1

Views

Author

Jaroslav Krizek, Jul 30 2010, Jul 31 2010

Keywords

Comments

Corresponding values of numbers h-1 see A179875.
Numbers h such that A175505(h) = A175505(h-1).
Numbers h such that A175506(h) = A175506(h-1).
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).

Examples

			For n=3: a(3) = 11; B(11) = A175505(11) / A175506(11) = 7, B(10) = A175505(10) / A175506(10) = 7.
		

Crossrefs

Programs

  • Maple
    antiHMeanGcd := proc(h)
            option remember;
            local a023896,a053818,k ;
            a023896 := 0 ;
            a053818 := 0 ;
            for k from 1 to h do
                    if igcd(k,h) = 1 then
                            a023896 := a023896+k ;
                            a053818 := a053818+k^2 ;
                    end if;
            end do:
            a053818/a023896 ;
    end proc:
    n := 1:
    for h from 2 do
            if antiHMeanGcd(h) = antiHMeanGcd(h-1) then
                    printf("%d %d\n",n,h) ;
                    n := n+1 ;
            end if;
    end do: # R. J. Mathar, Sep 26 2013
  • Mathematica
    hmax = 1000;
    antiHMeanGcd[h_] := antiHMeanGcd[h] = Module[{num = 0, den = 0, k}, For[k = 1, k <= h, k++, If[GCD[k, h] == 1, den += k; num += k^2]]; num/den];
    Reap[n = 1; For[h = 2, h <= hmax, h++, If[antiHMeanGcd[h] == antiHMeanGcd[h - 1], Sow[h]; n++]]][[2, 1]] (* Jean-François Alcover, Mar 23 2020, after R. J. Mathar *)

A179879 Numbers h such that h and h+1 have same antiharmonic mean of the numbers k < h such that gcd(k, h) = 1 and simultaneously this mean is not integer.

Original entry on oeis.org

6, 65, 69, 77, 129, 185, 194, 210, 221, 237, 254, 309, 321, 330, 365, 398, 417, 437, 462, 473, 482, 497, 533, 546, 554, 570, 573, 581, 597, 614, 626, 662, 669, 681, 690, 714, 753, 758, 785, 789, 794, 813, 858, 893, 905, 914, 966, 993, 1037, 1073, 1094, 1101, 1122
Offset: 1

Views

Author

Jaroslav Krizek, Jul 30 2010

Keywords

Comments

Subsequence of A179875 and A179883.
For corresponding values of numbers h+1 see A179880. - Jaroslav Krizek, Jul 31 2010

Crossrefs

Programs

  • PARI
    ah(n) = {my(f = factor(n)); if(n == 1, 1, 2*n/3 + (1/3) * prod(i = 1, #f~, 1 - f[i, 1])/eulerphi(f));}
    isok(k) = {my(ah1 = ah(k), ah2 = ah(k+1)); ah1 == ah2 && denominator(ah1) > 1;} \\ Amiram Eldar, May 24 2025

Formula

a(n) = A179880(n) - 1. - Jaroslav Krizek, Jul 31 2010

Extensions

a(36) corrected and more terms added by Amiram Eldar, May 24 2025
Showing 1-10 of 19 results. Next