Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A083745
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A083745 a(1) = 1; if a(n-1) + n is composite or 1 then a(n) = a(n-1) + n, else a(n) = a(n-1) -n. +0
1
1, -1, -4, 0, -5, 1, 8, 16, 25, 35, 46, 58, 45, 31, 46, 62, 45, 63, 82, 102, 123, 145, 168, 192, 217, 243, 270, 298, 327, 357, 388, 420, 453, 419, 454, 490, 527, 565, 604, 644, 685, 643, 686, 730, 775, 729, 776, 824, 873, 923, 974, 1026, 1079, 1133, 1188, 1244, 1187, 1245, 1304 (list; graph; listen)
OFFSET

1,3

MAPLE

a := proc(n) option remember: if n=1 then RETURN(1) fi: if isprime(a(n-1)+n) then RETURN(a(n-1)-n) else RETURN(a(n-1)+n) fi: end: for n from 1 to 100 do printf(`%d, `, a(n)) od:

CROSSREFS

Cf. A083743, A083744.

Adjacent sequences: A083742 A083743 A083744 this_sequence A083746 A083747 A083748

Sequence in context: A046779 A051352 A003816 this_sequence A019906 A049247 A016578

KEYWORD

easy,sign

AUTHOR

Amarnath Murthy (amarnath_murthy(AT)yahoo.com), May 05 2003

EXTENSIONS

More terms and Maple code from James A. Sellers (sellersj(AT)math.psu.edu), May 19, 2003

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 October 15 20:12 EDT 2008. Contains 145099 sequences.


AT&T Labs Research