OFFSET
1,1
LINKS
Jonathan Schwartz, Table of n, a(n) for n = 1..336
David A. Corneth, PARI program
Eric Weisstein, World of Mathematics, Pandigital Number.
EXAMPLE
124659783: 124 + 659 = 783.
MATHEMATICA
FromDigits/@Select[Permutations[Range[9]], FromDigits[Take[#, 3]]+FromDigits[ Take[ #, {4, 6}]] == FromDigits[Take[#, -3]]&] (* Harvey P. Dale, Oct 18 2022 *)
PROG
(Java) import java.util.*; public class Sequence{public static void main(String[] args) {
for (long i = 123456789l; i < 987654321l; 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)))
{System.out.print(i + ", "); }}}}}}
(Python)
from itertools import permutations
def t2i(t): return int("".join(map(str, t)))
alst = [t2i(p) for p in permutations(range(1, 10)) if t2i(p[:3]) + t2i(p[3:6]) == t2i(p[6:])]
print(alst) # Michael S. Branicky, May 30 2022
CROSSREFS
KEYWORD
nonn,base,fini,full
AUTHOR
Jonathan Schwartz, Aug 02 2017
STATUS
approved