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

A235482 Primes whose base-5 representation is also the base-9 representation of a prime.

Original entry on oeis.org

2, 3, 7, 11, 17, 19, 37, 41, 61, 67, 71, 97, 109, 131, 139, 149, 151, 157, 167, 191, 197, 211, 251, 269, 281, 337, 349, 367, 401, 409, 439, 449, 457, 467, 487, 491, 499, 521, 557, 569, 607, 619, 631, 647, 661, 739, 761, 769, 821, 829, 887, 907, 941, 947, 967, 1009, 1019, 1031, 1061, 1069, 1087
Offset: 1

Views

Author

M. F. Hasler, Jan 12 2014

Keywords

Comments

This sequence is part of a two-dimensional array of sequences, given in the LINK, based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.
A subsequence of A197636 and of course of A000040A015919.

Examples

			41 = 131_5 and 131_9 = 109 are both prime, so 41 is a term.
		

Crossrefs

Cf. A235265, A235266, A235461 - A235481, A065720A036952, A065721 - A065727, A089971A020449, A089981, A090707 - A091924, A235394, A235395. See the LINK for further cross-references.

Programs

  • Mathematica
    Select[Prime@ Range@ 500, PrimeQ@ FromDigits[ IntegerDigits[#, 5], 9] &] (* Giovanni Resta, Sep 12 2019 *)
  • PARI
    is(p,b=9,c=5)=isprime(vector(#d=digits(p,c),i,b^(#d-i))*d~)&&isprime(p) \\ Note: Code only valid for b > c.

A197633 Fermat-Wilson quotients of non-Wilson primes: q_p(w_p), where q_p(k) = (k^(p-1)-1)/p is a Fermat quotient, w_p = ((p-1)!+1)/p is a Wilson quotient, and p is a non-Wilson prime.

Original entry on oeis.org

0, 0, 170578899504, 1387752405580695978098914368989316131852701063520729400
Offset: 1

Views

Author

Jonathan Sondow, Oct 16 2011

Keywords

Comments

A Wilson prime is a prime p that divides its Wilson quotient w_p (see A007619). The known Wilson primes are 5, 13, 563 (see A007540).
If p is a non-Wilson prime (see A197636), then p does not divide w_p, and so by Fermat's little theorem the Fermat quotient q_p(w_p) is an integer.
The next term is the Fermat-Wilson quotient of 17, which has 193 digits.
The Fermat-Wilson quotient of 14771 (see A197635) has over 800 million digits.
The GCD of all Fermat-Wilson quotients is 24. In particular, q_p(w_p) is never prime.

Examples

			The 3rd non-Wilson prime is 7, so a(3) = (((6!+1)/7)^6-1)/7 = 170578899504.
		

Crossrefs

Programs

  • Mathematica
    nmax=4; nonWilsonQ[p_] := Mod[((p-1)!+1)/p ,p] != 0; A197636 = Select[ Prime[ Range[nmax+2]], nonWilsonQ]; a[n_] := With[{p=A197636[[n]]}, ((((p-1)!+1)/p)^(p-1)-1)/p]; Table[ a[n], {n, 1, nmax}] (* Jean-François Alcover, Dec 14 2011 *)

Formula

a(n) = ((((p-1)!+1)/p)^(p-1)-1)/p, where p = A197636(n).

A235477 Primes whose base-2 representation also is the base-7 representation of a prime.

Original entry on oeis.org

2, 31, 47, 59, 103, 107, 173, 179, 181, 199, 211, 227, 229, 233, 367, 409, 443, 463, 487, 701, 743, 757, 823, 827, 877, 911, 919, 967, 1009, 1123, 1163, 1291, 1321, 1367, 1373, 1447, 1493, 1571, 1583, 1597, 1609, 1627, 1657, 1669, 1721, 1831, 1933, 1987
Offset: 1

Views

Author

M. F. Hasler, Jan 12 2014

Keywords

Comments

This sequence is part of a two-dimensional array of sequences, given in the LINK, based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.
For further motivation and cross-references, see sequence A235265 which is the main entry for this whole family of sequences.
A subsequence of A027697, A015919, A197636 (conjectural).

Examples

			31 = 11111_2 and 11111_7 = 2801 are both prime, so 31 is a term.
		

Crossrefs

Cf. A235464A077721, A235475, A152079, A235266, A065720A036952, A065721 - A065727, A089971A020449, A089981, A090707 - A091924, A235394, A235395, A235461 - A235482. See the LINK for further cross-references.

Programs

  • Mathematica
    Select[Prime[Range[300]],PrimeQ[FromDigits[IntegerDigits[#,2],7]]&] (* Harvey P. Dale, May 08 2021 *)
  • PARI
    is(p,b=7)=isprime(vector(#d=binary(p),i,b^(#d-i))*d~)&&isprime(p)

A197634 Fermat-Wilson remainders: Fermat-Wilson quotients A197633 of non-Wilson primes p modulo p.

Original entry on oeis.org

0, 0, 6, 7, 9, 7, 1, 6, 18, 17, 30, 11, 25, 30, 24, 46, 64, 16, 18, 4, 29, 66, 95, 11, 10, 9, 8, 64, 118, 77, 136, 15, 139, 64, 105, 9, 153, 167, 93, 4, 144, 180, 67, 179, 133, 51, 145, 130, 168, 41, 25, 163, 51, 42, 43, 100, 162, 212, 235, 2, 98, 232, 22
Offset: 1

Views

Author

Jonathan Sondow, Oct 16 2011

Keywords

Comments

a(n) = 0 iff the n-th non-Wilson prime is a Wieferich-non-Wilson prime A197635. For example a(1) = a(2) = 0, so the 1st and 2nd non-Wilson primes 2 and 3 are Wieferich-non-Wilson primes. The next one is 14771, which is the 1728th non-Wilson prime, so the next zero in the sequence occurs at a(1728) = 0.

Examples

			The 3rd non-Wilson prime is 7, and A197633(3) = 170578899504 == 6 (mod 7), so a(3) = 6.
		

Crossrefs

Programs

  • Mathematica
    nmax = 63; nonWilsonQ[p_] := Mod[((p-1)! + 1)/p, p] != 0; nwp = Select[ Prime[ Range[nmax + 2]], nonWilsonQ]; A197633[n_] := With[{p = nwp[[n]]}, ((((p-1)! + 1)/p)^(p-1) - 1)/p]; a[n_] := Mod[A197633[n], nwp[[n]]]; Table[a[n], {n, 1, nmax}] (* Jean-François Alcover, Oct 10 2012 *)

Formula

a(n) = A197633(n) mod A197636(n).
a(n) = ((((p-1)!+1)/p)^(p-1)-1)/p mod p, where p is the n-th non-Wilson prime.

A197635 Wieferich-non-Wilson primes: non-Wilson primes that divide their Fermat-Wilson quotient A197633.

Original entry on oeis.org

2, 3, 14771
Offset: 1

Views

Author

Jonathan Sondow, Oct 16 2011

Keywords

Comments

A Wieferich prime base a is a prime p satisfying a^(p-1) == 1 (mod p^2). A non-Wilson prime p is called a Wieferich-non-Wilson prime if p is a Wieferich prime base w_p, where w_p = ((p-1)!+1)/p is the Wilson quotient of p.
Michael Mossinghoff has computed that if a 4th Wieferich-non-Wilson prime exists, it is > 10^7.

Examples

			The first two non-Wilson primes are 2 and 3, whose Fermat-Wilson quotients are 0. Since 2 and 3 divide 0, they are members.
The 1728th non-Wilson prime is prime(1731) = 14771, and A197634(1728) = 0, so 14771 is a member.
		

Crossrefs

Formula

A197634(A197637(a(n))) = 0.
(((p-1)!+1)/p)^(p-1) == 1 (mod p^2), where p = a(n).

A235481 Primes whose base-4 representation is also the base-9 representation of a prime.

Original entry on oeis.org

2, 3, 29, 41, 61, 89, 109, 149, 157, 281, 293, 313, 401, 421, 433, 593, 701, 709, 1013, 1049, 1061, 1069, 1097, 1117, 1277, 1289, 1301, 1553, 1601, 1709, 2069, 2137, 2237, 2309, 2377, 2437, 2477, 2689, 2729, 2749, 2797, 2957, 2969, 3001, 3061, 3109, 3169, 3329, 3361, 3389, 3457, 3533, 3701
Offset: 1

Views

Author

M. F. Hasler, Jan 12 2014

Keywords

Comments

This sequence is part of a two-dimensional array of sequences, given in the LINK, based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.
Appears to be a subsequence of A197636.

Examples

			29 = 131_4 and 131_9 = 109 are both prime, so 29 is a term.
		

Crossrefs

Cf. A235473 - A235480, A065720A036952, A065721 - A065727, A089971A020449, A089981, A090707 - A091924, A235394, A235395, A235461 - A235482. See the LINK for further cross-references.

Programs

  • Mathematica
    Select[Prime@Range@600, PrimeQ[FromDigits[IntegerDigits[#, 4], 9]] &] (* Giovanni Resta, Sep 12 2019 *)
  • PARI
    is(p,b=9,c=4)=isprime(vector(#d=digits(p,c),i,b^(#d-i))*d~)&&isprime(p) \\ Note: Code only valid for b > c.

A197637 Number of non-Wilson primes <= n.

Original entry on oeis.org

0, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23
Offset: 1

Views

Author

Jonathan Sondow, Oct 19 2011

Keywords

Comments

The analog of pi(n) for non-Wilson primes.
An inverse function of A197636, as A197636(a(n)) = n if and only if n is a non-Wilson prime, i.e., a member of A197636.
Empirical evidence suggests that the sequence is unbounded, i.e., that A197636 is infinite, although no proof seems to be known. - Felix Fröhlich, May 18 2016

Examples

			There are 3 non-Wilson primes <= 8, namely 2, 3, and 7, so a(8) = 3.
		

Crossrefs

Programs

  • Mathematica
    nmax = 100; nonWilsonQ[p_] := Mod[((p-1)! + 1)/p, p] != 0; nonWilsonPrimes = Select[ Prime[ Range[nmax + 2]], nonWilsonQ]; a[n_] := Count[ nonWilsonPrimes, k_ /; k <= n]; Table[a[n], {n, 1, nmax}] (* Jean-François Alcover, Oct 10 2012 *)
  • PARI
    my(i=0); for(n=1, 50, if(ispseudoprime(n) && Mod((n-1)!, n^2)!=-1, i++); print1(i, ", ")) /* Felix Fröhlich, May 18 2016 */
    
  • PARI
    /* The following program is valid up to n = 2*10^13 (cf. Costa, Gerbicz, Harvey, 2014) */
    my(w=[5, 13, 563], i=0); for(n=1, 200, for(k=1, #w, if(n==w[k], i++)); print1(primepi(n)-i, ", ")) /* Felix Fröhlich, May 18 2016 */

Formula

a(A197636(n)) = n
Showing 1-7 of 7 results.