Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

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

1,2

COMMENT

A permutation of the positive integers.

LINKS

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

EXAMPLE

a(8) = 11 because, among the positive integers not occurring earlier in the sequence (6,8,10,11,12,...), 11 is the smallest which is coprime to a(7)=9, is not a(7)+1=10 and is not a(7)-1=8.

MAPLE

A:=proc(n) option remember; local t, S; S:=({$1..1000} minus {seq(A(i), i=1..n-1)}) minus {A(n-1)-1, A(n-1)+1}; t:=min(S[]); while igcd(A(n-1), t)>1 do S:=S minus {t}; t:=min(S[]) od; t end: A(1):=1: seq(A(n), n=1..200); (Mihailovs)

MATHEMATICA

a[1] = 1; a[n_] := a[n] = Block[{t = Table[ a[i], {i, n - 1}], k = 2}, While[k == a[n - 1] - 1 || k == a[n - 1] + 1 || GCD[a[n - 1], k] != 1 || Position[t, k] != {}, k++ ]; k]; Table[ a[n], {n, 50}] (from Robert G. Wilson v Aug 23 2004)

CROSSREFS

Cf. A093714, A097467.

Sequence in context: A113966 A164611 A073897 this_sequence A120683 A079313 A125132

Adjacent sequences: A097462 A097463 A097464 this_sequence A097466 A097467 A097468

KEYWORD

nonn

AUTHOR

Leroy Quet Aug 23 2004

EXTENSIONS

More terms from Alec Mihailovs (alec(AT)mihailovs.com) and Robert G. Wilson v, Aug 23 2004

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 November 29 12:46 EST 2009. Contains 167659 sequences.


AT&T Labs Research