login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


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<gcd(n, k=fromdigits(vector(nd, i, digs[p[i]]))), s = setunion(Set([k]), s))); length(s); }; \\ Antti Karttunen, Dec 16 2017

CROSSREFS

Cf. A091854.

Sequence in context: A232550 A305426 A322811 * A193773 A091304 A049847

Adjacent sequences:  A091850 A091851 A091852 * A091854 A091855 A091856

KEYWORD

base,easy,nonn,look

AUTHOR

Amarnath Murthy, Mar 13 2004

EXTENSIONS

Edited, corrected and extended by Klaus Brockhaus, Mar 16 2004

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 29 11:16 EST 2020. Contains 331337 sequences. (Running on oeis4.)