OFFSET
1,2
COMMENTS
Conjecturally, a(n) << log^2 n (with constant around 8/e^gamma in the supremum). [Charles R Greathouse IV, Dec 27 2011]
Except for a(2)=2, there are no terms = 2 mod 6 (as p^2+2 = 0 mod 3 for primes p > 3). Also, only 1 and 2 appear once while all other terms may appear (infinitely) many times. [Zak Seidov, Apr 18 2012]
LINKS
Zak Seidov, Table of n, a(n) for n = 1..10000
FORMULA
Conjecture: Limit_{N->oo} (Sum_{n=1..N} a(n)) / (Sum_{n=1..N} log(prime(n))) = 2. - Alain Rocchelli, Oct 04 2023
EXAMPLE
prime(3)=5, 5*5=25 for k=4 25+4=29 prime, k=4 is the least k with prime(3)^2 + k prime.
MATHEMATICA
NextPrime[#^2]-#^2&/@Prime[Range[74]] (* Zak Seidov, Apr 18 2012 *)
PROG
(PARI) a(n) = my(x=prime(n)^2); nextprime(x)-x; \\ Michel Marcus, Oct 07 2023
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Pierre CAMI, Jan 27 2004
STATUS
approved