login
A108517
Numbers m such that the permutation of the first m natural numbers R_m(n)=if(1<=n<m-pi(m), c(n), if(n=m, 1, prime(n-m-pi(m)+1))) is a cyclic permutation where c(k) is the k-th composite number(for each natural number k, c(k)=A002808(k)).
2
1, 15, 33, 66, 85, 112, 125, 148, 213, 237, 321, 381, 466, 518, 585, 637, 956, 2127, 2571, 4255, 4884, 6686, 9193, 10412, 11073
OFFSET
1,2
COMMENTS
All the 24 known terms of this sequence are nonprimes. Is this true in general?
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),prime(1),prime(2),...,prime(k),1.
33 is in the sequence because R_33=(1, 4, 9, 16, 26, 11, 20, 32, 31, 29, 19, 30, 23, 3, 8, 15, 25, 7, 14, 24, 5, 10, 18, 18, 28, 17, 27, 13, 22, 2, 6, 12, 21, 33) is a cyclic permutation.
MATHEMATICA
(f[n_] := (a = Table[Prime[k], {k, PrimePi[n]}]; b = Complement [Range[2, n], a]; c = Join[b, a, {1}]); 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, 10800}])
CROSSREFS
KEYWORD
more,nonn
AUTHOR
Farideh Firoozbakht, Jul 03 2005
STATUS
approved