cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A266912 Numbers n which are anagrams of n+18.

Original entry on oeis.org

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

Views

Author

Vincenzo Librandi, Jan 06 2016

Keywords

Comments

n is an anagram of n+k when k is a multiple of 9.

Examples

			24 is a term of the sequence because 24 and 24+18 = 42 are anagrams.
		

Crossrefs

Cf. A228157.

Programs

  • Magma
    [n: n in [0..700] | Sort(Intseq(n)) eq Sort(Intseq(n+18))]; // Bruno Berselli, Jan 08 2016
  • 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]]
  • PARI
    isok(n) = vecsort(digits(n)) == vecsort(digits(n+18)); \\ Michel Marcus, Jan 08 2016
    

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)