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.

A273340 Smallest base b such that A273339(b) = A002808(n), i.e., smallest base b > 1 such that the n-th composite number is the smallest "non-Wieferich pseudoprime" to base b.

Original entry on oeis.org

2, 17, 145, 577, 5185
Offset: 1

Views

Author

Felix Fröhlich, May 20 2016

Keywords

Crossrefs

Cf. A273339.

Programs

  • PARI
    composite(n) = my(i=0, c=2); while(1, if(!ispseudoprime(c), i++); if(i==n, return(c)); c++)
    a273339(n) = forcomposite(c=1, , if(Mod(n, c^2)^(c-1)!=1, return(c)))
    a(n) = my(b=2, c=composite(n)); while(a273339(b)!=c, b++); b

A273785 Numbers n where a composite c < n exists such that n^(c-1) == 1 (mod c^2), i.e., such that c is a "base-n Wieferich pseudoprime".

Original entry on oeis.org

17, 26, 33, 37, 49, 65, 73, 80, 81, 82, 97, 99, 101, 109, 113, 129, 145, 146, 161, 163, 168, 170, 177, 181, 182, 193, 197, 199, 201, 209, 217, 224, 225, 226, 239, 241, 242, 244, 251, 253, 257, 268, 273, 289, 293, 301, 305, 321, 323, 325, 337, 353, 360, 361
Offset: 1

Views

Author

Felix Fröhlich, May 30 2016

Keywords

Comments

Contains n+1 for n in A048111. - Robert Israel, Apr 20 2017

Examples

			15 satisfies the congruence 26^(15-1) == 1 (mod 15^2) and 15 < 26, so 26 is a term of the sequence.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    Res:= {}:
    for c from 4 to N-1 do
      if not isprime(c) then
        for m in map(rhs@op, [msolve(x^(c-1)-1, c^2)]) do
           if m > c and m <= N then Res:= Res union {m, seq(k*c^2+m, k=1..(N-m)/c^2)}
           else Res:= Res union {seq(k*c^2+m, k=1..(N-m)/c^2)}
           fi
        od
      fi
    od:
    sort(convert(Res,list)); # Robert Israel, Apr 20 2017
  • Mathematica
    nn = 361; c = Select[Range@ nn, CompositeQ]; Select[Range@ nn, Function[n, Count[TakeWhile[c, # <= n &], k_ /; Mod[n^(k - 1), k^2] == 1] > 0]] (* Michael De Vlieger, May 30 2016 *)
  • PARI
    is(n) = forcomposite(c=1, n-1, if(Mod(n, c^2)^(c-1)==1, return(1))); return(0)
Showing 1-2 of 2 results.