Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A108516
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A108516 Numbers m such that the permutation of the first m natural numbers S_m(n)=if(1<=n<m-pi(m),c(n),prime(n-m-pi(m))) is a cyclic permutation where c(k) is the k-th composite number and prime(0)=1(for each natural number k, c(k)=A002808(k)). +0
3
1, 4, 6, 14, 32, 65, 84, 111, 124, 147, 212, 236, 320, 380, 465, 517, 584, 636, 876, 955, 2126, 2570, 2962, 4254, 4883 (list; graph; listen)
OFFSET

1,2

COMMENT

For n>1 a(n) is composite because if m is a prime number then S_m(m)=m so in such case S_m can not be a cyclic permutation.

EXAMPLE

If m>3 & pi(m)=k then for n=1,2,...,m S_m(n) are respectively c(1),c(2),...,c(m-k-1),1,prime(1),prime(2),...,prime(k).

14 is in the sequence because S_14=(1, 4, 9, 2, 6, 12, 7, 14, 13, 11, 5, 10, 3, 8) is a cyclic permutation.

MATHEMATICA

f[n_] := (a = Table[Prime[k], {k, PrimePi[n]}]; b = Complement [Range[2, n], a]; c = Join[b, {1}, a]); d[n_, m_] := f[n] [[m]]; g[r_] := (v = {1}; d[m_] := d[r, m]; For[t = 1, !MemberQ[v, d[v[[ -1]]]] && t < r, v = Append[v, d[v[[ -1]]]]; t++ ]; t); Do[If[ !PrimeQ[r] && r == g[r], Print[r]], {r, 3000}]

CROSSREFS

Cf. A002808, A108515, A108517.

Sequence in context: A103419 A005202 A106526 this_sequence A077068 A096003 A114058

Adjacent sequences: A108513 A108514 A108515 this_sequence A108517 A108518 A108519

KEYWORD

more,nonn

AUTHOR

Farideh Firoozbakht (f.firoozbakht(AT)math.ui.ac.ir), Jun 30 2005

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 29 17:54 EDT 2008. Contains 143238 sequences.


AT&T Labs Research