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.

A374029 Lexicographically earliest strictly increasing sequence of prime numbers whose partial products, starting from the second, are all Fermat pseudoprimes to base 2 (A001567).

This page as a plain text file.
%I A374029 #13 Jun 30 2024 06:34:04
%S A374029 11,31,41,61,181,54001,54721,61561,123121,225721,246241,430921,523261,
%T A374029 800281,2400841,9603361,28810081,76826881,96033601,15909022209601,
%U A374029 133133396385601,5791302742773601,15443473980729601,61773895922918401,386086849518240001,13706083157897520001
%N A374029 Lexicographically earliest strictly increasing sequence of prime numbers whose partial products, starting from the second, are all Fermat pseudoprimes to base 2 (A001567).
%C A374029 Are all the terms of the form 10*k+1?
%H A374029 Daniel Suteu, <a href="/A374029/b374029.txt">Table of n, a(n) for n = 1..28</a>
%H A374029 <a href="/index/Ps#pseudoprimes">Index entries for sequences related to pseudoprimes</a>.
%e A374029 The partial products begin with 11, 11 * 31 = 341 = A001567(1), 11 * 31 * 41 = 13981 = A001567(29), 11 * 31 * 41 * 61 = 852841 = A001567(234), 11 * 31 * 41 * 61 * 181 = 154364221 = A001567(2509), ... .
%t A374029 pspQ[n_] := PowerMod[2, n - 1, n] == 1; a[1] = 11; a[n_] := a[n] = Module[{p = NextPrime[a[n-1]], r = Product[a[i], {i, 1, n - 1}]}, While[! pspQ[p*r], p = NextPrime[p]]; p]; Array[a, 10]
%o A374029 (PARI) ispsp(n) = Mod(2, n)^(n-1) == 1;
%o A374029 lista(len) = {my(prd = 1, c = 0, k = 11); while(c < len, while(!ispsp(prd * k), k = nextprime(k+1)); prd *= k; print1(k,", "); c++);}
%o A374029 (PARI) my(P=List(11), base=2); my(m = vecprod(Vec(P))); my(L = znorder(Mod(base, m))); print1(P[1], ", "); while(1, forstep(p=lift(1/Mod(m, L)), oo, L, if(p > P[#P] && isprime(p) && base % p != 0, if((m*p-1) % znorder(Mod(base, p)) == 0, print1(p, ", "); listput(P, p); L = lcm(L, znorder(Mod(base, p))); m *= p; break)))); \\ _Daniel Suteu_, Jun 30 2024
%Y A374029 Cf. A001567, A374027, A374028.
%K A374029 nonn
%O A374029 1,1
%A A374029 _Amiram Eldar_, Jun 26 2024
%E A374029 a(20)-a(26) from _Daniel Suteu_, Jun 30 2024