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

A181780 Numbers n which are Fermat pseudoprimes to some base b, 2 <= b <= n-2.

Original entry on oeis.org

15, 21, 25, 28, 33, 35, 39, 45, 49, 51, 52, 55, 57, 63, 65, 66, 69, 70, 75, 76, 77, 85, 87, 91, 93, 95, 99, 105, 111, 112, 115, 117, 119, 121, 123, 124, 125, 129, 130, 133, 135, 141, 143, 145, 147, 148, 153, 154, 155, 159, 161, 165, 169, 171, 172, 175, 176
Offset: 1

Views

Author

Karsten Meyer, Nov 12 2010

Keywords

Comments

A nonprime number n is a Fermat pseudoprime to base b if b^(n-1) = 1 (mod n).
It appears that these n are pseudoprimes for an even number of bases. When n is the product of two distinct primes, it appears that there are exactly two such bases x and y with x + y = n. See A211455, A211456, and A211457. - T. D. Noe, Apr 12 2012

Examples

			15 is Fermat pseudoprime to base 4 and 11, so it is a Fermat pseudoprime.
		

Crossrefs

Even terms give A039772. - Thomas Ordowski, Dec 28 2016

Programs

  • Mathematica
    t = {}; Do[s = Select[Range[2, n-2], PowerMod[#, n-1, n] == 1 &]; If[s != {}, AppendTo[t, n]], {n, Select[Range[213], ! PrimeQ[#] &]}]; t (* T. D. Noe, Nov 07 2011 *)
    (* The following program is much faster than the one above. See A227180 for indications of a proof of this assertion. *) Select[Range[213], ! IntegerQ[Log[3, #]] && ! PrimeQ[#] && GCD[# - 1, EulerPhi[#]] > 1 &] (* Emmanuel Vantieghem, Jul 06 2013 *)
  • PARI
    fsp(n)=
    { /* whether n is Fermat pseudoprime to any base a where 2<=a<=n-2 */
        for (a=2,n-2,
            if ( gcd(a,n)!=1, next() );
            if ( (Mod(a,n))^(n-1)==+1, return(1) )
        );
        return(0);
    }
    for(n=3,300, if(isprime(n),next());  if ( fsp(n) , print1(n,", ") ); );
    \\ Joerg Arndt, Jan 08 2011
    
  • PARI
    is(n)=if(isprime(n), return(0)); my(f=factor(n)[,1]); prod(i=1, #f, gcd(f[i]-1, n-1)) > 2 \\ Charles R Greathouse IV, Dec 28 2016
  • Rexx
    See Meyer link.
    

Formula

For any odd a(m), a(m) = A211456(m) + A211457(m). - Thomas Ordowski, Dec 09 2013

Extensions

Used a comment line to give a more explicit definition. - N. J. A. Sloane, Nov 12 2010
Definition corrected by Max Alekseyev, Nov 12 2010

A280196 Numbers n such that a^(n-1) == 1 (mod n^2) has no solutions with 1 < a < n^2-1.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 10, 12, 14, 16, 18, 20, 22, 24, 26, 27, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 54, 56, 58, 60, 62, 64, 68, 72, 74, 78, 80, 81, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 114, 116, 118, 120, 122, 126, 128, 132, 134, 136, 138
Offset: 1

Views

Author

Robert Israel and Thomas Ordowski, Dec 28 2016

Keywords

Comments

1 and numbers n such that A185103(n) = n^2 + (-1)^n.
Complement of A280199.
Union of A000244 and A209211.

Examples

			a(4) = 4 is in the sequence because a^3 == 1 (mod 4^2) has no solutions except a == 1 (mod 4^2).
a(7) = 9 is in the sequence because a^8 == 1 (mod 9^2) has no solutions except a == 1 (mod 9^2) and a == 80 (mod 9^2), and 80 = 9^2-1.
		

Crossrefs

Programs

  • Maple
    Aeven:= select(t -> igcd(t-1, numtheory:-phi(t^2))=1, {seq(i,i=2..1000,2}}):
    Aodd:= {seq(3^i,i=0..floor(log[3](1000)))}:
    sort(convert(Aeven union Aodd, list));
  • Mathematica
    Aeven = Select[Range[2, 1000, 2], GCD[#-1,EulerPhi[#^2]] == 1&];
    Aodd = 3^Range[0, Floor[Log[3, 1000]]];
    Union[Aeven, Aodd] (* Jean-François Alcover, Apr 27 2019, from Maple *)
Showing 1-2 of 2 results.