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 92 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

A340179 a(n) = Sum_{x in C(n)} (A023896(n) mod x), where C(n) is the set of numbers < n coprime to n, and A023896(n) is the sum of C(n).

Original entry on oeis.org

0, 0, 1, 1, 3, 1, 6, 4, 15, 10, 25, 9, 33, 20, 25, 32, 49, 24, 56, 34, 68, 48, 98, 35, 152, 54, 100, 89, 180, 30, 178, 91, 146, 146, 150, 115, 314, 160, 220, 166, 315, 120, 306, 211, 267, 254, 412, 196, 485, 224, 383, 339, 600, 243, 609, 306, 481, 419, 801, 215, 859, 490, 577, 567, 782, 297, 865
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Dec 30 2020

Keywords

Examples

			For n=8, C = {1,3,5,7}, c = 1+3+5+7 = 16, and a(n) = (16 mod 1) + (16 mod 3) + (16 mod 5) + (16 mod 7) = 0+1+1+2 = 4.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local C,s,c;
      C:=select(t -> igcd(t,n) = 1, [$1..n-1]);
      s:= convert(C,`+`);
      add(s mod c, c = C)
    end proc:
    map(f, [$1..100]);
  • Mathematica
    Table[Total@ Mod[#2, #1] & @@ {#, Total@ #} &@ Select[Range[n], GCD[#, n] == 1 &], {n, 67}] (* Michael De Vlieger, Dec 31 2020 *)
  • PARI
    apply( {A340179(n,s=n*eulerphi(n)\/2)=sum(k=2,n-1,if(gcd(n,k)<2,s%k))}, [1..66]) \\ M. F. Hasler, Feb 01 2021

A083266 Sum of related numbers (counted in A073757) belonging to n: a(n) = A000203(n) + A023896(n) - 1; related = {divisor-set, RRS}.

Original entry on oeis.org

1, 3, 6, 10, 15, 17, 28, 30, 39, 37, 66, 51, 91, 65, 83, 94, 153, 92, 190, 121, 157, 145, 276, 155, 280, 197, 282, 223, 435, 191, 496, 318, 377, 325, 467, 306, 703, 401, 523, 409, 861, 347, 946, 523, 617, 577, 1128, 507, 1085, 592, 887, 721, 1431, 605, 1171
Offset: 1

Views

Author

Labos Elemer, May 13 2003

Keywords

Comments

Sum of 1 <= m <= n such that gcd(m, n) is either 1 or m. - Michael De Vlieger, Apr 07 2021.

Examples

			n=10: related terms = {1,2,5,10,3,7,9}, sum = 1+2+5+10+1+3+7+9-1 = 37 = a(10).
		

Crossrefs

Cf. A073757 (count), A083267 (product), A083268 (lcm).

Programs

  • Mathematica
    Table[DivisorSigma[1, n] + Total@ Select[Range[2, n - 1], GCD[n, #] == 1 &], {n, 55}] (* or *)
    {1}~Join~Array[DivisorSigma[1, #] + # EulerPhi[#]/2 - 1 &, 54, 2] (* Michael De Vlieger, Apr 07 2021 *)
  • PARI
    a(n)=if(n>1,sigma(n)+n*eulerphi(n)/2-1,1) \\ Charles R Greathouse IV, Feb 19 2013

A248003 a(n) = (sum of totatives of n ) / (2^(omega(n)-1)); a(n) = A023896(n) / A007875(n).

Original entry on oeis.org

1, 1, 3, 4, 10, 3, 21, 16, 27, 10, 55, 12, 78, 21, 30, 64, 136, 27, 171, 40, 63, 55, 253, 48, 250, 78, 243, 84, 406, 30, 465, 256, 165, 136, 210, 108, 666, 171, 234, 160, 820, 63, 903, 220, 270, 253, 1081, 192, 1029, 250, 408, 312, 1378, 243, 550, 336
Offset: 1

Views

Author

Jaroslav Krizek, Sep 29 2014

Keywords

Examples

			For n=30; a(30) = A023896(30)/A007875(30) = 120/4 = 30.
		

Crossrefs

Programs

  • Magma
    [(n*EulerPhi(n)/2)/(2^((#(PrimeDivisors(n)))-1)): n in [1..100]]
    
  • Mathematica
    Table[n*EulerPhi[n]/2^PrimeNu[n], {n,60}] (* G. C. Greubel, May 22 2017 *)
  • PARI
    A248003(n) = n*eulerphi(n)/2^omega(n); \\ G. C. Greubel, May 22 2017; Jul 13 2024
    
  • SageMath
    def A248003(n): return int(n*euler_phi(n)/2^(gp.omega(n)))
    [A248003(n) for n in range(1,61)] # G. C. Greubel, Jul 13 2024

Formula

a(n) = A023896(n)/A007875(n) = A023896(n)/2^(A001221(n)-1).
a(n) = (n/2)*A000010(n)/2^(A001221(n)-1) = n*A023022(n)/A007875(n).
a(n) = 2*A023896(n)/A034444(n) = n*A000010(n)/A034444(n).
a(n) is multiplicative with a(p^e) = (p-1)*p^(2e-1)/2.
Sum_{k>=1} 1/a(k) = Product_{primes p} (1 + 2*p/((p-1)^2 * (p+1))) = 3.96555686901754604330173765246769123681199917183404752314230450571038281... - Vaclav Kotesovec, Sep 20 2020

A280246 a(n) = Product_{d|n} psi(d), where psi(m) is the sum of totatives of m (A023896).

Original entry on oeis.org

1, 1, 3, 4, 10, 18, 21, 64, 81, 200, 55, 1728, 78, 882, 1800, 4096, 136, 26244, 171, 64000, 7938, 6050, 253, 2654208, 2500, 12168, 19683, 592704, 406, 25920000, 465, 1048576, 54450, 36992, 88200, 544195584, 666, 58482, 109512, 327680000, 820, 504094752, 903
Offset: 1

Views

Author

Jaroslav Krizek, Dec 30 2016

Keywords

Comments

a(n) = n only for n = 1, 3 and 4.
n divides a(n) for all n except 2.
Conjecture: a(n) is odd iff the sum of totatives of n (A023896) is odd.

Examples

			For n=6; sets of totatives of divisors of 6: {1}, {1}, {1, 2}, {1, 5}; a(6) = 1*1*(1+2)*(1+5) = 18.
		

Crossrefs

Programs

  • Magma
    [&*[&+[h: h in [1..d] | GCD(h,d) eq 1]: d in Divisors(n)]: n in [1..100]]
  • Mathematica
    Table[Product[Total@ Select[Range@ d, CoprimeQ[d, #] &], {d, Divisors@ n}], {n, 43}] (* Michael De Vlieger, Dec 30 2016 *)

Formula

a(n) = Product_{d|n} A023896(d).

A307997 a(n) is the sum of A023896(k) over the totatives of n.

Original entry on oeis.org

1, 1, 2, 4, 9, 11, 25, 35, 53, 52, 109, 87, 188, 174, 218, 255, 432, 301, 622, 492, 636, 633, 1109, 725, 1288, 1113, 1468, 1287, 2275, 1121, 2801, 2305, 2598, 2499, 3227, 2266, 4760, 3550, 4229, 3449, 6556, 3311, 7628, 5527, 5846, 6199, 10017, 5736, 10453, 7282, 9654, 8832, 14451, 8143, 13060
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, May 09 2019

Keywords

Comments

a(n) <= A213544(n-1) for n >= 2, with equality if and only if n is prime. - Robert Israel, May 10 2019

Examples

			a(6) = 11 because the totatives of 6, i.e. the numbers from 1 to 6 that are coprime to 6, are 1 and 5, A023896(1) = 1 and A023896(5) = 1+2+3+4=10, and 1+10=11.
		

Crossrefs

Programs

  • Maple
    A023896:= proc(n) option remember; convert(select(t -> igcd(t,n)=1, [$1..n]),`+`) end proc:
    f:= n -> convert(map(A023896, select(t -> igcd(t,n)=1, [$1..n])),`+`):
    map(f, [$1..100]);
  • Mathematica
    A023896[n_] := If[n == 1, 1, (n/2) EulerPhi[n]];
    a[n_] := Sum[Boole[GCD[n, k] == 1] A023896[k], {k, 1, n}];
    Array[a, 100] (* Jean-François Alcover, Jul 31 2020 *)
  • PARI
    s(n) = if(n<2, n>0, n*eulerphi(n)/2); \\ A023896
    a(n) = sum(k=1, n, if (gcd(n,k)==1, s(k))); \\ Michel Marcus, May 10 2019

Formula

a(n) = Sum_{1<=k<=n; gcd(k,n)=1} A023896(k).
a(n) = Sum_{k=1..n} k*A143620(n,k).

A308169 Numbers k such that A023896(k) mod A000203(k) is prime.

Original entry on oeis.org

3, 7, 10, 11, 16, 19, 22, 23, 25, 27, 31, 34, 43, 46, 49, 58, 59, 71, 79, 82, 83, 94, 100, 103, 106, 118, 121, 131, 139, 142, 163, 166, 178, 191, 199, 202, 208, 211, 214, 223, 226, 251, 262, 271, 274, 298, 311, 331, 334, 346, 358, 359, 379, 382, 383, 394, 419, 443, 454, 463, 466, 478, 479, 484
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, May 15 2019

Keywords

Comments

Numbers k such that (k*A000010(k)/2) mod A000203(k) is prime.
The primes in the sequence are A092109.
The even semiprimes in the sequence are A112774.

Examples

			a(3)=10 is in the sequence because A023896(10) mod A000203(10) = 20 mod 6 = 2, and 2 is prime.
		

Crossrefs

Programs

  • Maple
    select(n -> isprime((n*numtheory:-phi(n)/2) mod numtheory:-sigma(n)), [$2..1000]);
  • PARI
    isok(n) = isprime(n*eulerphi(n)/2 % sigma(n)); \\ Michel Marcus, May 15 2019
Showing 1-10 of 92 results. Next