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

A048862 Number of primes in the reduced residue system of n-th primorial number (=A002110(n)).

Original entry on oeis.org

0, 0, 1, 7, 42, 338, 3242, 42324, 646021, 12283522, 300369786, 8028642999, 259488750732, 9414916809082, 362597750396726, 15397728527812843, 742238179058722875, 40068968501510691877, 2251262473052300960808, 139566579945945392719394
Offset: 0

Views

Author

Keywords

Examples

			For n = 3, the 3rd primorial is 30, phi(30) = 8, a(3) = 8-1 = 7 since 1 is nonprime. See A048597.
For n = 4, the 4th primorial is 210, the size of its reduced residue system (RRS) is 48 of which 42 are primes and 6 are either composite numbers or 1.
		

Crossrefs

Formula

a(n) = A000849(n) - n = A000720(A002110(n)) - A001221(A002110(n)).

Extensions

a(0) prepended and extended by Max Alekseyev, Feb 22 2016
a(17) corrected and a(18)-a(19) calculated using Kim Walisch's primecount and added by Amiram Eldar, Sep 03 2024

A286941 Irregular triangle read by rows: the n-th row corresponds to the totatives of the n-th primorial, A002110(n).

Original entry on oeis.org

1, 1, 5, 1, 7, 11, 13, 17, 19, 23, 29, 1, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 169, 173, 179, 181, 187, 191, 193, 197, 199, 209
Offset: 1

Views

Author

Jamie Morken and Michael De Vlieger, May 16 2017

Keywords

Comments

Values in row n of a(n) are those of row n of A286942 complement those of row n of A279864.
From Michael De Vlieger, May 18 2017: (Start)
Numbers t < p_n# such that gcd(t, p_n#) = 0, where p_n# = A002110(n).
Numbers in the reduced residue system of A002110(n).
A005867(n) = number of terms of a(n) in row n; local minimum of Euler's totient function.
A048862(n) = number of primes in row n of a(n).
A048863(n) = number of nonprimes in row n of a(n).
Since 1 is coprime to all n, it delimits the rows of a(n).
The prime A000040(n+1) is the second term in row n since it is the smallest prime coprime to A002110(n) by definition of primorial.
The smallest composite in row n is A001248(n+1) = A000040(n+1)^2.
The Kummer numbers A057588(n) = A002110(n) - 1 are the last terms of rows n, since (n - 1) is less than and coprime to all positive n. (End)

Examples

			The triangle starts
1;
1, 5;
1, 7, 11, 13, 17, 19, 23, 29;
1, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 121, 127, 131, 137, 139, 143, 149, 151, 157, 163, 167, 169, 173, 179, 181, 187, 191, 193, 197, 199, 209;
		

Crossrefs

Cf. A285784 (nonprimes that appear), A335334 (row sums).

