[go: up one dir, main page]

login
A263770
Smallest prime q such that (prime(n)^2 + q*prime(n))/(prime(n) + 1) is an integer.
2
7, 5, 7, 17, 13, 29, 19, 41, 73, 31, 97, 191, 43, 89, 97, 109, 61, 311, 137, 73, 149, 241, 337, 181, 197, 103, 313, 109, 331, 229, 257, 397, 139, 281, 151, 457, 317, 821, 337, 349, 181, 547, 193, 389, 199, 401, 1061, 449, 229, 461, 937, 241, 727, 757, 1033, 1321, 271, 1361, 557
OFFSET
1,1
COMMENTS
Least prime q such that q == 1 (mod prime(n) + 1).
FORMULA
5 is in this sequence because (prime(2)^2 + 5*prime(2))/(prime(2) + 1) = 6 and 5 is prime.
MATHEMATICA
Table[q = 2; While[! IntegerQ[(Prime[n]^2 + q Prime@ n)/(Prime@ n + 1)], q = NextPrime@ q]; q, {n, 59}] (* Michael De Vlieger, Oct 26 2015 *)
PROG
(PARI) a(n) = {p = prime(n); q = 2; while ((p^2 + p*q) % (p + 1), q = nextprime(q+1)); q; } \\ Michel Marcus, Oct 26 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved