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!)
A072356 a(n) = if n=p*q^2 for primes p<>q then q*p^2 else n. 1

%I #13 Mar 08 2016 18:30:13

%S 1,2,3,4,5,6,7,8,9,10,11,18,13,14,15,16,17,12,19,50,21,22,23,24,25,26,

%T 27,98,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,242,75,46,47,48,

%U 49,20,51,338,53,54,55,56,57,58,59,60,61,62,147,64,65,66,67,578,69,70,71

%N a(n) = if n=p*q^2 for primes p<>q then q*p^2 else n.

%C a(a(n))=n: a self-inverse permutation of natural numbers.

%H Ivan Neretin, <a href="/A072356/b072356.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%p N:= 100: # to get a(1) to a(N)

%p Ps:= select(isprime, [$1..N/2]):

%p Qs:= select(`<=`,Ps,floor(sqrt(N/2))):

%p A:= <($1..N)>:

%p for p in Ps do

%p for q in Qs do

%p if p*q^2 <= N then A[p*q^2]:= q*p^2 fi

%p od

%p od:

%p convert(A,list); # _Robert Israel_, Mar 08 2016

%t Table[If[Sort[(ar = Transpose[FactorInteger[n]])[[2]]] == {1, 2}, Times @@ (Reverse[ar[[1]]]^ar[[2]]), n], {n, 71}] (* _Ivan Neretin_, Jul 09 2015 *)

%Y Cf. A054753.

%K nonn

%O 1,2

%A _Reinhard Zumkeller_, Jul 18 2002

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 March 29 10:22 EDT 2024. Contains 371268 sequences. (Running on oeis4.)