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!)
A216188 Number of unordered pairs of anagrammatic (positive) integers adding to n. 1
0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 3, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 3, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,44

COMMENTS

Two positive integers are here defined as "anagrammatic" if (in base 10) they have the same number of 0 digits, 1 digits, 2 digits, ..., 9 digits. Thus, 123 and 231 are anagrammatic, but not 301 and 013, as leading zeros are omitted.

LINKS

T. D. Noe and Christian Schulz, Table of n, a(n) for n = 1..10000 (first 1000 terms from T. D. Noe)

EXAMPLE

For n = 88, the a(88) = 4 pairs are {17,71}, {26,62}, {35,53}, and {44,44}. For n = 609, the a(609) = 1 pair is {237,372}.

MAPLE

getDigit := (n, k) -> floor(n/10^k) mod 10; getMaxDigit := n -> floor(log10(n)) + 1; getDigitMultiset := n -> convert([seq(getDigit(n, k), k=0..getMaxDigit(n)-1)], multiset); isAnagram := (m, n) -> evalb(getDigitMultiset(m) = getDigitMultiset(n)); A216188 := n -> convert([seq(eval(isAnagram(k, n-k), [true=1, false=0]), k=1..floor(n/2))], `+`); seq(A216188(n), n=1..50)

MATHEMATICA

IsAnagram[x_, y_, b_: 10] := Sort[Permutations[IntegerDigits[x, b]]] == Sort[Permutations[IntegerDigits[y, b]]]; FindAnagramSums[n_, b_: 10] := Select[Table[{k, n - k}, {k, 0, Floor[n/2]}], IsAnagram[#[[1]], #[[2]], b] &]; Table[Length[FindAnagramSums[n]], {n, 1, 200}]

CROSSREFS

Sequence in context: A292262 A160804 A085854 * A117145 A083912 A256003

Adjacent sequences:  A216185 A216186 A216187 * A216189 A216190 A216191

KEYWORD

nonn,base

AUTHOR

Christian Schulz, Mar 11 2013

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 September 19 17:56 EDT 2020. Contains 337180 sequences. (Running on oeis4.)