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-10 of 28 results. Next

A090086 Smallest pseudoprime to base n, not necessarily exceeding n (cf. A007535).

Original entry on oeis.org

4, 341, 91, 15, 4, 35, 6, 9, 4, 9, 10, 65, 4, 15, 14, 15, 4, 25, 6, 21, 4, 21, 22, 25, 4, 9, 26, 9, 4, 49, 6, 25, 4, 15, 9, 35, 4, 39, 38, 39, 4, 205, 6, 9, 4, 9, 46, 49, 4, 21, 10, 51, 4, 55, 6, 15, 4, 57, 15, 341, 4, 9, 62, 9, 4, 65, 6, 25, 4, 69, 9, 85, 4, 15, 74, 15, 4, 77, 6, 9, 4, 9, 21, 85, 4, 15, 86, 87, 4, 91, 6
Offset: 1

Views

Author

Labos Elemer, Nov 25 2003

Keywords

Comments

If n-1 is composite, then a(n) < n. - Thomas Ordowski, Aug 08 2018
Conjecture: a(n) = A007535(n) for finitely many n. For n > 2; if a(n) > n, then n-1 is prime (find all these primes). - Thomas Ordowski, Aug 09 2018
It seems that if a(2^p) = p^2, then 2^p-1 is prime. - Thomas Ordowski, Aug 10 2018
a(n) is the smallest composite k such that n^(k-1) == (1-k)^n (mod k). - Thomas Ordowski, Mar 19 2025

Examples

			From _Robert G. Wilson v_, Feb 26 2015: (Start)
a(n) = 4 for n = 1 + 4*k, k >= 0.
a(n) = 6 for n = 7 + 12*k, k >= 0.
a(n) = 9 for n = 8 + 18*k, 10 + 18*k, 35 + 36*k, k >= 0.
(End)
a(n) = 10 for n = 51 + 60*k, 11 + 180*k, 131 + 180*k, k >= 0.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 1}, While[ GCD[n, k] > 1 || PrimeQ[k] || PowerMod[n, k - 1, k] != 1, j = k++]; k]; Array[f, 91] (* Robert G. Wilson v, Feb 26 2015 *)
  • PARI
    /* a(n) <= 2000 is sufficient up to n = 10000 */
    a(n) = for(k=2,2000,if((n^(k-1))%k==1 && !isprime(k), return(k))) \\ Eric Chen, Feb 22 2015
    
  • PARI
    a(n) = {forcomposite(k=2, , if (Mod(n,k)^(k-1) == 1, return (k)););} \\ Michel Marcus, Mar 02 2015

Formula

a(n) = LeastComposite{x; n^(x-1) mod x = 1}.

A090085 Smallest odd pseudoprimes to base n exceeding n (like A007535 but with smallest odd terms instead of few even ones).

Original entry on oeis.org

9, 341, 91, 15, 217, 35, 25, 9, 91, 33, 15, 65, 21, 15, 341, 51, 45, 25, 45, 21, 55, 69, 33, 25, 39, 27, 65, 45, 35, 49, 49, 33, 85, 35, 51, 91, 45, 39, 95, 91, 105, 205, 77, 45, 133, 133, 65, 49, 75, 51, 65, 85, 65, 55, 63, 57, 65, 133, 87, 341, 91, 63, 341, 65, 133, 91, 85
Offset: 1

Views

Author

Labos Elemer, Nov 25 2003

Keywords

Crossrefs

Cf. A007535.

Programs

  • Mathematica
    ds[x_, b_] := Mod[ -1+b^(x-1), x] a[n_] := Block[{m=1, s=ds[m, n]}, While[(s !=0||PrimeQ[m])||Equal[m, 1] ||!Greater[m, n]||EvenQ[m], m++ ];m]; t=Table[a[n], {n, 1, 256}]
  • PARI
    a(n)=my(k=n+if(n%2,2,1));while(Mod(n,k)^(k-1)!=1 || isprime(k), k+=2);k \\ Charles R Greathouse IV, Apr 12 2012

