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.

A344736 a(n) is the least p such that p + 5*k*(k+1) is prime for 0 <= k <= n-1 but not for k=n.

This page as a plain text file.
%I A344736 #23 Mar 12 2024 09:42:06
%S A344736 2,3,31,43,37,7,709,8941,1723,163,1801,13,32077430821,313296437089,
%T A344736 106776242048569,3345710409941689
%N A344736 a(n) is the least p such that p + 5*k*(k+1) is prime for 0 <= k <= n-1 but not for k=n.
%C A344736 a(n) is the least p such that p, p+10, p+10+20, ..., p+10+20+...+10*(n-1) are prime but p+10+20+...+10*n is composite.
%e A344736 a(4) = 43 because 43, 43+10=53, 53+20=73, 73+30=103 are prime but 103+40=143 is composite, and no number smaller than 43 works.
%p A344736 f:= proc(p) local k;
%p A344736   for k from 1 while isprime(p+k*(k+1)*5) do od:
%p A344736   k
%p A344736 end proc:
%p A344736 A:= Vector(12): count:= 0:
%p A344736 for i from 1 while count < 12 do
%p A344736   v:= f(ithprime(i));
%p A344736   if A[v] = 0 then count:= count+1; A[v]:= ithprime(i) fi
%p A344736 od:
%p A344736 convert(A,list);
%t A344736 Table[p=1;m=5;Monitor[Parallelize[While[True,If[And[MemberQ[PrimeQ[Table[p+m*k*(k+1),{k,0,n-1}]],False]==False,PrimeQ[p+m*n*(n+1)]==False],Break[]];p++];p],p],{n,1,10}] (* _J.W.L. (Jan) Eerland_, Mar 08 2024 *)
%Y A344736 Cf. A164926.
%K A344736 nonn,more
%O A344736 1,1
%A A344736 _J. M. Bergot_ and _Robert Israel_, May 27 2021
%E A344736 a(13)-a(14) from _Martin Ehrenstein_, May 28 2021
%E A344736 a(15)-a(16) from _Bert Dobbelaere_, Jun 07 2021