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.

A256005 Numbers m such that the result of prepending a zero digit to m, removing the least significant digit D, and prepending D, is divisible by m.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 27, 37, 101, 202, 303, 404, 505, 606, 707, 808, 909, 1084, 1355, 1626, 1897, 2168, 2439, 10101, 10582, 10989, 11583, 11655, 12987, 13986, 15444, 15873, 16317, 18648, 19305, 20202, 20979, 21164, 23166, 25641, 26455, 27027, 30303, 30888
Offset: 1

Views

Author

Paolo P. Lava, May 06 2015

Keywords

Comments

For palindromic numbers the ratio is equal to 10.

Examples

			37 is in the sequence because prepending a 0 gives 037, removing the least significant digit 7 then gives 03, and finally prepending the 7 gives 703, which is divisible by 37.
25641 is in the sequence because prepending a 0 gives 025641, removing the least significant digit 1 then gives 025641, and finally prepending the 1 gives 102564, which is divisible by 25641.
		

Crossrefs

Cf. A034089.

Programs

  • Maple
    P:=proc(q) local a,n; for n from 1 to q do
    a:=(n mod 10)*10^(ilog10(n)+1)+trunc(n/10);
    if not a=n then if type(a/n,integer) then print(n);
    fi; fi; od; end: P(10^7);
  • Mathematica
    Select[Range@31000,IntegerQ[FromDigits[RotateRight[Insert[IntegerDigits[#],0,1]]]/#]&] (* Ivan N. Ianakiev, May 28 2015 *)
  • PARI
    is(n)=my(k=n%10*10^#digits(n)+n\10); k>n && k%n==0 \\ Charles R Greathouse IV, May 08 2015

Extensions

'Name' and 'Examples' sections reworded by Ivan N. Ianakiev, Aug 05 2015 (following the suggestion of Jon E. Schoenfield)