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-5 of 5 results.

A072023 Values of k such that A072022(k)=0.

Original entry on oeis.org

13, 31, 70, 119, 189, 210, 235, 236, 265, 301, 303, 317, 345, 352, 366, 448, 470, 472, 479, 498, 500, 511, 520, 546, 557, 562, 572, 578, 580, 624, 674, 682, 691, 724, 740, 747, 768, 784, 808, 815, 876, 878, 880, 948, 957, 964, 981, 990, 995, 998, 1017, 1035, 1044
Offset: 1

Views

Author

Labos Elemer, Jun 06 2002

Keywords

Comments

See A074915 for a bound on A048864(x) which allows the establishment of a suitable search range the terms of this sequence. - Giovanni Resta, Feb 25 2020

Examples

			13 is a term because a number whose RRS includes exactly 13 nonprime numbers doesn't exist. Phi(x) - Pi(x) + omega(x) = 13 has no solution.
		

Crossrefs

Programs

Extensions

More terms (search up to 10^6) from Michel Marcus, Aug 08 2019
Terms a(51) and beyond from Giovanni Resta, Feb 25 2020

A048864 Number of nonprime numbers (composites and 1) in the reduced residue system of n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 1, 3, 2, 6, 1, 7, 2, 4, 3, 10, 1, 11, 2, 6, 4, 14, 1, 12, 5, 10, 5, 19, 1, 20, 6, 11, 7, 15, 3, 25, 8, 14, 6, 28, 2, 29, 8, 12, 10, 32, 3, 28, 7, 19, 11, 37, 4, 26, 10, 22, 14, 42, 2, 43, 14, 20, 15, 32, 5, 48, 15, 27, 8, 51, 6, 52, 17, 21, 17, 41, 6, 57, 12, 33, 20
Offset: 1

Views

Author

Keywords

Comments

Differs from A039776 at n = 20, 21, ...

Examples

			At n = 10, we see that the numbers below 10 coprime to 10 are 1, 3, 7, 9. Removing 3 and 7, which are prime, we are left with two numbers, 1 and 9. Hence a(10) = 2.
At n = 100, phi(100) = 40, phi(100) - (pi(100) - A001221(100)) = 17, thus a(100) = 17.
		

Crossrefs

