login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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)). 2
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; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

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 cannot be a cyclic permutation.

LINKS

Table of n, a(n) for n=1..25.

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: A342602 A106526 A319766 * A219774 A274208 A077068

Adjacent sequences:  A108513 A108514 A108515 * A108517 A108518 A108519

KEYWORD

more,nonn

AUTHOR

Farideh Firoozbakht, Jun 30 2005

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 16 05:55 EDT 2022. Contains 356160 sequences. (Running on oeis4.)