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

A335233 Numbers m such that m!*i + 1 is composite for i = 1..m.

Original entry on oeis.org

50, 66, 67, 76, 81, 110, 117, 120, 122, 157, 178, 183, 217, 219, 226, 235, 240, 242, 244, 250, 254, 260, 266, 269, 274, 275, 287, 289, 309, 326, 346, 354, 363, 379, 380, 386, 400, 407, 410, 417, 419, 443, 449, 451, 470, 474, 489, 493, 509, 513, 518, 541, 543
Offset: 1

Views

Author

Chai Wah Wu, Jun 09 2020

Keywords

Comments

If m is a term, then A321805(m) = 0.

Crossrefs

Cf. A321805.

Programs

  • Mathematica
    Select[Range@ 200, (f = #!; NoneTrue[f*Range[#] + 1, PrimeQ]) &] (* Robert Price, Sep 14 2020 *)
  • Python
    from sympy import isprime
    A335233_list, f = [], 1
    for k in range(1,100):
        f *= k
        g = 1
        for i in range(1,k+1):
            g += f
            if isprime(g):
                break
        else:
            A335233_list.append(k)

A321855 Number of permutations f of {1,...,n} such that prime(k)*prime(f(k)) - 2 is prime for every k = 1,...,n.

Original entry on oeis.org

1, 1, 2, 3, 5, 12, 2, 3, 65, 248, 448, 1792, 4288, 6468, 27068, 29752, 106066, 447982, 1250762, 6304196, 46613084, 126391780, 504582496, 2270372946, 3028652541, 8941959118, 36442298864, 175008626450, 318369805106, 1974700703920, 6654020288821, 48819526290634, 150577775767875, 574885284627624, 3058310882340228, 15949743649457780
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 19 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0. Moreover, for each n > 0, there is an even permutation f of {1,...,n} with prime(k)*prime(f(k)) - 2 prime for all k = 1,...,n. Also, for any integer n > 2, there is an odd permutation f of {1,...,n} with prime(k)*prime(f(k)) - 2 prime for all k = 1,...,n.
If we let b(n) denote the number of even permutations f of {1,...,n} with prime(k)*prime(f(k)) - 2 prime for all k = 1,...,n, then (b(1),...,b(11)) = (1,1,1,1,3,6,1,1,33,125,226).
In 1973 J.-R. Chen proved that there are infinitely many primes p with p + 2 a product of at most two primes, such primes p are now called Chen primes.

Examples

			a(7) = 2. The only even permutation of {1,...,7} meeting the requirement is (1,5,7,4,2,6,3) with prime(1)*prime(1) - 2 = 2, prime(2)*prime(5) - 2 = 31, prime(3)*prime(7) - 2 = 83, prime(4)*prime(4) - 2 = 47, prime(5)*prime(2) - 2 = 31, prime(6)*prime(6) - 2 = 167 and prime(7)*prime(3) - 2 = 83 all prime. Also, the only odd permutation of {1,...,7} meeting the requirement is (1,5,7,6,2,4,3) with prime(1)*prime(1) - 2 = 2, prime(2)*prime(5) - 2 = 31, prime(3)*prime(7) - 2 = 83, prime(4)*prime(6) - 2 = 89, prime(5)*prime(2) - 2 = 31, prime(6)*prime(4) - 2 = 89 and prime(7)*prime(3) - 2 = 83 all prime.
		

Crossrefs

Programs

  • Mathematica
    Permanent[m_List]:=With[{v = Array[x, Length[m]]},Coefficient[Times @@ (m.v), Times @@ v]];
    a[n_]:=a[n]=Permanent[Table[Boole[PrimeQ[Prime[i]*Prime[j]-2]],{i,1,n},{j,1,n}]];
    Do[Print[n," ",a[n]],{n,1,27}]
  • PARI
    a(n) = matpermanent(matrix(n, n, i, j, ispseudoprime(prime(i)*prime(j) - 2))); \\ Jinyuan Wang, Jun 13 2020

Extensions

a(28)-a(29) from Jinyuan Wang, Jun 13 2020
a(30)-a(36) from Vaclav Kotesovec, Aug 20 2021

A335361 Prime numbers p such that p!*i + 1 is composite for i = 1..p.

Original entry on oeis.org

67, 157, 269, 379, 419, 443, 449, 509, 541, 577, 743, 769, 859, 863, 929, 937, 1009, 1087, 1163, 1213, 1217, 1367, 1381, 1481, 1579, 1733, 1747, 1753, 1783, 1787, 1877, 1901, 1997, 2153
Offset: 1

Views

Author

Chai Wah Wu, Jun 10 2020

Keywords

Comments

Primes in A335233.

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range@ 100, (f = #!; NoneTrue[f*Range[#] + 1, PrimeQ ]) &] (* Robert Price, Sep 14 2020 *)
  • PARI
    is(p) = if(isprime(p), for(i=1, p, if(ispseudoprime(i*p!+1), return(0))); 1, 0); \\ Jinyuan Wang, Jun 21 2020
  • Python
    from sympy import isprime, nextprime, factorial
    A335361_list, p = [], 2
    while p < 500:
        f, g = factorial(p), 1
        for i in range(1,p+1):
            g += f
            if isprime(g):
                break
        else:
            A335361_list.append(p)
        p = nextprime(p)
    

Extensions

a(34) from Jinyuan Wang, Jun 21 2020
Showing 1-3 of 3 results.