A090087 Smallest odd pseudoprimes to base n, not necessarily exceeding n. Compare with A007535 and A090086.

Original entry on oeis.org

9, 341, 91, 15, 217, 35, 25, 9, 91, 9, 15, 65, 21, 15, 341, 15, 9, 25, 9, 21, 55, 21, 33, 25, 39, 9, 65, 9, 15, 49, 15, 25, 85, 15, 9, 35, 9, 39, 95, 39, 15, 205, 21, 9, 133, 9, 65, 49, 15, 21, 25, 51, 9, 55, 9, 15, 25, 57, 15, 341, 15, 9, 341, 9, 33, 65, 33, 25, 35, 69, 9, 85, 9, 15
Offset: 1

Views

Author

Labos Elemer, Nov 25 2003

Keywords

Crossrefs

Programs

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

Formula

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

A090088 Smallest even pseudoprimes to odd base=2n-1, not necessarily exceeding n. See also A007535 and A090086, A090087.

Original entry on oeis.org

4, 286, 4, 6, 4, 10, 4, 14, 4, 6, 4, 22, 4, 26, 4, 6, 4, 34, 4, 38, 4, 6, 4, 46, 4, 10, 4, 6, 4, 58, 4, 62, 4, 6, 4, 10, 4, 74, 4, 6, 4, 82, 4, 86, 4, 6, 4, 94, 4, 14, 4, 6, 4, 106, 4, 10, 4, 6, 4, 118, 4, 122, 4, 6, 4, 10, 4, 134, 4, 6, 4, 142, 4, 146, 4, 6, 4, 14, 4, 158, 4, 6, 4, 166, 4, 10
Offset: 1

Views

Author

Labos Elemer, Nov 25 2003

Keywords

Comments

For an even base there are no even pseudoprimes.

Examples

			n=2, 2n-2=3 as base, smallest relevant power is -1+2^(286-1) which is divisible by 286.
		

Crossrefs

Programs

  • Mathematica
    Array[Block[{k = 4}, While[PowerMod[2 # - 1, k - 1, k] != 1, k += 2]; k] &, 86] (* Michael De Vlieger, Nov 13 2018 *)
  • PARI
    A090088(n) = { forstep(k=4, oo, 2, if(1==(Mod(n+n-1, k)^(k-1)), return (k)); ); } \\ (After code in A090086) - Antti Karttunen, Nov 10 2018

Formula

a(n) = Min_{x=even number; (-1 + n^(x-1)) mod x = 0}.

A098654 Records in A007535.

Original entry on oeis.org

4, 341, 451, 481, 671, 703, 1105, 1111, 1333, 1729, 2465, 3277, 3281, 3721, 3775, 4681, 4753, 5461, 5611, 5963, 6031, 6601, 6981, 7107, 8149, 8695, 8911, 9005, 9637, 12673, 14701, 14981, 15841, 18721, 22177, 23001, 24211, 28939, 29089, 29341, 29503, 29891, 31621
Offset: 1

Views

Author

Robert G. Wilson v, Sep 19 2004

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = n + 1}, While[ PrimeQ[k] || PowerMod[n, k - 1, k] != 1, k++ ]; k]; a = {1}; b = {4}; Do[ c = f[n]; If[c > b[[ -1]], AppendTo[a, n]; AppendTo[b, c]; Print[{n, c}]], {n, 2, 10^6}]; b

Extensions

Name corrected by Jinyuan Wang, Jul 24 2021

A098653 Where A007535 reaches a record.

Original entry on oeis.org

1, 2, 105, 162, 210, 238, 348, 600, 646, 765, 1092, 1575, 2590, 2688, 2751, 2873, 3135, 3252, 3946, 4095, 4431, 4457, 4655, 5159, 5520, 6006, 6855, 7203, 7252, 8190, 9240, 10425, 12820, 14217, 15015, 15925, 17136, 18340, 21060, 22270, 23310, 24791, 25792, 28067
Offset: 1

Views

Author

Robert G. Wilson v, Sep 19 2004

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = n + 1}, While[ PrimeQ[k] || PowerMod[n, k - 1, k] != 1, k++ ]; k]; a = {1}; b = {4}; Do[c = f[n]; If[c > b[[ -1]], AppendTo[a, n]; AppendTo[b, c]; Print[{n, c}]], {n, 2, 25000}]; a

