OFFSET
1,1
COMMENTS
These are also called Poulet numbers. A few examples of how the formula looks like for k and n from 1 to 4:
For k = 1 the formula becomes 42*n + 7.
For k = 2 the formula becomes 156*n + 13.
For k = 3 the formula becomes 342*n + 19.
For k = 4 the formula becomes 600*n + 25.
For n = 1 the formula generates a perfect square.
For n = 2 the formula becomes (6*k + 1)*(12*k + 1) and were found the following Poulet numbers: 2701, 8911, 10585, 18721, 49141 etc.
For n = 3 the formula becomes (6*k + 1)*(18*k + 1) and were found the following Poulet numbers: 2821, 4033, 5461, 15841, 31621, 68101, etc.
For n = 4 the formula becomes (6*k + 1)*(24*k + 1). See the sequence A182123.
Note: the formula is equivalent to Poulet numbers of the form p*(n*p - n + 1), where p is of the form 6*k + 1. From the first 68 Poulet numbers just 7 of them (7957, 23377, 33153, 35333, 42799, 49981, 60787) can't be written as p*(n*p - n + 1), where p is of the form 6*k +- 1 and k, n are integers different from 0.
LINKS
Eric Weisstein's World of Mathematics, Poulet Number
MATHEMATICA
t = Select[Union[Flatten[Table[(6*k + 1)*(6*k*n + 1), {k, 100}, {n, 2000}]]], # < 76000 &]; Select[t, PowerMod[2, #, #] == 2 &] (* T. D. Noe, Jul 24 2012 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Marius Coman, Jul 22 2012
STATUS
approved