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.

A241142 Numbers n such that n and 6n share at least one digit.

This page as a plain text file.
%I A241142 #13 Apr 17 2014 18:17:21
%S A241142 2,4,6,8,10,12,14,16,17,18,19,20,21,22,23,24,25,26,27,28,30,31,32,34,
%T A241142 36,38,39,40,41,42,44,46,48,49,50,52,53,54,56,58,59,60,61,62,63,64,66,
%U A241142 68,70,72,73,74,75,76,78,79,80,81,82,83,84,85,86,88,90,92,94,95,96,98,99,100
%N A241142 Numbers n such that n and 6n share at least one digit.
%C A241142 All numbers n which are congruent to 0 (mod 6) have this characteristic.
%C A241142 All even n have this characteristic, because n == 6n mod 10. _Robert Israel_, Apr 17 2014
%H A241142 Robert Israel, <a href="/A241142/b241142.txt">Table of n, a(n) for n = 1..10000</a>
%e A241142 12 is in the sequence since 12 and 6*12 = 72 and together they share the digit 2.
%p A241142   N:= 10000;  # to get all entries up to N
%p A241142 filter:= proc(n) local L, L6;
%p A241142    L:= convert(convert(n,base,10),set);
%p A241142    L6:= convert(convert(6*n,base,10),set);
%p A241142    L intersect L6 <> {};
%p A241142 end;
%p A241142 select(filter, [$1..N]); # _Robert Israel_, Apr 17 2014
%t A241142 fQ[n_] := Intersection[ IntegerDigits[ n], IntegerDigits[6 n]] != {}; Select[ Range[ 100], fQ]
%o A241142 (PARI) isok(n) = #setintersect(Set(digits(n)), Set(digits(6*n))); \\ _Michel Marcus_, Apr 17 2014
%Y A241142 Cf. A129845, A129846, A129848, A241141, A241143, A241144, A241145, A241146.
%K A241142 base,easy,nonn
%O A241142 1,1
%A A241142 _Robert G. Wilson v_, Apr 16 2014