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.

A378559 a(n) = t is the smallest prime t > p = prime(n) for which t == p (mod k) for all k = 2,...,p-1.

This page as a plain text file.
%I A378559 #24 Dec 13 2024 21:56:18
%S A378559 3,5,17,67,2531,27733,2162177,12252259,465585143,240940299629,
%T A378559 6987268688431,577614211574437,48086383113568841,438120379479182443,
%U A378559 75356705270419372847,27891400538213970357653,5584478196651286064932859,38762848659108926803651261,23645337682056445350227232067
%N A378559 a(n) = t is the smallest prime t > p = prime(n) for which t == p (mod k) for all k = 2,...,p-1.
%F A378559 a(n) == prime(n) (mod A058254(n)). - _Amiram Eldar_, Dec 01 2024
%e A378559 a(4) = 67 because prime(4) = 7, and 7 and 67 mod each k = {2, 3, 4, 5, 6} both have remainders {1, 1, 3, 2, 1} in that order, and 67 is the smallest prime after 7 that has this property.
%t A378559 a[n_] := Module[{p = Prime[n], d}, d = LCM @@ Range[p - 1]; p += d; While[!PrimeQ[p], p += d]; p]; Array[a, 20] (* _Amiram Eldar_, Dec 01 2024 *)
%o A378559 (PARI) a(n) = my(p=prime(n), vr = vector(p-2, k, p % (k+1)), q = nextprime(p+1)); while (vector(p-2, k, q % (k+1)) != vr, q = nextprime(q+1)); q; \\ _Michel Marcus_, Dec 01 2024
%Y A378559 Cf. A000040, A058254.
%K A378559 nonn
%O A378559 1,1
%A A378559 _Tamas Sandor Nagy_, Nov 30 2024