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.

Previous Showing 11-20 of 28 results. Next

A007011 a(n) = smallest pseudoprime to base 2 with n prime factors.

Original entry on oeis.org

341, 561, 11305, 825265, 45593065, 370851481, 38504389105, 7550611589521, 277960972890601, 32918038719446881, 1730865304568301265, 606395069520916762801, 59989606772480422038001, 6149883077429715389052001, 540513705778955131306570201, 35237869211718889547310642241
Offset: 2

Views

Author

Keywords

Comments

Smallest composite number m with n prime factors such that 2^(m-1)-1 is divisible by m.

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A007535.

Programs

  • PARI
    fermat_psp(A, B, k, base) = A=max(A, vecprod(primes(k))); (f(m, l, lo, k) = my(list=List()); my(hi=sqrtnint(B\m, k)); if(lo > hi, return(list)); if(k==1, forstep(p=lift(1/Mod(m, l)), hi, l, if(isprimepower(p) && gcd(m*base, p) == 1, my(n=m*p); if(n >= A && (n-1) % znorder(Mod(base, p)) == 0, listput(list, n)))), forprime(p=lo, hi, base%p == 0 && next; my(z=znorder(Mod(base, p))); gcd(m,z) == 1 || next; my(q=p, v=m*p); while(v <= B, list=concat(list, f(v, lcm(l, z), p+1, k-1)); q *= p; Mod(base, q)^z == 1 || break; v *= p))); list); vecsort(Set(f(1, 1, 2, k)));
    a(n) = if(n < 2, return()); my(x=vecprod(primes(n)), y=2*x); while(1, my(v=fermat_psp(x, y, n, 2)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ Daniel Suteu, Mar 04 2023

Extensions

More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), May 05 2007

A098650 Smallest odd pseudoprime k > b to bases p_i, i.e., the smallest composite number k > b such that p_i^(k-1)-1 is divisible by k, p_i are the prime factors of b, where b is the n-th squarefree number, A005117(n).

Original entry on oeis.org

9, 341, 91, 217, 1105, 25, 561, 15, 21, 561, 1541, 45, 45, 703, 645, 33, 561, 35, 1729, 49, 703, 1729, 561, 45, 561, 1891, 105, 1105, 77, 341, 65, 91, 65, 1729, 1105, 341, 87, 91, 561, 561, 1105, 85, 91, 561, 105, 111, 561, 703, 2465, 91, 561, 105, 781, 561, 91
Offset: 1

Views

Author

Robert G. Wilson v, Sep 18 2004

Keywords

Examples

			A005117(5) = 6 = 2*3. a(5) = 1105 because 1105 is the smallest psp to both bases 2 and 3.
		

References

  • Paulo Ribenboim, The New Book of Prime Number Records, New York: Springer-Verlag, p. 100, 1996.

Crossrefs

Cf. A005117, A007535, A098651 (indices of records), A098652 (records).

Programs

  • Mathematica
    PrimeFactors[ n_ ] := Flatten[ Table[ # [[ 1 ]], {1} ] & /@ FactorInteger[ n ]]; f[n_] := Block[{k = n + 1}, If[ EvenQ[k], k++ ]; While[ PrimeQ[k] || Union[ PowerMod[ PrimeFactors[n], k - 1, k]] != {1}, k += 2]; k]; f /@ Select[ Range[90], SquareFreeQ[ # ] &]
  • PARI
    lista(nn) = my(f, k); for(b=1, nn, if(issquarefree(b), f=factor(b)[, 1]; k=b+1+b%2; while(isprime(k) || sum(i=1, #f, Mod(f[i], k)^(k-1)==1)<#f, k+=2); print1(k, ", "))); \\ Jinyuan Wang, Jul 24 2021

A105222 Smallest integer m > 1 such that m^(n-1) == 1 (mod n).

Original entry on oeis.org

2, 3, 2, 5, 2, 7, 2, 9, 8, 11, 2, 13, 2, 15, 4, 17, 2, 19, 2, 21, 8, 23, 2, 25, 7, 27, 26, 9, 2, 31, 2, 33, 10, 35, 6, 37, 2, 39, 14, 41, 2, 43, 2, 45, 8, 47, 2, 49, 18, 51, 16, 9, 2, 55, 21, 57, 20, 59, 2, 61, 2, 63, 8, 65, 8, 25, 2, 69, 22, 11, 2, 73, 2, 75, 26
Offset: 1

Views

Author

Max Alekseyev, Apr 14 2005

Keywords

Comments

Composite n are Fermat pseudoprimes to base a(n).
For n > 1; (5+(-1)^n)/2 <= a(n) <= n+(-1)^n. If n > 2 and a(n) > 2 then n is composite. - Thomas Ordowski, Dec 01 2013

Examples

			We have 2^(2-1) == 0, 3^(2-1) == 1 (mod 2), so a(2) = 3.
		

Crossrefs

Programs

  • Mathematica
    Table[k = 2; While[PowerMod[k, n - 1, n] != 1, k++]; k, {n, 2, 100}] (* T. D. Noe, Dec 07 2013 *)
  • PARI
    a(n) = {m = 2; while ((m^(n-1) % n) !=  lift(Mod(1, n)), m++); m; } \\ Michel Marcus, Dec 01 2013
    
  • PARI
    a(n) = my(m=2); while(Mod(m, n)^(n-1)!=1, m++); m \\ Charles R Greathouse IV, Dec 01 2013

Formula

a(p) = 2 for odd prime p.

A090089 Smallest even pseudoprimes to odd base=4n-1, not necessarily exceeding n.

Original entry on oeis.org

286, 6, 10, 14, 6, 22, 26, 6, 34, 38, 6, 46, 10, 6, 58, 62, 6, 10, 74, 6, 82, 86, 6, 94, 14, 6, 106, 10, 6, 118, 122, 6, 10, 134, 6, 142, 146, 6, 14, 158, 6, 166, 10, 6, 178, 14, 6, 10, 194, 6, 202, 206, 6, 214, 218, 6, 226, 10, 6, 14, 22, 6, 10, 254, 6, 262, 14, 6, 274, 278, 6
Offset: 1

Views

Author

Labos Elemer, Nov 25 2003

Keywords

Comments

There are no even pseudoprimes to an even base.

Examples

			n=1: base = 4n-1=3, smallest relevant power is -1+2^(286-1) which is divisible by 286.
Sieving further residue classes, smallest regularly arising pseudoprimes are 6,10 etc..
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{k = 2}, While[GCD[n, k] > 1 || PrimeQ[k] || PowerMod[n, k - 1, k] != 1, k += 2]; k]; Table[a[4*n - 1], {n, 1, 100}] (* Amiram Eldar, Nov 11 2019 *)

Formula

a(n)=Min{x=4n-1 number; Mod[ -1+n^(x-1), x]=0}

A090096 Least n-pseudoprime which is a power of a prime number; smallest prime-power pseudoprime to base n.

Original entry on oeis.org

4, 1194649, 121, 1194649, 4, 4377277921, 25, 9, 4, 9, 5041, 7252249, 4, 841, 848615161, 1194649, 4, 25, 9, 78961, 4, 169, 169, 25, 4, 9, 121, 9, 4, 49, 49, 25, 4, 2129445719544546771481, 9, 4377277921, 4, 289, 64625521, 121, 4, 529, 25, 9, 4, 9
Offset: 1

Views

Author

Labos Elemer, Dec 01 2003

Keywords

Examples

			n=2: -1+2^(1092*1094) = K*1093*1093 = K*1194649;
n=4k+1: a(4k+1)=4; for a(k)=9 see A090097; a(k)=25 see A090098.
Some large values after a(46): a(52)=219521; a(56)=418609; a(58)=17161; a(59)=7711729; a(83)=23726641; a(84)=26569; a(86)=4656561121; a(87)=3996001; a(92)=528529; a(95)=4566769; a(96)=11881.
Hard bases below 100 are 47, 66, 72, 88, 90.
		

Crossrefs

Programs

  • Mathematica
    t=list-of-true-p-powers-generated-independently lf[x_] := Length[FactorInteger[x]] base=6;Do[s=Mod[ -1+base^(Part[t, n]-1), Part[t, n]]; If[Equal[s, 0], Print[Part[t, n]]], {n, 1, Length[t]}]

Formula

a(n) = A039951(n)^2.

Extensions

More terms from Michel Marcus, Aug 30 2019

A090097 Bases n such that the smallest prime-power-pseudoprime to base n is 9.

Original entry on oeis.org

8, 10, 19, 26, 28, 35, 44, 46, 55, 62, 64, 71, 80, 82, 91, 98, 100, 107, 116, 118, 127, 134, 136, 143, 152, 154, 163, 170, 172, 179, 188, 190, 199, 206, 208, 215, 224, 226, 235, 242, 244, 251, 260, 262, 271, 278, 280, 287, 296, 298, 307, 314, 316, 323, 332, 334
Offset: 1

Views

Author

Labos Elemer, Dec 01 2003

Keywords

Comments

Values of x such that A090096(x) = 9.

Crossrefs

Programs

  • Mathematica
    pspQ[n_,b_] := CompositeQ[n] &&  PowerMod[b, n - 1,n ] == 1 ; aQ[n_]:=pspQ[9, n] && AllTrue[{4,8}, !pspQ[#, n] &]; Select[Range[1000], aQ] (* Amiram Eldar, Sep 09 2019 *)

Extensions

More terms from Amiram Eldar, Sep 09 2019

A090098 Bases such that the smallest prime-power-pseudoprime is belonging to equals 25.

Original entry on oeis.org

7, 18, 24, 32, 43, 51, 68, 74, 76, 99, 124, 126, 132, 151, 168, 174, 176, 182, 207, 218, 232, 243, 268, 274, 276, 282, 299, 318, 324, 326, 351, 374, 376, 382, 399, 407, 418, 426, 432, 443, 468, 474, 482, 499, 507, 518, 524, 526, 543, 551, 574, 576, 582, 599, 607
Offset: 1

Views

Author

Labos Elemer, Dec 01 2003

Keywords

Comments

Values of x such that A090096(x) = 25.

Crossrefs

Programs

  • Mathematica
    pspQ[n_,b_] := CompositeQ[n] &&  PowerMod[b, n - 1,n ] == 1 ; aQ[n_]:=pspQ[25, n] && AllTrue[{4,8,9,16}, !pspQ[#, n] &]; Select[Range[1000], aQ] (* Amiram Eldar, Sep 09 2019 *)

Extensions

More terms from Amiram Eldar, Sep 09 2019

A074228 Even bases k for which the smallest (Fermat) pseudoprime greater than k has Moebius function mu = -1.

Original entry on oeis.org

104, 148, 164, 190, 194, 230, 254, 272, 284, 344, 348, 356, 358, 384, 388, 398, 428, 434, 442, 448, 454, 464, 478, 482, 490, 508, 520, 554, 556, 560, 568, 586, 594, 598, 608, 614, 626, 644, 650, 652, 662, 664, 704, 708, 714, 740, 742, 758, 776, 794, 796
Offset: 1

Views

Author

Jani Melik, Sep 25 2002

Keywords

Crossrefs

Programs

  • Mathematica
    q[n_] := Module[{k = n + 1}, While[! CoprimeQ[n, k] || PrimeQ[k] || PowerMod[n, k - 1, k] != 1, k++]; MoebiusMu[k] == -1]; Select[Range[2, 800, 2], q] (* Amiram Eldar, Mar 31 2024 *)

Extensions

Corrected and extended by D. S. McNeil, Mar 27 2009
Name corrected by Amiram Eldar, Mar 31 2024

A074485 Bases k for which the smallest (Fermat) pseudoprime greater than k has Moebius function mu = -1.

Original entry on oeis.org

41, 49, 71, 83, 97, 104, 111, 148, 155, 157, 161, 163, 164, 167, 169, 181, 190, 194, 197, 205, 209, 223, 227, 229, 230, 231, 239, 243, 254, 265, 269, 272, 277, 284, 323, 331, 341, 344, 348, 351, 353, 355, 356, 358, 371, 373, 379, 383, 384, 388, 391, 395
Offset: 1

Views

Author

Jani Melik, Sep 25 2002

Keywords

Examples

			41: Its smallest pseudoprime is 105 = 3 * 5 * 7 and mu (105) = -1 <= (105 > 41).
49: Its smallest pseudoprime is 66 = 2 * 3 * 11 and mu (66) = -1 <= (66 > 49).
71: Its smallest pseudoprime is 105 = 3 * 5 * 7 and mu (105) = -1 <= (105 > 71).
		

Crossrefs

Programs

  • Mathematica
    q[n_] := Module[{k = n + 1}, While[! CoprimeQ[n, k] || PrimeQ[k] || PowerMod[n, k - 1, k] != 1, k++]; MoebiusMu[k] == -1]; Select[Range[400], q] (* Amiram Eldar, Mar 31 2024 *)
  • PARI
    is(n)=my(k=n+1);while(isprime(k)||Mod(n,k)^(k-1)!=1,k++);moebius(k)<0 \\ Charles R Greathouse IV, Aug 22 2013

A239293 Smallest composite c > n such that n^c == n (mod c).

Original entry on oeis.org

4, 341, 6, 6, 10, 10, 14, 9, 12, 15, 15, 22, 21, 15, 21, 20, 34, 25, 38, 21, 28, 33, 33, 25, 28, 27, 39, 36, 35, 49, 49, 33, 44, 35, 45, 42, 45, 39, 57, 52, 82, 66, 77, 45, 55, 69, 65, 49, 56, 51, 65, 65, 65, 55, 63, 57, 65, 66, 87, 65, 91, 63, 93, 65, 70, 78, 85
Offset: 1

Views

Author

Robert FERREOL, Mar 14 2014

Keywords

Comments

a(n) is the smallest weak pseudoprime to base n that is > n.
If n is even and n+1 is composite, then a(n) = n+1. [Corrected by Thomas Ordowski, Aug 03 2018]
Conjecture: a(n) = n+1 if and only if n+1 is an odd composite number. - Thomas Ordowski, Aug 03 2018

Crossrefs

Cf. A000790 (primary pretenders), A007535 (smallest pseudoprimes to base n).
Cf. A002808.

Programs

  • Haskell
    import Math.NumberTheory.Moduli (powerMod)
    a239293 n = head [c | c <- a002808_list, powerMod n c c == n]
    -- Reinhard Zumkeller, Jul 11 2014
    
  • Maple
    L:=NULL: for a to 100 do for n from a+1 while isprime(n) or not(a^n - a mod n =0) do od; L:=L,n od: L;
  • Mathematica
    Table[k = n; While[k++; PrimeQ[k] || PowerMod[n, k, k] != n]; k, {n, 100}] (* T. D. Noe, Mar 17 2014 *)
  • PARI
    a(n) = forcomposite(c=n+1, , if(Mod(n, c)^c==n, return(c))) \\ Felix Fröhlich, Aug 03 2018
Previous Showing 11-20 of 28 results. Next