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.

A249275 a(n) is the smallest b > 1 such that p = prime(n) satisfies b^(p-1) == 1 (mod p^3).

Original entry on oeis.org

9, 26, 57, 18, 124, 239, 158, 333, 42, 1215, 513, 691, 1172, 3038, 295, 1468, 2511, 15458, 3859, 6372, 923, 1523, 5436, 1148, 412, 4943, 4432, 5573, 476, 68, 21304, 30422, 6021, 8881, 33731, 25667, 3868, 3170, 17987, 26626, 43588, 7296, 14628, 22076, 138057
Offset: 1

Views

Author

Felix Fröhlich, Oct 24 2014

Keywords

Comments

a(n) >= A039678(n) for all n.

Crossrefs

Programs

  • Mathematica
    Array[Block[{b = 2}, While[PowerMod[b, # - 1, #^3] != 1, b++]; b] &@ Prime@ # &, 45] (* Michael De Vlieger, Nov 25 2018 *)
    dpa[n_]:=Module[{p=Prime[n], a=9}, While[PowerMod[a, p - 1, p^3]!=1, a++]; a]; Array[dpa, 50] (* Vincenzo Librandi, Nov 30 2018 *)
  • PARI
    a(n) = my(p=prime(n)); for(b=2, oo, if(Mod(b, p^3)^(p-1)==1, return(b)))
    
  • Python
    from sympy import prime
    def a(n):
        b, p = 2, prime(n)
        p3 = p**3
        while pow(b, p-1, p3) != 1: b += 1
        return b
    print([a(n) for n in range(1, 46)]) # Michael S. Branicky, Sep 26 2021
    
  • Python
    from sympy import prime
    from sympy.ntheory.residue_ntheory import nthroot_mod
    def A249275(n): return 2**3+1 if n == 1 else int(nthroot_mod(1,(p:= prime(n))-1,p**3,True)[1]) # Chai Wah Wu, May 17 2022

Extensions

Edited by Felix Fröhlich, Nov 24 2018

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

A323602 Smallest b > 1 not already in the sequence such that b^(c-1) == 1 (mod c), i.e., c is a base-b Fermat pseudoprime, where c is the n-th composite number (A002808).

Original entry on oeis.org

5, 7, 9, 8, 11, 13, 15, 4, 17, 19, 21, 20, 23, 25, 18, 27, 26, 29, 31, 33, 10, 35, 6, 37, 39, 14, 41, 43, 45, 19, 47, 49, 30, 51, 16, 53, 55, 34, 57, 56, 59, 61, 63, 62, 65, 12, 67, 69, 22, 71, 73, 75, 74, 77, 76, 79, 81, 80, 83, 85, 38, 87, 28, 89, 91, 3, 93
Offset: 1

Views

Author

Felix Fröhlich, Jan 19 2019

Keywords

Comments

Is this a permutation of the positive integers > 1?

Crossrefs

Programs

  • PARI
    my(v=vector(1)); forcomposite(c=1, 50, my(b=2); while(Mod(b, c)^(c-1)!=1, b++; if(Mod(b, c)^(c-1)==1, for(k=1, #v, if(b==v[k], b++)))); v=concat(v, b); print1(v[#v], ", "))

A309383 a(n) is the smallest b > 1 such that when c is equal to any of the first n composites the congruence b^(c-1) == 1 (mod c) is satisfied, i.e., smallest b larger than 1 such that any member of the set of smallest n composites is a base-b Fermat pseudoprime.

Original entry on oeis.org

5, 13, 25, 73, 361, 361, 2521, 2521, 5041, 5041, 5041, 5041, 55441, 55441, 277201, 3603601, 10810801, 10810801, 10810801, 21621601, 21621601, 367567201, 367567201, 367567201
Offset: 1

Views

Author

Felix Fröhlich, Jul 27 2019

Keywords

Examples

			For n = 4: The four smallest composites are 4, 6, 8, 9 and for those four values of c the congruence b^(c-1) == 1 (mod c) is satisfied with b = 73. Since 73 is the smallest such value of b > 1, a(4) = 73.
		

Crossrefs

Programs

  • PARI
    composites(n) = my(v=[]); forcomposite(c=1, , v=concat(v, [c]); if(#v >= n, return(v)))
    a(n) = my(cp=composites(n)); for(b=2, oo, for(k=1, #cp, if(Mod(b, cp[k])^(cp[k]-1)!=1, break, if(k==#cp, return(b)))))
Showing 1-4 of 4 results.