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

A175257 a(n) is the smallest prime p such that 2^(p-1) == 1 (mod a(1)*...*a(n-1)*p).

Original entry on oeis.org

3, 5, 13, 37, 73, 109, 181, 541, 1621, 4861, 9721, 19441, 58321, 87481, 379081, 408241, 2041201, 2449441, 7348321, 14696641, 22044961, 95528161, 382112641, 2292675841, 8024365441, 40121827201, 481461926401, 722192889601, 2888771558401, 7944121785601, 55608852499201, 111217704998401, 889741639987201, 1779483279974401
Offset: 1

Views

Author

Manuel Valdivia, Mar 15 2010

Keywords

Comments

Conjecture: a(n) is the smallest integer k > 1 such that 2^(k-1) == 1 (mod a(0)*...*a(n-1)*k), with a(0) = 1. - Thomas Ordowski, Mar 13 2019
Either a(n) > a(n-1), or a(n) = a(n-1) is a Wieferich prime (A001220). - Max Alekseyev, Sep 29 2024

Crossrefs

Programs

  • Mathematica
    i=1;Do[p=Prime[n];If[Mod[2^(p-1)-1,p*i]==0,Print[p];i=p*i],{n,2,78498}]
  • PARI
    findprime(prd) = {forprime(p=2, , if (Mod(2, p*prd)^(p-1) == 1, return (p)););}
    lista(nn) = {my(prd = 1, na); for (n=1, nn, na = findprime(prd); print1(na, ", "); prd *= na;);} \\ Michel Marcus, Mar 14 2019
    
  • PARI
    { a175257_first_terms(N=1000) = my(P,L,t); P=[3]; L=2; for(n=#P,N, print(n," ",P[n]); forstep(p=P[n],oo,Mod(1,L), if(p==P[n], if(Mod(2,p^2)^(p-1)==1, error("Wieferich prime!"), next)); if(ispseudoprime(p), P=concat(P,[p]); t=Mod(2,p)^L; fordiv((p-1)\L,d, if(t^d==1, L*=d; break)); break))); P; } \\ Max Alekseyev, Sep 29 2024

Extensions

a(17)-a(26) from Amiram Eldar, Feb 03 2019
Name corrected by Thomas Ordowski, Mar 13 2019
a(27) from Hans Havermann, Mar 29 2019
Eliminated a(0)=1 in the definition (empty products equal 1). - R. J. Mathar, Jun 19 2021
Terms a(28) onward from Max Alekseyev, Sep 29 2024

A307244 a(0) = 1; a(n) is the smallest integer k > a(n-1) such that 3^(k-1) == 1 (mod a(n-1)*k).

Original entry on oeis.org

1, 2, 5, 13, 19, 37, 73, 97, 193, 241, 601, 751, 2251, 3001, 4001, 16001, 96001, 160001, 1120001, 4480001, 13440001, 20160001, 23385601, 29232001, 36540001, 38628001, 115884001, 231768001, 579420001, 1448550001, 1931400001, 2172825001, 6518475001, 22814662501, 53234212501, 425873700001, 1703494800001
Offset: 0

Views

Author

Thomas Ordowski, Mar 30 2019

Keywords

Comments

For n > 0, a(n) is prime or pseudoprime (a Fermat pseudoprime to base 3).
Conjecture: a(n) is prime for every n > 0, namely a(n) is the smallest prime p > a(n-1) different from 3 such that 3^(p-1) == 1 (mod a(n-1)), with a(0) = 1.
Generally: for a fixed integer base b > 1, a(n) is the smallest k > a(n-1) such that b^(k-1) == 1 (mod a(n-1)*k), with a(0) = 1. For n > 0, a(n) is prime or pseudoprime (a Fermat pseudoprime to base b). If for a base b, a(n) is a prime for every n > 0, then a(n) is the smallest prime p > a(n-1) that does not divide b such that b^(p-1) == 1 (mod a(n-1)), with a(0) = 1. For any integer base b > 1, a(n) is prime for almost all n. Seems that at most finitely many terms are composite.

Crossrefs

Cf. A306826.

Programs

  • Mathematica
    A = {1}; While[Length[A] < 500, a = Last[A]; r = MultiplicativeOrder[3, a]; k = a + r; While[PowerMod[3, k - 1, k a] != 1, k = k + r];  AppendTo[A, k]]; Take[A, 75] (* Emmanuel Vantieghem, Mar 31 2019 *)

Extensions

a(18)-a(29) from Amiram Eldar, Mar 30 2019
More terms from Emmanuel Vantieghem, Mar 31 2019

A307512 a(n) is the smallest k > 2^n such that 2^(k-1) == 1 (mod (2^n-1)*k).

Original entry on oeis.org

3, 5, 13, 17, 41, 67, 197, 257, 523, 1031, 2069, 4129, 8243, 16451, 32911, 65537, 131479, 262153, 524591, 1048601, 2097229, 4194389, 8388791, 16777441, 33554501, 67108913, 134217757, 268435889, 536871259, 1073741971, 2147484949, 4294967297, 8589934651, 17179869827
Offset: 1

Views

Author

Thomas Ordowski, Apr 12 2019

Keywords

Comments

a(n) = smallest k > 2^n such that k == 1 (mod n) and 2^(k-1) == 1 (mod k), so a(n) is an odd prime or a pseudoprime (Fermat pseudoprime to base 2).
Conjecture: a(n) is composite if and only if n = 2^j and 2^(2^j) + 1 is composite (presumably for all j > 4).
Note that a(2^j) = 2^(2^j) + 1 = A000215(j), the Fermat numbers.
For n <> 2^j, a(n) is the smallest k = 2^n - (2^n mod n) + m*n + 1 for m > 0 such that 2^(k-1) == 1 (mod k).
The last definition, also without the condition n <> 2^j, probably gives only primes.

Examples

			a(32) = 2^(2^5) + 1 = 641*6700417 is the smallest composite term.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = 2^n + 1}, While[PowerMod[2, k - 1, (2^n - 1)*k] != 1, k++]; k]; Array[a, 50] (* Amiram Eldar, Apr 12 2019 *)
  • PARI
    a(n) = my(k=2^n+1); while( Mod(2, (2^n-1)*k)^(k-1) != 1, k++); k; \\ Michel Marcus, Apr 25 2019

Formula

a(n) == 1 (mod n).
a(2^j) = A000215(j).

Extensions

More terms from Amiram Eldar, Apr 12 2019
Showing 1-3 of 3 results.