OFFSET
1,2
COMMENTS
Appears to be closely related to A014692.
EXAMPLE
(1)+1=2, which is prime; (3)+2=5=prime; (4)+3=7=prime; (7)+4=11=prime; (8)+5=13=prime; etc.
MAPLE
A107819 := proc(n)
option remember;
if n = 1 then
return 1;
else
for a from procname(n-1)+1 do
if isprime(a+n) then
return a;
end if;
end do:
end if;
end proc: # R. J. Mathar, Sep 05 2011
PROG
(Sage)
@cached_function
def A107819(n):
prev = (-1 if n == 1 else A107819(n-1))
return next_prime(prev+n)-n # D. S. McNeil, Sep 05 2011
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Eric Angelini, Jun 11 2005
EXTENSIONS
Corrected by R. J. Mathar, Sep 05 2011
STATUS
approved