login
Odd numbers which cannot be expressed as p + q*(q-1) where p and q are primes.
2

%I #15 Mar 31 2023 14:53:39

%S 1,3,41,97,135,251,255,341,363,377,405,671,737,765,1007,1049,1287,

%T 1371,1377,1427,1605,1697,1745,1805,2067,2177,2201,2277,2333,2477,

%U 2657,2711,3077,3101,3117,3149,3191,3437,3557,3597,3611,3983,4647,4787,4797,5117

%N Odd numbers which cannot be expressed as p + q*(q-1) where p and q are primes.

%C It is conjectured that 772277 is the largest odd integer which cannot be expressed as p + q*(q-1) where p and q are primes.

%C q*(q-1) is even which implies that p must be an odd prime.

%C The expression p + q*(q-1) resembles the expression p + 2*q used in Lemoine's conjecture.

%H Marc Ridders, <a href="/A360930/b360930.txt">Table of n, a(n) for n = 1..150</a>

%t a[1]=1;a[n_]:=a[n]=(k=a[n-1];c=True;While[c,k=k+2;c=False;q=2;While[!c&&q*(q-1)<k,p=k-(q*(q-1));c=PrimeQ[p];q=NextPrime[q]]];k);Table[a[n],{n,1,150}]

%Y Cf. A360929, A046927.

%K easy,nonn

%O 1,2

%A _Marc Ridders_, Feb 25 2023