OFFSET
1,1
COMMENTS
Conjecture: For any odd prime p there is at most one odd prime q, with q < p, for which p*q-1 is square.
(Note: If p were not restricted to being prime, there could be multiple primes q which make p*q-1 a square, with increasing multiplicities for larger p. The upper limit on the multiplicity of solutions, for prime and nonprime p and q values, is given by A006278. Note, however that those limits allow for solutions where q=2, and therefore two solutions when p and q are prime.)
a(n) is a subsequence of the Pythagorean Primes (A002144), which are of the form 4k+1.
The density of a(n) values among the primes declines with increasing n. For example, a(n) is about 22% of the first 1000 primes, and drops to about 15% of "incremental" primes around prime(10000). The density continues to fall among even larger primes. Twice those percentages apply as a portion of A002144.
All values of q also belong to A002144. It appears the set of q values "intends to" fully comprise A002144. This is notable because p values comprise an increasingly sparse subsequence within A002144, and each p value has just one q value.
The ability to fully comprise A002144 with q values is further challenged by the fact that for any given q value (i.e., any term of A002144) multiple values of p > q can be found such that p*q-1 is square. Thus q values are "promiscuous", and apparently without bounds on the number of p values they can serve.
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10471
EXAMPLE
13 is in this sequence because 13*5 - 1 = 64, which is square, with 5 < 13.
MATHEMATICA
result = {}; Do[p = Prime[i]; Do[q = Prime[j]; r = p*q - 1;
If[Mod[r, 8] == 1 || Mod[r, 8] == 0 || Mod[r, 8] == 4,
If[IntegerQ[Sqrt[r]], AppendTo[result, p]]], {j, 2, i - 1}],
{i, 3, 1000}]; result
PROG
(Python)
from gmpy2 import is_prime, is_square
for p in range(3, 10 ** 4, 2):
flag = 0
if is_prime(p):
for q in range(3, p, 2):
if is_square(p * q - 1) and is_prime(q):
flag = 1
break
if flag:
print(p, end=", ")
# Soumil Mandal, Apr 07 2016
(PARI) lista(nn) = {forprime(p=3, nn, ok = 0; forprime (q=3, p-1, if (issquare(p*q-1), ok = 1; break); ); if (ok, print1(p, ", ")); ); } \\ Michel Marcus, Apr 06 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Richard R. Forberg, Mar 15 2016
STATUS
approved
