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

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

A250199 Smallest pseudoprime (>prime(n)) to base prime(n).

Original entry on oeis.org

341, 91, 124, 25, 15, 21, 45, 45, 33, 35, 49, 45, 105, 77, 65, 65, 87, 91, 85, 105, 111, 91, 105, 99, 105, 175, 133, 133, 117, 133, 153, 143, 148, 161, 175, 175, 186, 186, 231, 205, 185, 195, 217, 276, 231, 225, 217, 231, 285, 285, 259, 255, 363, 289, 301, 341, 286, 341, 322, 329
Offset: 1

Views

Author

Eric Chen, Feb 21 2015

Keywords

Comments

Subsequence of A007535, see formula.

Examples

			a(7) = 45 because the 7th prime is 17, and the smallest pseudoprime (> 17) to base 17 is 45.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{b = Prime[n], k = Prime[n] + 1}, While[PrimeQ[k] || PowerMod[b, k - 1, k] != 1, k++]; k]; Array[f, 60]
  • PARI
    a(n) = for(k=prime(n)+1,2^24,if(Mod(prime(n),k)^(k-1)==Mod(1,k) && !isprime(k),return(k)))

Formula

a(n) = A007535(A000040(n)).

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 *)

A326614 Smallest Euler-Jacobi pseudoprime to base n.

Original entry on oeis.org

9, 561, 121, 341, 781, 217, 25, 9, 91, 9, 133, 91, 85, 15, 1687, 15, 9, 25, 9, 21, 221, 21, 169, 25, 217, 9, 121, 9, 15, 49, 15, 25, 545, 33, 9, 35, 9, 39, 133, 39, 21, 451, 21, 9, 481, 9, 65, 49, 25, 49, 25, 51, 9, 55, 9, 55, 25, 57, 15, 481, 15, 9, 529, 9, 33, 65, 33, 25, 35, 69, 9
Offset: 1

Views

Author

Richard N. Smith, Jul 14 2019

Keywords

Comments

a(n) = 9 for n == 1 or 8 mod 9 (see A056020).

Crossrefs

Cf. A047713, A048950, A090086 (least Fermat pseudoprime to base n), A298756 (least strong pseudoprime to base n).

Programs

  • Mathematica
    ejpspQ[n_,b_] := CoprimeQ[n,b] && CompositeQ[n] && Mod[b^((n - 1)/2) - JacobiSymbol[b, n], n] == 0; leastEJpsp[b_] := Module[{k=9}, While[!ejpspQ[k, b], k+=2]; k]; Array[leastEJpsp, 100] (* Amiram Eldar, Jul 15 2019 *)
  • PARI
    isok(k, n) = ((k%2==1) && (gcd(k, n)==1) && Mod(n, k)^((k-1)/2)==kronecker(n, k) && !isprime(k));
    a(n) = my(k=2); while (! isok(k, n), k++); k; \\ Michel Marcus, Jul 15 2019

A371729 The number of pseudoprimes to base n that are smaller than n.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 2, 1, 1, 0, 3, 0, 1, 1, 4, 0, 4, 0, 3, 1, 1, 0, 5, 3, 1, 2, 5, 0, 4, 1, 4, 3, 2, 1, 7, 0, 1, 1, 8, 0, 6, 2, 3, 3, 1, 0, 9, 2, 3, 1, 8, 0, 6, 3, 6, 1, 2, 0, 9, 3, 1, 7, 7, 1, 6, 2, 4, 1, 9, 0, 11, 2, 1, 7, 6, 1, 7, 3, 10, 5, 3, 0, 8, 4, 1, 1
Offset: 2

Views

Author

Amiram Eldar, Apr 05 2024

Keywords

Examples

			a(2) = 0 since the smallest pseudoprime to base 2 (A001567) is 341 which is larger than 2.
a(5) = 1 since there is one pseudoprime to base 5 (A005936) that is smaller than 5: 4.
a(9) = 2 since there are 2 pseudoprimes to base 9 (A020138) that are smaller than 9: 4 and 8.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Count[Range[4, n-1], _?(CompositeQ[#] && PowerMod[n, # - 1, #] == 1 &)]; Array[a, 100, 2]
  • PARI
    a(n) = {my(c = 0); forcomposite(k = 4, n-1, if(Mod(n, k)^(k-1) == 1, c++)); c;}

Formula

a(n) = 0 if and only if A090086(n) > n, or equivalently, n-1 is in A316504.

A253233 Smallest even pseudoprime (>2n+1) in base 2n+1.

Original entry on oeis.org

4, 286, 124, 16806, 28, 70, 244, 742, 1228, 906, 1852, 154, 28, 286, 52, 66, 496, 442, 66, 1834, 344, 526974, 76, 506, 66, 70, 286, 1266, 2296, 946, 130, 5662, 112, 154, 14246, 370, 276, 8614, 2806, 2626, 112, 1558, 276, 2626, 19126, 1446, 322, 658, 176, 742, 190, 946, 5356, 742, 186, 190, 176, 8474, 2806, 2242, 148
Offset: 0

Views

Author

Eric Chen, May 17 2015

Keywords

Comments

For an even base there are no even pseudoprimes.
Conjecture: There are infinitely many even pseudoprimes in every odd base.
Records: 4, 286, 16806, 526974, 815866, 838246, ..., and they occur at indices: 0, 1, 3, 21, 503, 691, ...

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{k = 2 * n + 2}, While[PrimeQ[k] || OddQ[k] || PowerMod[2 * n + 1, k - 1, k] != 1, k++ ]; k]; Table[ f[n], {n, 0, 60}]
  • PARI
    a(n) = for(k=n+1, 2^24, if(!isprime(2*k) && Mod(2*n+1, 2*k)^(2*k-1) == Mod(1, 2*k), return(2*k)))

Formula

a(A005097(n-1)) = A108162(n).

A354689 Smallest Euler pseudoprime to base n.

Original entry on oeis.org

9, 341, 121, 341, 217, 185, 25, 9, 91, 9, 133, 65, 21, 15, 341, 15, 9, 25, 9, 21, 65, 21, 33, 25, 217, 9, 65, 9, 15, 49, 15, 25, 545, 21, 9, 35, 9, 39, 133, 39, 21, 451, 21, 9, 133, 9, 65, 49, 25, 21, 25, 51, 9, 55, 9, 33, 25, 57, 15, 341, 15, 9, 341, 9, 33, 65
Offset: 1

Views

Author

Jinyuan Wang, Jun 03 2022

Keywords

Comments

An Euler pseudoprime to the base b is a composite number k which satisfies b^((k-1)/2) == +-1 (mod k).

Crossrefs

Programs

  • PARI
    a(n) = my(m); forcomposite(k=3, oo, if(k%2 && ((m=Mod(n, k)^(k\2))==1 || m==k-1), return(k)));
    
  • Python
    from sympy import isprime
    from itertools import count
    def a(n): return next(k for k in count(3, 2) if not isprime(k) and ((r:=pow(n, (k-1)//2, k)) == 1 or r == k-1))
    print([a(n) for n in range(1, 67)]) # Michael S. Branicky, Jun 03 2022

Formula

a(n) = 9 for n == 1 or 8 (mod 9).
Previous Showing 11-17 of 17 results.