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.

A007535 Smallest pseudoprime ( > n ) to base n: smallest composite number m > n such that n^(m-1)-1 is divisible by m.

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, 45, 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, 55, 63, 57, 65, 133, 87, 341, 91, 63, 341, 65, 112, 91
Offset: 1

Views

Author

Keywords

Comments

a(k-1) = k for odd composite numbers k = {9, 15, 21, 25, 27, 33, 35, 39, 45, 49, 51, ...} = A071904(n). - Alexander Adamchuk, Dec 13 2006

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 42 (but beware errors in his table for n = 28, 58, 65, 77, 100).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Records in A098653 & A098654.

Programs

  • Haskell
    import Math.NumberTheory.Moduli (powerMod)
    a007535 n = head [m | m <- dropWhile (<= n) a002808_list,
                          powerMod n (m - 1) m == 1]
    -- Reinhard Zumkeller, Jul 11 2014
    
  • Mathematica
    f[n_] := Block[{k = n + 1}, While[PrimeQ[k] || PowerMod[n, k - 1, k] != 1, k++ ]; k]; Table[ f[n], {n, 67}] (* Robert G. Wilson v, Sep 18 2004 *)
  • PARI
    a(n)=forcomposite(m=n+1,, if(Mod(n, m)^(m-1)==1, return(m))) \\ Charles R Greathouse IV, May 18 2015

Extensions

Corrected and extended by Patrick De Geest, October 2000

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

A380979 Composites that cause a witness to be added to a set of Fermat witnesses: a(n) is the smallest composite number that is not guaranteed composite using Fermat's Little Theorem by the witness A380978(i) for any i < n.

Original entry on oeis.org

4, 341, 1105, 1729, 29341, 75361, 162401, 252601, 294409, 334153, 399001, 1152271, 1615681, 2508013, 3581761, 3828001, 6189121, 6733693, 10024561, 10267951, 14469841, 17098369, 17236801, 19384289, 23382529, 29111881, 34657141, 53711113, 64377991, 79411201, 79624621
Offset: 1

Views

Author

Jan Kostanjevec, Feb 10 2025

Keywords

Comments

A380978(n) is defined as the minimal Fermat witness that guarantees the compositeness of a(n). See the Weisstein link for details of the guarantee -- the option that uses a property derived from Fermat's little theorem.
To what extent does this differ from A135720 sorted? - Peter Munn, Mar 12 2025

Examples

			a(1) = 4, since 4 is the smallest composite number and we need to add a witness to the empty set to guarantee its compositeness. 2 is the minimal Fermat witness for the compositeness of 4, so the set of witnesses becomes {2}.
a(2) = 341, since 341 is the smallest composite number that requires a witness other than 2, namely 3.
a(3) = 1105, since 1105 is the smallest composite number that requires a witness other than 2 and 3, namely 5.
		

Crossrefs

Cf. A001567, A002997, A006945, A098654, A135720, A380978 (new minimal Fermat witness).

Extensions

More terms from Jinyuan Wang, Mar 05 2025
Showing 1-3 of 3 results.