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

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A091853 a(n) is the number of numbers k such that k is obtained by permuting the digits of n and gcd(n,k) > 1. 2
 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 6, 1, 4, 6 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,12 COMMENTS For a number like 12345 which is a multiple of three and does not contain zero, all 5! = 120 permutations yield a distinct number divisible by 3, thus a(12345) = 120. However, 120 occurs for the first time at n = 10236, which is also a multiple of three. - Antti Karttunen, Dec 16 2017 LINKS Antti Karttunen, Table of n, a(n) for n = 1..12345 EXAMPLE 1 is the only number obtained by permuting the digits of 1, gcd(1,1) = 1, hence a(1) = 0. 001, 010, 100 are the numbers obtained by permuting the digits of 100, gcd(100,1) = 1, gcd(100,10) = 10, gcd(100,100) = 100, hence a(100) = 2. MATHEMATICA Table[Count[Union@ Map[# Boole[! CoprimeQ[#, n]] &@ FromDigits@ # &, Permutations@ IntegerDigits@ n], _?(# > 0 &)], {n, 105}] (* Michael De Vlieger, Dec 16 2017 *) PROG (PARI) A091853(n) = { my(digs=digits(n), nd=length(digs), k, p, s = Set([])); for(j=0, nd!-1, p=numtoperm(nd, j); if(1

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.

Last modified September 9 06:59 EDT 2024. Contains 375762 sequences. (Running on oeis4.)