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.

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

This page as a plain text file.
%I A250199 #50 Jan 23 2025 10:20:54
%S A250199 341,91,124,25,15,21,45,45,33,35,49,45,105,77,65,65,87,91,85,105,111,
%T A250199 91,105,99,105,175,133,133,117,133,153,143,148,161,175,175,186,186,
%U A250199 231,205,185,195,217,276,231,225,217,231,285,285,259,255,363,289,301,341,286,341,322,329
%N A250199 Smallest pseudoprime (>prime(n)) to base prime(n).
%C A250199 Subsequence of A007535, see formula.
%H A250199 Eric Chen, <a href="/A250199/b250199.txt">Table of n, a(n) for n = 1..4096</a>
%F A250199 a(n) = A007535(A000040(n)).
%e A250199 a(7) = 45 because the 7th prime is 17, and the smallest pseudoprime (> 17) to base 17 is 45.
%t A250199 f[n_] := Block[{b = Prime[n], k = Prime[n] + 1}, While[PrimeQ[k] || PowerMod[b, k - 1, k] != 1, k++]; k]; Array[f, 60]
%o A250199 (PARI) a(n) = for(k=prime(n)+1,2^24,if(Mod(prime(n),k)^(k-1)==Mod(1,k) && !isprime(k),return(k)))
%Y A250199 Cf. A007535, A090086, A108162, A098650.
%K A250199 nonn
%O A250199 1,1
%A A250199 _Eric Chen_, Feb 21 2015