Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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!)
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
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: A363851 A305426 A322811 * A193773 A369377 A091304
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 27 15:19 EDT 2024. Contains 375470 sequences. (Running on oeis4.)