Programs

  • Mathematica
    Table[Function[P, Select[Range@ P, CoprimeQ[#, P] &]]@ Product[Prime@ i, {i, n}], {n, 4}] // Flatten (* Michael De Vlieger, May 18 2017 *)
  • PARI
    row(n) = my(P=factorback(primes(n))); select(x->(gcd(x, P) == 1), [1..P]); \\ Michel Marcus, Jun 02 2020

Extensions

More terms from Michael De Vlieger, May 18 2017

A285784 Possible nonprime residues of k > p# modulo p# for some primorial p# in A002110.

Original entry on oeis.org

1, 121, 143, 169, 187, 209, 221, 247, 289, 299, 323, 361, 377, 391, 403, 437, 481, 493, 527, 529, 533, 551, 559, 589, 611, 629, 667, 689, 697, 703, 713, 731, 767, 779, 793, 799, 817, 841, 851, 871, 893, 899, 901, 923, 943, 949, 961, 989, 1003, 1007, 1027, 1037, 1073, 1079, 1081
Offset: 1

Views

Author

Jamie Morken, Apr 26 2017

Keywords

Comments

Original name: Union of nonprimes p_n# < k < p_(n+1)# and gcd(k, p_n#) = 1, with p_n# = A002110(n).
From Michael De Vlieger, May 24 2017: (Start)
Let p_n# = A002110(n). This sequence includes nonprime p_n# < k < p_(n+1)# but does not repeat terms that have already appeared in the sequence (mainly 1 for p_n# with n > 1).
If regarded as a number triangle T(n,k), row length <= A048863(n). (End)
Relevant for sieving primes with a wheel of circumference p#: For the 2*3*5 wheel, the only relevant nonprime residue is 1, while for a 2*3*5*7 wheel, there are 5 more nonprime residues {121, 143, 169, 187, 209}. - M. F. Hasler, Mar 25 2019

Examples

			Primorial(2) = 2*3 = 6 has two totatives (1 and 5), primorial(3) = 2*3*5 = 30 has eight totatives (1,7,11,13,17,19,23,29), etc.
Taking the union of these lists and removing the primes gives the sequence.
		

Crossrefs

Programs

  • Mathematica
    MapIndexed[Select[Range @@ #1, Function[k, And[If[First@ #2 == 1, ! PrimeQ@ k, CompositeQ@ k > 1], CoprimeQ[Last@ #1, k]]]] &, Partition[FoldList[#1 #2 &, 1, Prime@ Range@ 5], 2, 1]] // Flatten (* Michael De Vlieger, May 24 2017 *)
  • PARI
    select( n->!isprime(n), setunion((S(p,M)=Set(primes([1,p*M])%M))(11,210), S(13,2310))) \\ M. F. Hasler, Mar 25 2019

Extensions

Edited by N. J. A. Sloane, May 01 2017
Incorrect definition replaced and more terms added by M. F. Hasler, Mar 25 2019

A287391 Nonprimes k that are a totative of more than one primorial p_n# = A002110(n).

Original entry on oeis.org

1, 169, 289, 323, 361, 391, 437, 493, 527, 529, 551, 589, 629, 667, 697, 703, 713, 731, 779, 799, 817, 841, 851, 893, 899, 901, 943, 961, 989, 1003, 1007, 1037, 1073, 1081, 1121, 1139, 1147, 1159, 1189, 1207, 1219, 1241, 1247, 1271, 1273, 1333, 1343, 1349, 1357, 1363, 1369, 1387, 1403, 1411
Offset: 1

Views

Author

Jamie Morken, May 24 2017

Keywords

Comments

From Michael De Vlieger, May 24 2017; corrected and edited by M. F. Hasler, Oct 04 2018: (Start)
Let p_n# = A002110(n). This sequence lists 1 and composite numbers p_n# < k < p_(n+1)# for all positive n such that least_prime_factor(k) > p_(n+2).
Subset of A285784.
If considered as an irregular number triangle T(n,k), row lengths n < A048863(n).
(End)

Examples

			From _Michael De Vlieger_, May 24 2017: (Start)
a(1) = 1 since 1 is coprime to all numbers.
169 is in the sequence since it is coprime to p_4# = 210 and p_5# = 2310 yet less than both, however prime(6) = 13 divides 169 thus it is not a totative of p_6# or any larger primorial. (End)
		

Crossrefs

Programs

  • Mathematica
    MapIndexed[Select[Range @@ #1, Function[k, Function[f, And[If[First@ #2 == 1, k == 1 || Total[f[[All, -1]]] > 1, Total[f[[All, -1]]] > 1], CoprimeQ[Last@ #1, k], f[[1, 1]] != Prime[First@ #2 + 1]]]@ FactorInteger[k]]] &, Partition[FoldList[#1 #2 &, 1, Prime@ Range@ 5], 2, 1]] // Flatten (* Michael De Vlieger, May 24 2017 *)
  • PARI
    is(n,f=if(n>1,factor(n)[,1][1],4),P=1)={n!=f&&forprime(p=2,precprime(f-1)-1,n%p||return;(P*=p)>n&&return(1))} \\ M. F. Hasler, Oct 04 2018

Formula

For 2 < n <= 108, a(n) = A008367(n-2); for 109 <= n < 120, a(n) = A008367(n). - M. F. Hasler, Oct 04 2018

Extensions

Edited by Michael De Vlieger, May 24 2017

A287390 Nonprimes k that are a totative of only one primorial P in A002110.

Original entry on oeis.org

121, 143, 187, 209, 221, 247, 299, 377, 403, 481, 533, 559, 611, 689, 767, 793, 871, 923, 949, 1027, 1079, 1157, 1261, 1313, 1339, 1391, 1417, 1469, 1651, 1703, 1781, 1807, 1937, 1963, 2041, 2119, 2171, 2197, 2249, 2329, 2363, 2533, 2567, 2669, 2771, 2839
Offset: 1

Views

Author

Jamie Morken, May 24 2017

Keywords

Comments

From Michael De Vlieger, May 24 2017: (Start)
Let p_n# = A002110(n). Composite numbers p_n# < k < p_(n+1)# such that gcd(k,p_(n+1)) = 1 and whose minimum prime divisor is p_(n+2).
Subsequence of A285784.
The sequence can be thought of as an irregular triangle T(n,k) with the first terms appearing for n = 3. Row lengths of T(n,k) < A048863(n).
Many of the terms are semiprimes p_(n+2)*q with p_(n+2) < q < p_pi(p_(n+1)#), where pi(x) = A000720(x).
The smallest square in a(n) is 121 = 11^2. The smallest p^m for m = {2, 3, 4, 5} is {121, 2197, 130321, 643343}, which are {11^2, 13^3, 19^4, 23^5} respectively.
(End)

Examples

			From _Michael De Vlieger_, May 24 2017: (Start)
The numbers 121, 143, 187, and 209 are in the sequence because these are nonprimes greater than p_3# = 30 but less than p_4# = 210 with minimum prime divisor p_5 = 11.
The number 169 is not in the sequence because, although it falls between 30 and 210, it is coprime to 210 and to 2310 and thus is a totative of both these primorials.
(End)
		

Crossrefs

Programs

  • Mathematica
    MapIndexed[Select[Range @@ #1, Function[k, Function[f, And[Total[f[[All, -1]]] > 1, CoprimeQ[Last@ #1, k], f[[1, 1]] == Prime[First@ #2 + 1]]]@ FactorInteger[k]]] &, Partition[FoldList[#1 #2 &, 1, Prime@ Range@ 6], 2, 1]] // Flatten (* Michael De Vlieger, May 24 2017 *)

A048980 Difference between number of nonprimes and primes in reduced residue system of primorial numbers.

Original entry on oeis.org

1, 1, 0, -6, -36, -196, -724, 7512, 366838, 11928316, 421130508, 14598816402, 584642184936, 25314953837836, 1128885572358548, 54492272309366314, 2950485568862138250, 213151926413154110951
Offset: 0

Views

Author

Keywords

Examples

			n=4, Q(4)=2*3*5*7=210, reduced residue system includes 48 terms:42 primes and 6 composites and 1: a(4)=6-42=-36.
		

Crossrefs

Programs

  • Mathematica
    Table[Function[P, EulerPhi@ P - 2 # &[PrimePi@ P - n]]@ Product[Prime@ i, {i, n}], {n, 0, 12}] (* Michael De Vlieger, May 08 2017 *)

Formula

a(n) = A048863(n) - A048862(n) = A048866(A002110(n)).
a(n) = A005867(n) - 2*A000849(n) + 2*n.

Extensions

Corrected and extended by Max Alekseyev, Feb 22 2016

A048982 Number of numbers which have a "prime-rich" reduced residue system (RRS) and binary order n.

Original entry on oeis.org

0, 0, 0, 1, 3, 8, 15, 22, 32, 50, 85, 80, 98, 84, 59, 37, 10, 2, 0, 0, 0
Offset: 0

Views

Author

Keywords

Comments

It is remarkable that in exponentially increasing ranges these occurrences increase to n=13 and thereafter decline to zero. So A048868 is believed to be finite.

Examples

			In binary order (A029837) zone of 7, i.e., in [65,128], 22 numbers belong to A048868: 66, 68, 70, 72, 74, 76, 78, 80, 84, 88, 90, 96, 98, 100, 102, 104, 108, 110, 112, 114, 120, and 126. The largest term is 90090. The largest 4 are divisible by 2310, the largest 28 by 210, and the largest 103 by 30.
		

Crossrefs

A286424 Number of partitions of p_n# into parts (q, k) both coprime to p_n#, with q prime and k nonprime, where p_n# = A002110(n).

Original entry on oeis.org

0, 0, 1, 1, 4, 110, 1432, 23338, 397661, 8193828, 212858328, 5941706227
Offset: 0

Views

Author

Michael De Vlieger, May 08 2017

Keywords

Comments

Number of totative pairs (q, k) such that prime q + k nonprime = p_n# and both gcd(q, p_n#) = 1 and gcd(k, p_n#) = 1, with p_n < q <= pi(p_n#), where pi(p_n#) = A000849(n) - n = A048862(n).
Primes p_n < q <= pi(p_n#) are greater than the greatest prime factor of p_n# = p_n, and are thus coprime to p_n#. By the definition of primorial, we need not consider p >= p_n, as these p are divisors of p_n#, i.e., gcd(p, p_n#) = p. Since the totatives of m can be paired such that a + b = m, we need only determine if (p_n# - q) is not prime in order to count pairs (q, k).
a(n) < floor(A005867(n)/2).
a(n) <= A048862(n).
The totative pair (q,1) = (p_n# - 1, 1) is counted by a(n) for n in A057704, with (p_n# - 1) appearing in A057705.

Examples

			a(0) = 0 by definition. A002110(0) = 1; 1 is coprime to all numbers; the only possible totative pair is (1,1) and this does not include both a prime and a nonprime.
a(1) = 0 since, of the floor(A005867(1)/2) = 1 totative pair (1,1) of A002110(1) = 2, none include a both a prime and a nonprime.
a(2) = 1 since, the only totative pair (1,5) of A002110(1) = 6 includes both a prime and a nonprime.
a(3) = 1 since only (1,29) includes both a prime and a nonprime.
a(4) = 4 since (23,187), (41,169), (67,143), (89,121) include a both a prime and a nonprime.
		

Crossrefs

Programs

  • Mathematica
    Table[Function[P, Count[Prime@ Range[n + 1, PrimePi[P]], q_ /; ! PrimeQ[P - q]]]@ Product[Prime@ i, {i, n}], {n, 0, 9}] (* Michael De Vlieger, May 08 2017 *)

Formula

a(n) = (A000010(A002110(n)) - A048863(n)) - 2*A117929(A002110(n))
= (A005867(n) - A048863(n)) - 2*A117929(A002110(n))
= A048862(n) - 2*A117929(A002110(n)).

Extensions

a(11) from Giovanni Resta, May 09 2017
Showing 1-8 of 8 results.