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.

Previous Showing 101-106 of 106 results.

A246541 Take the squares of all P_(n+2)-rough numbers less than the (n+1)-th primorial and mod each by the (n+1)-th primorial. There will be a(n) different results.

Original entry on oeis.org

1, 2, 6, 30, 180, 1440, 12960, 142560, 1995840, 29937600, 538876800, 10777536000, 226328256000, 5205549888000, 135344297088000, 3924984615552000, 117749538466560000, 3885734769396480000, 136000716928876800000, 4896025809439564800000, 190945006568143027200000
Offset: 1

Views

Author

John B. Yin, Aug 29 2014

Keywords

Comments

The P_(n+2)-rough numbers less than the (n+1)-th primorial also comprise the reduced residue system of the (n+1)-th primorial.
The conjectured formula from Jon E. Schoenfield is true. This can be seen by considering that each odd prime p has exactly (p+1)/2 quadratic residues (mod p), of which (p-1)/2 are nonzero. The P_(n+2)-rough numbers less than the (n+1)-th primorial comprise all combinations of nonzero residues modulo the first n+1 primes. So for each odd prime p, the p-1 nonzero residues map to (p-1)/2 (nonzero) residues after squaring. - Bert Dobbelaere, Aug 09 2023

Examples

			For n=2, P_(n+2) = 7.
The 7-rough numbers less than 2*3*5 are 1,7,11,13,17,19,23,29.
The squares of those numbers mod 2*3*5 are 1,19,1,19,19,1,19,1.
There are 2 different results: 1 and 19; so a(2) = 2.
		

Crossrefs

Cf. A002110 (primorial).
Cf. k-rough numbers A007310 (k=5), A007775 (k=7), A008364 (k=11), A008365 (k=13), A008366 (k=17), A166061 (k=19), A166063 (k=23).
Cf. A323739.