Extensions

Name corrected by Jinyuan Wang, Jul 24 2021

A293512 Numbers k such that the smallest pseudoprime ( > k ) to base k, A007535(k), is a Carmichael number.

Original entry on oeis.org

348, 355, 358, 383, 388, 427, 448, 455, 478, 479, 485, 490, 491, 497, 499, 508, 509, 511, 515, 520, 521, 533, 535, 541, 545, 547, 551, 553, 556, 557, 559, 560, 679, 708, 759, 765, 777, 796, 807, 808, 822, 828, 838, 839, 847, 862, 891, 906, 928, 931, 933, 951
Offset: 1

Views

Author

Amiram Eldar, Oct 12 2017

Keywords

Examples

			348 is the sequence since A007535(348) = 1105 is a Carmichael number.
		

Crossrefs

Programs

  • Mathematica
    carmichaelQ[n_] := Divisible[n - 1, CarmichaelLambda[n]] && ! PrimeQ[n];
    f[n_] := Block[{k = n}, While[GCD[n, k] > 1 || PrimeQ[k] || PowerMod[n, k - 1, k] != 1, j = k++]; k]; Select[Range[1000], carmichaelQ[f[#]] &] (* after Robert G. Wilson v at A090086 *)

A293563 a(n) = k is a number such that A007535(k), the smallest pseudoprime to base k ( > k), is the n-th Carmichael number.

Original entry on oeis.org

355, 348, 765, 1092, 2035, 4457, 6855, 8253, 12820, 22270, 33687, 39171, 46860, 52087, 54027, 64917, 91703, 97860, 115971, 144291, 154717, 172267, 222477, 259098, 278967, 290820, 304878, 320929, 368305, 383656, 402333, 459571, 489481, 504165, 532378, 624325
Offset: 1

Views

Author

Amiram Eldar, Oct 12 2017

Keywords

Comments

Pairs of consecutive terms that are not monotonic (a(n) > a(n+1)): (355, 348), (624325, 611289), (778947, 761178), ... corresponding to the Carmichael numbers (1105, 561), (656601, 658801), (825265, 838201), ...

Examples

			a(1) = 355 since 355 is the least k such that A007535(k) = 561 = A002997(1), the first Carmichael number.
a(2) = 348 since 348 is the least k such that A007535(k) = 1105 = A002997(2), the second Carmichael number.
		

Crossrefs

A000783 Erroneous version of A007535.

Original entry on oeis.org

4, 341, 91, 15, 124, 35, 25, 9, 28, 33, 15, 65, 21, 15, 341, 51, 45, 25, 45, 21, 55, 69, 33, 25, 28, 27, 65, 87, 35, 49, 49, 33, 85, 35, 51, 91, 45, 39, 95, 91, 105, 205, 77, 45, 76, 133, 65, 49, 66, 51, 65, 85, 65
Offset: 1

Views

Author

Keywords

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 42.

A057598 Erroneous version of A007535.

Original entry on oeis.org

341, 91, 15, 124, 35, 25, 9, 28, 33, 15, 65, 21, 15, 341, 51, 45, 25, 45, 21, 55, 69, 33, 25, 28, 27, 65, 87, 35, 49, 49, 33, 85, 35, 51, 91, 45, 39, 95, 91, 105, 205, 77, 45, 76, 133, 65, 49, 66, 51, 65, 85, 65
Offset: 2

Views

Author

Keywords

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 42.
Showing 1-10 of 28 results. Next