Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A073895
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A073895 a(1)=1. a(n)=a(n-1)+k(n). If a(n-1) is nonprime, k(n) is the smallest composite not in the set {k(i),i<n}. If a(n-1) is prime, k(n) is the smallest prime not in the set {k(i),i<n}. +0
2
1, 5, 7, 10, 16, 24, 33, 43, 48, 60, 74, 89, 96, 112, 130, 150, 171, 193, 204, 228, 253, 279, 306, 334, 364, 396, 429, 463, 476, 511, 547, 564, 602, 641, 660, 700, 742, 786, 831, 877, 900, 948, 997, 1026, 1076, 1127, 1179, 1233, 1288, 1344, 1401, 1459, 1490 (list; graph; listen)
OFFSET

1,2

EXAMPLE

a(2) = 1+4 = 5 which is prime hence a(3) = 5+2 = 7 which is also a prime,a(4)= 7+3 = 10 which is composite hence a(5) = 10 + 6 = 16.

MAPLE

A073895 :=proc(nmax) local a, kset; a := [1] ; kset := {} ; while nops(a) < nmax do k :=2; while k in kset or isprime(k)<>isprime(op(-1, a)) do k := k+1 ; od ; a := [op(a), op(-1, a)+k] ; kset := kset union {k} ; od ; RETURN(a) ; end: op(A073895(80)) ; - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Jun 27 2007

CROSSREFS

Sequence in context: A020711 A133756 A048584 this_sequence A113194 A088768 A131998

Adjacent sequences: A073892 A073893 A073894 this_sequence A073896 A073897 A073898

KEYWORD

nonn,easy

AUTHOR

Amarnath Murthy (amarnath_murthy(AT)yahoo.com), Aug 18 2002

EXTENSIONS

More terms from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Jun 27 2007

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 7 23:50 EST 2009. Contains 170430 sequences.


AT&T Labs Research