Programs

  • Java
    import java.util.TreeSet;
    for(int z = 1; z < 10 ; z++) {
    int n = z;
    int numNumPerLine = 210;
    int[] primes = {2,3,5,7,11,13,17,19,23,29,31,37,41,43};
    int numRepeats = 1;
    int numSpaces = 1;
    for(int i = 0; i < n + 1; i++) {
    numSpaces *= (primes[i] - 1);
    }
    int counter = 0;
    long integerLength = 1;
    for(int i = 0; i < n + 1; i++) {
    integerLength *= primes[i];
    }
    TreeSet numResults = new TreeSet();
    numSpaces/=2;
    for(int i = 1; i < integerLength / 2; i+=2) {
    boolean isInList = true;
    for(int j = 1; j < n + 1; j++) {
    if(i % primes[j] == 0) {
    isInList = false;
    }
    }
    if(isInList) {
    long k = i % integerLength;
    if(k != 0) {
    long l = (k * k) % integerLength;
    if(!numResults.contains(l)) {
    numResults.add(l);
    }
    }
    }
    }
    System.out.println(numResults.size());
    }
    
  • PARI
    a(n) = {hp = prod(k=1, n+1, prime(k)); rp = prod(k=1, n+2, prime(k)); v = []; for (i=1, hp, if (gcd(i, rp) == 1, nv = i^2 % hp; if (! vecsearch(v, nv), v = vecsort(concat(v, nv))););); #v;} \\ Michel Marcus, Sep 06 2014

Formula

Conjecture: a(n) = (1/2^n)*Product_{j=1..n} (prime(j+1)-1) = A005867(n+1)/2^n. - Jon E. Schoenfield, Feb 20 2019
a(n) = A323739(n+1). - Bert Dobbelaere, Aug 09 2023

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

A307124 a(n) is twice the square of the product of the first n primes each decreased by one.

Original entry on oeis.org

2, 8, 128, 4608, 460800, 66355200, 16986931200, 5503765708800, 2663822603059200, 2088436920798412800, 1879593228718571520000, 2435952824419268689920000, 3897524519070829903872000000, 6875233251640943950430208000000
Offset: 1

Views

Author

Sally Myers Moite, Mar 26 2019

Keywords

Comments

a(n) is also the number of pairs (c, d) for which d !== c (mod p) and d !== -c (mod p) for every prime p up to and including the n-th prime, where 1 <= c, d <= the product of the first n primes.
In some cases, c - d and c + d are prime with (c - d) + (c + d) = 2c, as in Goldbach's conjecture.

Examples

			a(4) = 2 * 1^2 * 2^2 * 4^2 * 6^2 = 4608.
For n = 2, 2 * 3 = 6, the pairs (c, d) are (1, 6), (2, 3), (3, 2), (3, 4), (4, 3), (5, 6), (6, 1) and (6, 5), so a(2) = 8.
		

Crossrefs

Programs

  • Magma
    [2*(&*[(NthPrime(i)-1)^2: i in [1..n]]): n in [1..14]]; // Marius A. Burtea, Jun 19 2019
  • Mathematica
    a[n_]:=2 Product[(Prime[i] - 1)^2, {i, 1, n}]; Array[a,10]
    2*FoldList[Times,(Prime[Range[15]]-1)^2] (* Harvey P. Dale, Jul 20 2022 *)
  • PARI
    a(n) = 2*prod(k=1, n, prime(k)-1)^2; \\ Michel Marcus, Mar 27 2019
    

Formula

From Jon E. Schoenfield, Mar 26 2019: (Start)
a(n) = 2*Product_{j=1..n} (prime(j)-1)^2.
a(n) = 2*A005867(n)^2. (End)

Extensions

First Mathematica program edited by Harvey P. Dale, Jul 20 2022

A307211 a(n) = the "maximum first open number" for prime(n).

Original entry on oeis.org

2, 6, 12, 24, 42, 75, 90, 150, 180, 216, 312, 339, 447, 519, 615, 660, 783
Offset: 1

Views

Author

Sally Myers Moite, Mar 28 2019

Keywords

Comments

This sequence is related to Goldbach's Conjecture.
Definition. Let P = prime(n). Choose one remainder and its negative for each prime up to and including P. Sieve the numbers 1, 2, 3, 4, ... to remove numbers congruent to either chosen remainder modulo the respective prime. Call the numbers left "open", and the smallest open number the "first open number" for that P and that choice of remainders. The maximum first open number for P is the largest first open number for any such choice of remainders.
Equivalently, let P = prime(n). Any positive integer c has a set of remainders modulo each prime up to and including P. Call a positive integer d "open" for c and P, if d has no remainder which is the same as, or is the negative of, any remainder of c modulo any prime up to and including P. There is a smallest, or first, open number d for any c. The maximum first open number for P is the largest first open number d for any positive integer c. (Only numbers c from 1 to P#, the product of the primes up to and including P, have to be considered.)
A problem is to find an upper limit for a(n) in terms of prime(n).
The ratios a(n)/prime(n), n = 1 to 14, are 1, 2, 2.4, 3.4, 3.8, 5.8, 5.3, 7.9, 7.8, 7.4, 10.1, 9.2, 10.9, 12.1, so a(n) appears to grow faster than prime(n).
The ratios log(a(n))/log(prime(n)), n = 1 to 14, are 1, 1.63, 1.54, 1.63, 1.56, 1.68, 1.59, 1.70, 1.66, 1.60, 1.67, 1.61, 1.64, 1.66, which appear to be bounded.
Conjecture 1: a(n) <= prime(n)^1.75.
Conjecture 2: a(n) <= prime(n) * (prime(n) - 1) / 2, n >= 5.
More terms are needed to check whether these conjectures are true for larger n.
Either conjecture implies that Goldbach's conjecture is true. (Stated as every even number greater than 6 is the sum of two different primes where 1 is not prime.)
Consider the sum (c - d) + (c + d) = 2c, where d is open for c and prime P, the smallest prime such that the primes up to and including P are sufficient to test whether two numbers that add to 2c are prime. If d were small enough, c - d is positive and both c - d and c + d would be prime, because c and d and also -c and d have no common remainders modulo every prime up to and including P.
Either conjecture would assure the existence of an open number d which is small enough, for every sufficiently large c.
For example, for P large enough, P^1.75 <= (P^2 - 3)/2. For a particular c, choose P so it is the largest prime with P <= sqrt(2c - 3). Rearranged, this gives (P^2 - 3)/2 <= c - 3. Thus d <= P^1.75 <= (P^2 - 3)/2 <= c - 3, so that c - d >= 3 is positive. Therefore Goldbach's Conjecture follows from Conjecture 1.
I think that conjectures 1 and 2 would imply that, for every gap 2n, there are an infinite number of prime pairs with that gap. I think they would also give an upper bound for the gap between pairs of primes with gap 2n.

Examples

			Let n = 4, so P = 7.
Choose, for example, remainders 1 (mod 2), 0 (mod 3), +-1 (mod 5), +-2 (mod 7).
Remove odd numbers and numbers divisible by 3 from 1, 2, 3,..., 49 (which should be enough numbers to sieve according to the conjectures) leaving 2, 4, 8, 10, 14, 16, 20, 22, 26, 28, 32, 34, 38, 40, 44, 46.
Then remove numbers congruent to +-1 (mod 5), which leaves 2, 8, 10, 20, 22, 28, 32, 38, 40.
Finally remove numbers congruent to +-2 (mod 7), which leaves the "open" numbers 8, 10, 20, 22, 28, 32, 38, 46. The "first open number" is 8.
There are 2 * 2 * 3 * 4 = 48 ways of choosing remainders for P = 7 (0 or 1 for 2, 0 or +-1 for 3, 0, +-1 or +-2 for 5, 0, +-1, +-2 or +-3 for 7).
The maximum first open number for 7 is 24, for remainders 1 (mod 2), +-1 (mod 3), +-2 (mod 5) and +-1 (mod 7).
For another example, let n = 3, so P = 5. For numbers c, one need only consider the numbers 1 to 30 to account for all possible combinations of remainders mod 2, 3, and 5. The first open numbers for each of these numbers, for P = 5, are 12, 9, 4, 3, 6, 5, 6, 9, 2, 3, 12, 1, 6, 3, 2, 3, 6, 1, 12, 3, 2, 9, 6, 5, 6, 3, 4, 9, 12, 1 respectively. Therefore, for n = 3, the "maximum first open number" a(3) is 12.
		

Crossrefs

Programs

  • Outline
    a(n)=1
    P=prime(n)
    For each permutation m(n) of 1 to n
      i()={1,2,3,...,P^2}
      for j=1,n
        r=i(1) mod p=prime(m(j))
        eliminate numbers congruent to r or -r mod p from i()
      next j
      if i(1) > a(n)
      a(n)=i(1)
    next permutation

Formula

a(n) = max for all {r(1), ..., r(n)} min d = d({r}) where d >= 1, d !== r(i) (mod prime(i)), d !== -r(i) (mod prime(i)), i = 1, ..., n.
a(n) = max for all c >= 1, min d = d(c) where d >= 1, d !== c (mod p) and d !== -c (mod p) for all p, p prime, p <= prime(n).

Extensions

a(15)-a(17) from Bert Dobbelaere, Jun 02 2019

A337022 a(n) is the number of positive integers <= A070826(n) with at least one odd prime divisor <= prime(n).

Original entry on oeis.org

0, 1, 7, 57, 675, 9255, 163095, 3190965, 75051075, 2212976535, 69624142665, 2606749381005, 107980344307605, 4687299592683015, 222157161929253705, 11859617311615438365, 704152383312290447535, 43210523173814533171635, 2910538720151462674819545, 207666871186142520765307695
Offset: 1

Views

Author

Zhandos Mambetaliyev, Aug 11 2020

Keywords

Comments

The set of finite differences positive numbers up to A070826(n) with at least one odd prime divisor <= prime(n) is a palindromic set.

Examples

			a(3) = 7, p = {3, 5}, prime(n)# / 2 = 15, {3, 5, 6, 9, 10, 12, 15} - divisible by 3 or 5.
		

Crossrefs

Programs

  • PARI
    pm=1; forprime(p=2,19,pm*=p; my(k=0); for(x=2,pm/2, forprime(q=3,p, if(x%q==0,k++;break))); print1(k,", ")) \\ Hugo Pfoertner, Aug 11 2020

Formula

a(n+1) = (prime(n+1) - 1)*a(n) + A070826(n). - Jinyuan Wang, Aug 11 2020
a(n) = A002110(n)/2 - A005867(n). - Jamie Morken, Aug 11 2021

Extensions

a(8)-a(10) from Hugo Pfoertner, Aug 11 2020
More terms from Jinyuan Wang, Aug 11 2020

A363844 Number of k <= P(n) such that gcd(k,P(n)) > 1, yet there is a prime q | k that does not divide P(n), where P(n) = A002110(n).

Original entry on oeis.org

0, 0, 0, 5, 95, 1548, 23110, 413508, 8020826, 186514437, 5447473481, 169902931273, 6317112341154, 260105450523376, 11228680152402376, 529602052783103298, 28154196548377380922, 1665532558381753842459, 101854713853486313230170, 6839699495691464491151135, 486637286249491454965285898
Offset: 0

Views

Author

Michael De Vlieger, Jun 23 2023

Keywords

Examples

			a(0) = 0 since P(0) = 1; phi(1) = 1 and A010846(1) = 1, hence 1 - 1 - 1 + 1 = 0.
a(1) = 0 since P(1) = 2; phi(2) = 1 and A010846(2) = 2, hence 2 - 1 - 2 + 1 = 0.
a(2) = 0 since P(2) = 6; phi(6) = 2 and A010846(6) = 5, hence 6 - 2 - 5 + 1 = 0.
a(3) = 5 since P(3) = 30; phi(30) = 8 and A010846(6) = 5, hence 30 - 8 - 18 + 1 = 5. We can also look at this as the cardinality of the set {1..30} \ ({1, 7, 11, 13, 17, 19, 23, 29} U {1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 16, 18, 20, 24, 25, 27, 30}) = {14, 21, 22, 26, 28}, therefore a(3) = 5.
Table relating a(n) to A002110(n), A363061(n), and A005867(n).
n A002110(n) A363061(n)      a(n) A005867(n)
--------------------------------------------
0         1          1         0          1
1         2          2         0          1
2         6          5         0          2
3        30         18         5          8
4       210         68        95         48
5      2310        283      1548        480
6     30030       1161     23110       5760
7    510510       4843    413508      92160
8   9699690      19985   8020826    1658880
...
		

Crossrefs

Programs

  • Mathematica
    b = Map[Last[ToExpression /@ StringSplit[#]] &, Split[Import["https://oeis.org/A363061/b363061.txt", "Data"]][[2 ;; -1, -1]]]; Array[(If[# == 0, Set[{k, p}, {1, 1}], p *= Prime[#]; k *= (Prime[#] - 1)]; p - k - b[[# + 1]] + 1) &, Length[b], 0]

Formula

a(n) = A243823(A002110(n)).
a(n) = P(n) - A000010(P(n)) - A010846(P(n)) + 1, where P(n) = A002110(n).
a(n) = A002110(n) - A005867(n) - A363061(n) + 1.
Previous Showing 101-106 of 106 results.