login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A107819 Slowest increasing sequence where a(n)+n is prime. 1
1, 3, 4, 7, 8, 11, 12, 15, 20, 21, 26, 29, 30, 33, 38, 43, 44, 49, 52, 53, 58, 61, 66, 73, 76, 77, 80, 81, 84, 97, 100, 105, 106, 115, 116, 121, 126, 129, 134, 139, 140, 149, 150, 153, 154, 165, 176, 179, 180, 183 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Appears to be closely related to A014692.

LINKS

Table of n, a(n) for n=1..50.

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

Sequence in context: A309388 A188259 A058235 * A300950 A067186 A133675

Adjacent sequences:  A107816 A107817 A107818 * A107820 A107821 A107822

KEYWORD

easy,nonn

AUTHOR

Eric Angelini, Jun 11 2005

EXTENSIONS

Corrected by R. J. Mathar, Sep 05 2011

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 14 02:19 EDT 2019. Contains 327994 sequences. (Running on oeis4.)