Programs

  • Maple
    A048864 := n -> nops(select(k->gcd(k,n)=1,remove(isprime,[$1..n]))); # Peter Luschny, Oct 22 2010
  • Mathematica
    Array[EulerPhi@ # - (PrimePi@ # - PrimeNu@ #) &, 82] (* Michael De Vlieger, Jul 03 2016 *)
    Table[Length[Select[Range[n], GCD[n, #] == 1 && Not[PrimeQ[#]] &]], {n, 80}] (* Alonso del Arte, Oct 02 2017 *)
  • PARI
    a(n) = eulerphi(n) - (primepi(n) - omega(n)); \\ Indranil Ghosh, Apr 27 2017
    
  • Python
    from sympy import totient, primepi, primefactors
    def a(n): return totient(n) - (primepi(n) - len(primefactors(n))) # Indranil Ghosh, Apr 27 2017

Formula

a(n) = A036997(n) + 1. - Peter Luschny, Oct 22 2010
a(n) = A000010(n) - (A000720(n) - A001221(n)).

Extensions

Converted second formula to an equation, added commas to the example - R. J. Mathar, Oct 23 2010

A074915 Largest x such that the number of nonprimes (i.e., 1 and composites) in the reduced residue set (RRS(x)) of x equals n, or 0 if there are no such numbers.

Original entry on oeis.org

30, 60, 90, 84, 120, 210, 50, 150, 126, 180, 132, 168, 0, 138, 240, 144, 140, 330, 420, 130, 300, 92, 390, 234, 294, 228, 360, 222, 160, 246, 0, 336, 276, 630, 510, 450, 378, 152, 480, 280, 318, 196, 342, 660, 165, 396, 172, 546, 250, 840, 504, 408, 350, 600
Offset: 1

Views

Author

Labos Elemer, Oct 10 2002

Keywords

Comments

It is conjectured that x is always bounded.
If p and q are primes < sqrt(x) that do not divide x, then p*q is in RRS(x). Thus the number of composites in RRS(x) is at least (pi(sqrt(x)) - log_2(x))^2/2. If x is too large, this must be greater than n. Thus suppose N is large enough that pi(sqrt(N)) > 2*sqrt(2*n) and for all x >= N, pi(sqrt(x)) > 2*log_2(x). Then a(n) <= N. It appears that the condition pi(sqrt(x)) > 2*log_2(x) is true for all x >= 103^2. - Robert Israel, Aug 26 2018, corrected Feb 24 2020
From Giovanni Resta, Feb 25 2020: (Start)
The following bounds (valid for n>1) are known:
primepi(n) < 1.256*n/log(n),
omega(n) > 0,
phi(n) > n/(3/log(log(n)) + exp(g)*log(log(n))), where g = A001620 = 0.5770836... is the Euler-Mascheroni constant.
Combining these bounds we obtain a lower bound for A048864(k) = phi(k) - primepi(k) + omega(k), which allows the establishment of a finite search range when solving A048864(x) = n. (End)

Examples

			One nonprime (=1) is in RRS of {1,2,3,4,6,8,12,18,24,30}; min=1, max=30. See A048597.
Two nonprimes are in RRS of {5,10,14,20,42,60}; min=A072022(2), max = a(2) = 60 here.
For entries of A072023 neither min nor max is believed to exist.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(v = vector(10^5, n, eulerphi(n) - (primepi(n) - omega(n)))); vector(nn, k, if (#(w=Vec(select(x->(x==k), v, 1))) == 0, 0, vecmax(w)));} \\ Michel Marcus, Feb 23 2020

Formula

a(n) = max{x; A048864(x)=n}; a(n)=0 if no such number exists (see A072023).

A076366 Number of numbers for which the count of nonprimes (i.e., 1 and composites) in their reduced residue set equals n.

Original entry on oeis.org

10, 6, 6, 4, 4, 7, 3, 4, 3, 7, 4, 4, 0, 6, 5, 1, 4, 3, 7, 4, 7, 2, 3, 3, 2, 2, 6, 5, 2, 2, 0, 6, 4, 3, 5, 4, 5, 3, 1, 3, 3, 4, 4, 6, 2, 3, 1, 6, 1, 6, 3, 6, 1, 4, 4, 4, 1, 1, 3, 6, 3, 2, 4, 4, 1, 1, 2, 4, 6, 0, 3, 4, 3, 5, 4, 1, 2, 8, 2, 5, 6, 2, 2, 5, 1, 4, 2, 4, 7, 2, 1, 2, 6, 1, 3, 5, 2, 3, 5, 3
Offset: 1

Views

Author

Labos Elemer, Oct 10 2002

Keywords

Examples

			A048864(x) = 13: S = {},                                a(13) =  0;
A048864(x) = 16: S = {144},                             a(16) =  1;
A048864(x) = 22: S = {57,92},                           a(22) =  2;
A048864(x) = 7:  S = {13,34,50},                        a(7)  =  3;
A048864(x) = 4:  S = {15,22,54,84},                     a(4)  =  4;
A048864(x) = 15: S = {35,64,68,156,240},                a(15) =  5;
A048864(x) = 2:  S = {5,10,14,20,42,60},                a(2)  =  6;
A048864(x) = 6:  S = {11,21,32,40,72,78,210},           a(6)  =  7;
A048864(x) = 78: S = {133,177,268,440,490,552,870,990}, a(78) =  8;
A048864(x) = 1:  S = {1,2,3,4,6,8,12,18,24,30},         a(1)  = 10; See A048597.
		

Crossrefs

Programs

  • PARI
    listn(nn) = {my(v = vector(10^5, n, eulerphi(n) - (primepi(n) - omega(n)))); vector(nn, k, if (#(w=Vec(select(x->(x==k), v, 1))) == 0, 0, #w));} \\ Michel Marcus, Feb 23 2020

Formula

a(n) = Card{x; A048864(x) = n}; a(n)=0 if supposedly no such number exists (see A072023).

A332839 Irregular triangle whose n-th row lists the integers x such that the number of nonprimes (i.e., 1 and composites) in the reduced residue set (RSS(x)) of x equals n, or 0 if there are no such x.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 12, 18, 24, 30, 5, 10, 14, 20, 42, 60, 7, 9, 16, 36, 48, 90, 15, 22, 54, 84, 26, 28, 66, 120, 11, 21, 32, 40, 72, 78, 210, 13, 34, 50, 38, 44, 70, 150, 102, 114, 126, 17, 27, 46, 56, 96, 108, 180, 19, 33, 52, 132, 25, 45, 80, 168, 0, 23, 39, 58, 62, 110, 138
Offset: 1

Views

Author

Michel Marcus, Feb 26 2020

Keywords

Examples

			Triangle begins:
1, 2, 3, 4, 6, 8, 12, 18, 24, 30;
5, 10, 14, 20, 42, 60;
7, 9, 16, 36, 48, 90;
15, 22, 54, 84;
26, 28, 66, 120;
11, 21, 32, 40, 72, 78, 210;
...
		

Crossrefs

Cf. A048597 (1st row), A072022 (least x), A074915 (largest x), A076366 (row lengths).

Programs

  • Mathematica
    t = Select[ Table[{ EulerPhi[n] - PrimePi[n] + PrimeNu[n], n}, {n, 2000}], #[[1]] <= 100 &]; c = Complement[Range[100], First /@ t]; Last /@ (Sort@ Join[ Transpose[{c, 0 c}], t]) (* Giovanni Resta, Feb 26 2020 *)
Showing 1-5 of 5 results.