A276476 a(n) is the number of distinct integers of the form x^2-x-prime(n) for 0<=x<=prime(n)+1 whose absolute value is prime.
1, 2, 3, 5, 6, 9, 9, 13, 11, 17, 20, 17, 10, 32, 16, 23, 26, 30, 25, 21, 55, 38, 30, 27, 25, 34, 57, 19, 83, 49, 44, 40, 39, 60, 37, 77, 54, 57, 27, 43, 79, 67, 45, 110, 42, 93, 79, 79, 43, 85, 46, 90, 96, 41, 54, 96, 127, 107, 63, 78, 181, 67, 78, 72, 189, 51, 77, 103
Offset: 1
Keywords
Examples
a(2)=2 because prime(2)=3 and x^2 - x - 3 generates {-3, -3, -1, 3, 9}. This contains two integers, -3 and 3, whose absolute value is prime. a(14)=32 because prime(14)=43 and x^2 - x - 43 generates 32 prime numbers for x = 0..44.
Programs
-
PARI
isaprime(x) = isprime(x) || isprime(-x); nbp(n) = {v = vector(prime(n)+2, x, x--; x^2-x-prime(n)); vp = select(x->isaprime(x), v); vp = Set(vp); #vp;} \\ Michel Marcus, Sep 13 2016
Extensions
More terms from Michel Marcus, Sep 13 2016