Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A120938
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A120938 a(0)=1. a(n) = a(n-1) + (largest integer occurring among {a(0),a(1),a(2),..a(n-1)} which is coprime to n). +0
2
1, 2, 3, 5, 10, 13, 26, 52, 65, 130, 143, 273, 416, 426, 569, 1138, 1707, 3414, 3983, 7966, 11949, 13087, 26174, 38123, 76246, 152492, 190615, 381230, 571845, 1143690, 1181813, 2325503, 4651006, 9302012, 11627515, 20929527, 32557042, 65114084 (list; graph; listen)
OFFSET

0,2

LINKS

Leroy Quet, Home Page (listed in lieu of email address)

EXAMPLE

Among the terms {a(0),a(1),a(2),a(3),a(4),a(5)}, a(5) = 13 is the largest term which is coprime to 6. So a(6) = a(5) + 13 = 26.

MAPLE

A120938 := proc(nmax) local a, cpr, n, i; a := [1, 2]; for n from 3 to nmax do cpr := 0; for i from 1 to n-1 do if gcd(n-1, a[i]) = 1 and a[i] > cpr then cpr := a[i]; fi; od; a := [op(a), a[n-1]+cpr]; od: RETURN(a); end: nmax := 100 : a := A120938(nmax) : for n from 1 to nops(a) do printf("%d, ", a[n]); od; - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Aug 17 2006

PROGRAM

(PARI) {m=37; print1(a=1, ", "); v=[a]; for(n=1, m, a=0; for(j=1, n, if(gcd(v[j], n)==1&&a<v[j], a=v[j])); print1(a=a+v[n], ", "); v=concat(v, a))} - (Klaus Brockhaus, Aug 16 2006)

CROSSREFS

Cf. A120939.

Sequence in context: A084760 A103746 A071848 this_sequence A120610 A090859 A004681

Adjacent sequences: A120935 A120936 A120937 this_sequence A120939 A120940 A120941

KEYWORD

nonn

AUTHOR

Leroy Quet Jul 17 2006

EXTENSIONS

More terms from Klaus Brockhaus (klaus-brockhaus(AT)t-online.de), Aug 16 2006

More terms from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Aug 17 2006

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 3 22:15 EST 2009. Contains 170310 sequences.


AT&T Labs Research