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.

A100986 Smallest k such that concatenation of r*k and 1 is a prime for all r = 1 to n but not prime for r = n+1, or smallest k such that 10*r*k+1 is a prime for all r = 1 to n but not prime for r = n+1.

This page as a plain text file.
%I A100986 #9 Apr 03 2019 14:55:18
%S A100986 1,3,21,33,1083,2541,822486,51282,1296060612
%N A100986 Smallest k such that concatenation of r*k and 1 is a prime for all r = 1 to n but not prime for r = n+1, or smallest k such that 10*r*k+1 is a prime for all r = 1 to n but not prime for r = n+1.
%C A100986 a(10) > 10^10. - _Robert Price_, Apr 02 2019
%e A100986 a(4)=33 because 331, 661, 991 and 1321 (1321=10*4*33+1) are all prime, but 1651 (1651=10*5*33+1) is not prime. - _Robert Price_, Apr 02 2019
%t A100986 Table[k = 1;
%t A100986 While[! AllTrue[Table[10*r*k + 1, {r, 1, n}], PrimeQ] ||
%t A100986 PrimeQ[10*(n + 1)*k + 1], k++]; k, {n, 1, 9}] (* _Robert Price_, Apr 02 2019 *)
%o A100986 (PARI) isok(k, n) = {for (r=1, n, if (! isprime(10*r*k+1), return (0));); !isprime(10*(n+1)*k+1);}
%o A100986 a(n) = {my(k=1); while(! isok(k, n), k++); k;} \\ _Michel Marcus_, Apr 03 2019
%Y A100986 Cf. A089323.
%K A100986 more,nonn
%O A100986 1,2
%A A100986 _Ray G. Opao_, Jan 13 2005
%E A100986 Corrected a(7) and added a(9) by _Robert Price_, Apr 02 2019