Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A084385
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A084385 a(1) = 1; a(n+1) is the smallest number not occurring earlier and coprime to sum(j=1,n, a(j)). +0
2
1, 2, 4, 3, 7, 5, 9, 6, 8, 11, 13, 10, 12, 15, 17, 14, 16, 19, 21, 18, 20, 23, 25, 22, 24, 27, 29, 26, 28, 31, 33, 30, 32, 35, 37, 34, 36, 39, 41, 38, 40, 43, 45, 42, 44, 47, 49, 46, 48, 51, 53, 50, 52, 55, 57, 54, 56, 59, 61, 58, 60, 63, 65, 62, 64, 67, 69, 66, 68, 71, 73, 70 (list; graph; listen)
OFFSET

1,2

COMMENT

Rearrangement of the positive integers.

FORMULA

For n > 6: a(n) = n - 2 for (n mod 4) = 0, a(n) = n - 1 for (n mod 4) = 1, a(n) = n + 1 for (n mod 4) = 2, a(n) = n + 2 for (n mod 4) = 3. - Klaus Brockhaus, Nov 30 2003.

EXAMPLE

1+2+4 = 7, 3 is the smallest number not occurring earlier and coprime to 7, hence a(4) = 3.

PROGRAM

(PARI) used(k, v)=b=0; j=1; while(b<1&&j<=length(v), if(v[j]==k, b=1, j++)); b

{print1(s=1, ", "); v=[s]; for(n=1, 72, j=1; k=2; while(used(k, v)||gcd(k, s)>1, k++); v=concat(v, k); s=s+k; print1(k, ", "))}

(PARI) {print1(1, ", ", 2, ", ", 4, ", ", 3, ", ", 7, ", ", 5, ", "); for(n=7, 73, m=n%4; d=(if(m==0, -2, if(m==1, -1, if(m==2, 1, 2)))); print1(n+d, ", "))}

CROSSREFS

Partial sums are in A111244. Cf. A064413.

Sequence in context: A110412 A064357 A120619 this_sequence A073885 A120234 A103865

Adjacent sequences: A084382 A084383 A084384 this_sequence A084386 A084387 A084388

KEYWORD

nonn

AUTHOR

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

EXTENSIONS

Edited, corrected and extended by Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), May 29 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 August 19 23:53 EDT 2008. Contains 142930 sequences.


AT&T Labs Research