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.

A267086 Numbers such that the number formed by digits in even positions divides, or is divisible by, the number formed by the digits in odd positions; zero allowed.

This page as a plain text file.
%I A267086 #27 Dec 23 2024 14:53:44
%S A267086 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,24,26,28,
%T A267086 30,31,33,36,39,40,41,42,44,48,50,51,55,60,61,62,63,66,70,71,77,80,81,
%U A267086 82,84,88,90,91,93,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,122,124,126,128,132,135
%N A267086 Numbers such that the number formed by digits in even positions divides, or is divisible by, the number formed by the digits in odd positions; zero allowed.
%C A267086 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.
%C A267086 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.
%C A267086 An extended version of _Eric Angelini_'s "integears" A267085.
%C A267086 Sequence A263314 is a subsequence up to 120, but 121 is in A263314 and not in this sequence.
%H A267086 Robert Israel, <a href="/A267086/b267086.txt">Table of n, a(n) for n = 1..10000</a>
%H A267086 E. Angelini, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2016-January/015951.html">Integears</a>, SeqFan list, Jan. 10, 2016.
%e A267086 12 is in the sequence because 1 divides 2.
%e A267086 213 is in the sequence because 1 divides 23.
%e A267086 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.)
%p A267086 G:= proc(n) option remember;
%p A267086     local t,r;
%p A267086     t:= n mod 10;
%p A267086     r:= procname((n-t)/10);
%p A267086     [r[2],r[1]*10+t]
%p A267086 end proc:
%p A267086 G(0):= [0,0]:
%p A267086 filter:= proc(n)
%p A267086 local r;
%p A267086 r:= G(n);
%p A267086 has(r,0) or (max(r) mod min(r) = 0)
%p A267086 end proc:
%p A267086 select(filter, [$0..1000]); # _Robert Israel_, Jan 11 2016
%t A267086 {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 *)
%o A267086 (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)}
%Y A267086 Cf. A267085, A263314.
%Y A267086 See also A080463, A080464 and A080465.
%K A267086 nonn,base
%O A267086 1,3
%A A267086 _M. F. Hasler_, Jan 10 2016