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

A256517 Let c be the n-th composite number. Then a(n) is the smallest base b > 1 such that b^(c-1) == 1 (mod c^2), i.e., such that c is a 'Wieferich pseudoprime'.

Original entry on oeis.org

17, 37, 65, 80, 101, 145, 197, 26, 257, 325, 401, 197, 485, 577, 182, 677, 728, 177, 901, 1025, 485, 1157, 99, 1297, 1445, 170, 1601, 1765, 1937, 82, 2117, 2305, 1047, 2501, 577, 529, 2917, 1451, 3137, 721, 3365, 3601, 3845, 244, 4097, 99, 1945, 4625, 530
Offset: 1

Views

Author

Felix Fröhlich, Apr 01 2015

Keywords

Crossrefs

Programs

  • Mathematica
    c = Select[Range@ 69, CompositeQ]; f[c_] := Block[{b = 2}, While[Mod[b^(c - 1), c^2] != 1, b++]; b]; f /@ c (* Michael De Vlieger, Apr 03 2015 *)
  • PARI
    forcomposite(c=1, 1e3, b=2; while(Mod(b, c^2)^(c-1)!=1, b++); print1(b, ", "))
    
  • Python
    from sympy import composite
    from sympy.ntheory.residue_ntheory import nthroot_mod
    def A256517(n):
        z = nthroot_mod(1,(c := composite(n))-1,c**2,True)
        return int(z[0]+c**2 if len(z) == 1 else z[1]) # Chai Wah Wu, May 18 2022

Formula

a(n) = A185103(A002808(n)-1). - Bill McEachen, Nov 27 2021

A267288 Composites c where at least one base b with 1 < b < c exists such that b^(c-1) == 1 (mod c^2), i.e., composites c that are base-b 'Wieferich pseudoprimes' for at least one b between 1 and c.

Original entry on oeis.org

133, 451, 561, 871, 904, 1065, 1105, 1267, 1729, 1891, 2059, 2201, 2501, 2821, 2993, 3145, 4641, 5005, 5551, 5841, 5963, 6409, 6541, 6601, 6697, 7107, 7471, 7501, 8321, 8323, 9637, 10585, 11266, 12209, 12403, 13571, 13585, 16471, 17261, 17466, 17770, 18103
Offset: 1

Views

Author

Felix Fröhlich, Jan 12 2016

Keywords

Comments

A002808(i) such that A256517(i) < A002808(i).
Any term is also a term of A039769.

Examples

			871 is a term of the sequence, since 699^870 == 1 (mod 871^2) and 699 < 871.
		

Crossrefs

Programs

  • PARI
    forcomposite(c=2, , for(b=2, c-1, if(Mod(b, c^2)^(c-1)==1, print1(c, ", "); break({1}))))

A255901 Smallest base b such that there exist exactly n Wieferich primes (primes p satisfying b^(p-1) == 1 (mod p^2)) less than b.

Original entry on oeis.org

5, 17, 19, 116, 99, 361, 1451, 1693, 10768, 13834, 208301, 548291
Offset: 1

Views

Author

Felix Fröhlich, Mar 10 2015

Keywords

Examples

			From _Robert G. Wilson v_, Mar 11 2015: (Start)
n        b  p
1:       5 {2}
2:      17 {2, 3}
3:      19 {3, 7, 13}
4:     116 {3, 7, 19, 47}
5:      99 {5, 7, 13, 19, 83}
6:     361 {2, 3, 7, 13, 43, 137}
7:    1451 {5, 7, 11, 13, 83, 173, 1259}
8:    1693 {2, 3, 5, 11, 31, 37, 61, 109}
9:   10768 {5, 11, 17, 19, 79, 101, 139, 6343, 10177}
10:  13834 {3, 11, 17, 19, 43, 139, 197, 2437, 5849, 6367}
11: 208301 {2, 5, 29, 47, 59, 113, 661, 8209, 13679, 15679, 55633}
12: 548291 {7, 11, 19, 29, 31, 37, 97, 211, 547, 911, 2069, 28927}
... (End)
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{b = 2, p}, While[p = Prime@ Range@ PrimePi[b - 1]; Count[ PowerMod[b, p - 1, p^2], 1] != n, b++]; b]; Array[f, 11] (* Robert G. Wilson v, Mar 11 2015 *)
  • PARI
    for(n=1, 10, b=2; while(b > 0, i=0; forprime(p=1, b, if(Mod(b, p^2)^(p-1)==1, i++)); if(i==n, print1(b, ", "); break({1})); b++))
    
  • Python
    from itertools import count
    from sympy import primerange
    def A255901(n):
        for b in count(1):
            if n == sum(1 for p in primerange(2,b+1) if pow(b,p-1,p**2) == 1):
                return b # Chai Wah Wu, May 18 2022

Formula

For all n a(n) <= A252232(n).
a(n) = A252232(n) iff a(n) is prime.

Extensions

a(11) from Robert G. Wilson v, Mar 11 2015
a(12) from Robert G. Wilson v, Mar 12 2015

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