login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A286845 Every 3-digit number 'a' such that there exist two other 3-digit numbers, 'b' and 'c', such that a - b = c, and a,b,c collectively use every digit 1-9 exactly once. 1
459, 468, 486, 495, 549, 567, 576, 594, 639, 648, 657, 675, 693, 729, 738, 783, 792, 819, 837, 846, 864, 873, 891, 918, 927, 936, 945, 954, 963, 972, 981 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
For example, 459 - 173 = 286 and 459173286 is a zeroless pandigital number.
LINKS
MATHEMATICA
With[{s = Select[Range[#/9, #] &[10^3 - 1], DigitCount[#, 10, 0] == 0 &]}, Select[s, Function[n, AnyTrue[s, Function[k, And[n - k > 0, FreeQ[#, i_ /; i == 0], Length@ # == 9] &@ Union@ Apply[Join, IntegerDigits@ {n, k, n - k}]]]]]] (* Michael De Vlieger, Aug 01 2017 *)
PROG
(Java) import java.util.*; public class GenerateSequence {public static void main(String[] args) { Set<Integer> seq = new TreeSet<Integer>();
for (long i = 987654321l; i > 123456789; i--) {Set<Character> set = new HashSet<Character>(); String number = Long.toString(i);
if (!(number.contains("0"))) {for (int n = 0; n < 9; n++){set.add(number.charAt(n)); }
if (set.size() == 9) {
if (Integer.valueOf(number.substring(0, 3)) - Integer.valueOf(number.substring(3, 6)) == Integer.valueOf(number.substring(6, 9))) { seq.add(Integer.valueOf(number.substring(0, 3))); } } } System.out.println(seq); } }
CROSSREFS
Sequence in context: A251474 A251468 A098765 * A062043 A331468 A124620
KEYWORD
nonn,base,fini,full
AUTHOR
Jonathan Schwartz, Aug 01 2017
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 03:01 EDT 2024. Contains 371767 sequences. (Running on oeis4.)