login
This site is supported by donations to The OEIS Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A054430 Simple self-inverse permutation of natural numbers: List each clump of phi(n) numbers (starting from phi(2) = 1) in reverse order. 2
1, 3, 2, 5, 4, 9, 8, 7, 6, 11, 10, 17, 16, 15, 14, 13, 12, 21, 20, 19, 18, 27, 26, 25, 24, 23, 22, 31, 30, 29, 28, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 45, 44, 43, 42, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 63, 62, 61, 60, 59, 58, 71, 70, 69, 68, 67, 66, 65, 64, 79 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

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

Index entries for sequences that are permutations of the natural numbers

MAPLE

ReverseNextPhi_n_elements_permutation(30); with(numtheory, phi); ReverseNextPhi_n_elements_permutation := proc(u) local m, a, n, k, i; a := []; k := 0; for n from 2 to u do m := k + phi(n); for i from 1 to phi(n) do a := [op(a), m]; m := m-1; k := k+1; od; od; RETURN(a); end;

MATHEMATICA

A[u_]:=Block[{m, a={}, n, k=0, i}, For[n=2, n<=u, n++, m=k + EulerPhi[n]; For[i=1, i<=EulerPhi[n], i++, AppendTo[a, m]; m=m - 1; k = k + 1]]; Return [a]]; A[30] (* Indranil Ghosh, May 23 2017, translated from MAPLE code *)

PROG

(Python)

from sympy import totient

def A(u):

    a=[]

    k=0

    for n in xrange(2, u + 1):

        m=k + totient(n)

        for i in xrange(1, totient(n) + 1):

            a+=[m, ]

            m-=1

            k+=1

    return a

print A(30) # Indranil Ghosh, May 23 2017, translated from MAPLE code

CROSSREFS

Maps fractions between A020652/A020653 and A020653/A020652.

See also A054429.

Sequence in context: A275900 A296007 A277437 * A276572 A204891 A094681

Adjacent sequences:  A054427 A054428 A054429 * A054431 A054432 A054433

KEYWORD

nonn,easy

AUTHOR

Antti Karttunen

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 20 14:40 EST 2019. Contains 319333 sequences. (Running on oeis4.)