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!)
A108515 Numbers m such that the permutation of the first m natural numbers T_m(n) = if(1<=n<=pi(m),prime(n),c(n-pi(m)-1)) is a cyclic permutation where c(k) is the k-th composite number and c(0)=1 (for each natural number k, c(k-1)=A018252(k)). 2
1, 2, 3, 5, 13, 31, 43, 251, 6961, 24971 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
For n>1 a(n) is prime because if m is a composite number then T_m(m)=m so in such case T_m cannot be a cyclic permutation. There is no further term up to prime(4420). - Farideh Firoozbakht, Jun 29 2005
LINKS
EXAMPLE
If m>3 & m=prime(k) then for n=1,2,...,m T_m(n) are respectively prime(1),prime(2),...,prime(k),1,4,...,m-1.
31 is in the sequence because T_31=(1, 2, 3, 5, 11, 31, 30, 28, 26, 24, 21, 16, 9, 23, 20, 15, 8, 19, 14, 6, 13, 4, 7, 17, 10, 29, 27, 25, 22, 18, 12) is a cyclic permutation.
MATHEMATICA
f[n_] := (a = Table[Prime[k], {k, PrimePi[n]}]; b = Complement[ Range[n], a]; c = Join[a, b]); d[n_, m_] := f[n][[m]]; g[r_]:= (v = {1}; d[m_] := d[Prime[r], m]; For[t = 1, ! MemberQ[v, d[v[[ -1]]]] && t < Prime[r], v = Append[ v, d[v[[ -1]]]]; t++ ]; t); w = {1}; Do[If[Prime[r] == g[r], w = Append[w, Prime[r]]; Print[w]], {r, 4420}] (Firoozbakht)
CROSSREFS
Cf. A018252.
Sequence in context: A324375 A038879 A162390 * A167495 A041519 A355512
KEYWORD
more,nonn
AUTHOR
Mehdi Khorrami (mymontain(AT)yahoo.com), Jun 27 2005
EXTENSIONS
More terms from Farideh Firoozbakht, Jun 29 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 April 25 08:27 EDT 2024. Contains 371964 sequences. (Running on oeis4.)