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.

A090144 Numbers n which when converted to some base between 2 and 9 yield a result with the same digits as n in a different order.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 13, 23, 46, 158, 227, 265, 316, 445, 1030, 1045, 1135, 1234, 1236, 1273, 1366, 1380, 1431, 1454, 1653, 2027, 2060, 2116, 2154, 2315, 2534, 3160, 3161, 3162, 3163, 3164, 3165, 3166, 3167, 3226, 5270, 5567, 5637, 5783, 10144, 10235
Offset: 1

Views

Author

Chuck Seggelin, Nov 22 2003

Keywords

Examples

			a(12)=158 because 158 in base 9 is 185, a permutation of the digits of 158. a(19)=1135 because 1135 in base 6 is 5131. a(77)=30576 because 30576 in base 8 is 73560.
		

Programs

  • Maple
    "replace all /n in the code below with backslash-n.";digListToNum := proc(L) local i, result; result := 0; for i from nops(L) to 1 by -1 do; result := result*10+L[i]; od; result; end;basePerm := proc(n) local b, nL, nbL, ok; nL := sort(convert(n,base,10));ok := false; for b from 2 to 9 do; nbL := sort(convert(n,base,b)); if nL=nbL then printf("%10d in base %2d = %10d./n",n,b,digListToNum(convert(n,base,b)));ok := true; fi; od; ok; end;basePermList := proc (endAt) local i, L; L := []; for i from 1 to endAt do; if basePerm(i) then L := [op(L),i] fi; od; L; end;basePermList(100000);