[go: up one dir, main page]

login
A266912
Numbers n which are anagrams of n+18.
0
13, 24, 35, 46, 57, 68, 79, 102, 113, 124, 135, 146, 157, 168, 179, 202, 213, 224, 235, 246, 257, 268, 279, 302, 313, 324, 335, 346, 357, 368, 379, 402, 413, 424, 435, 446, 457, 468, 479, 502, 513, 524, 535, 546, 557, 568, 579, 602, 613, 624, 635, 646, 657
OFFSET
1,1
COMMENTS
n is an anagram of n+k when k is a multiple of 9.
FORMULA
From Chai Wah Wu, Dec 23 2016: (Start)
a(n) = a(n-1) + a(n-8) - a(n-9) for n > 9.
G.f.: x*(-2*x^8 + 23*x^7 + 11*x^6 + 11*x^5 + 11*x^4 + 11*x^3 + 11*x^2 + 11*x + 13)/(x^9 - x^8 - x + 1).
First difference is 8-periodic: 11,11,11,11,11,11,23,11,... (End)
EXAMPLE
24 is a term of the sequence because 24 and 24+18 = 42 are anagrams.
MATHEMATICA
Select[Range[0, 600], Sort[IntegerDigits[#]] == Sort[IntegerDigits[# + 18]] &] (* or *) Reap[Do[If[Sort@IntegerDigits[n] == Sort@IntegerDigits[n + 18], Sow[n]], {n, 600}]][[-1, 1]]
PROG
(PARI) isok(n) = vecsort(digits(n)) == vecsort(digits(n+18)); \\ Michel Marcus, Jan 08 2016
(Magma) [n: n in [0..700] | Sort(Intseq(n)) eq Sort(Intseq(n+18))]; // Bruno Berselli, Jan 08 2016
CROSSREFS
Cf. A228157.
Sequence in context: A063315 A104342 A119590 * A363823 A032607 A335973
KEYWORD
nonn,base,easy
AUTHOR
Vincenzo Librandi, Jan 06 2016
STATUS
approved