OFFSET
1,3
COMMENTS
The initial 0 is included by convention. The single-digit numbers are included with the reasoning that the number formed by digits in even positions is zero, and thus divisible by (= a multiple of) any other number, and here in particular the number formed by first digit.
By "digits in odd positions" we mean the first (most significant), third, fifth, etc. digits; e.g., for the numbers 12345 or 123456 this would be 135.
An extended version of Eric Angelini's "integears" A267085.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
E. Angelini, Integears, SeqFan list, Jan. 10, 2016.
EXAMPLE
12 is in the sequence because 1 divides 2.
213 is in the sequence because 1 divides 23.
1020 is in the sequence because 12 divides 00 = 0. (Any number divides 0 therefore any number which has every other digit equal to zero is in the sequence.)
MAPLE
G:= proc(n) option remember;
local t, r;
t:= n mod 10;
r:= procname((n-t)/10);
[r[2], r[1]*10+t]
end proc:
G(0):= [0, 0]:
filter:= proc(n)
local r;
r:= G(n);
has(r, 0) or (max(r) mod min(r) = 0)
end proc:
select(filter, [$0..1000]); # Robert Israel, Jan 11 2016
MATHEMATICA
{0}~Join~Select[Range@ 135, Total@ Boole@ Map[ReplaceAll[List -> Divisible], {#, Reverse@ #} /. {_, 0} -> Nothing] &@ Map[FromDigits@ Reverse@ # &, {Map[First, #], Map[Last, #]}] &@ Which[Length@ # < 2, {#}, EvenQ@ Length@ #, Partition[#, 2, 2], True, Append[Partition[#, 2, 2], {Last@ #, 0}]] &@ Reverse@ IntegerDigits@ # > 0 &] (* Michael De Vlieger, Jan 11 2016 *)
PROG
(PARI) is(n, d=digits(n))={if(n=d*matrix(#d, 2, z, s, if(z==Mod(s, 2), 10^((#d-z)\2))), n[2] && n[1]%n[2]==0 || n[2]%n[1]==0, 1)}
CROSSREFS
KEYWORD
nonn,base,changed
AUTHOR
M. F. Hasler, Jan 10 2016
STATUS
approved