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.

Showing 1-3 of 3 results.

A289544 Pandigital numbers (each digit 0-9 used exactly once) where the first 3 digits plus the next 3 digits equals the last 4 digits.

Original entry on oeis.org

2467891035, 2497861035, 2647891053, 2697841053, 2847691053, 2867491035, 2897461035, 2897641053, 3247651089, 3257641089, 3427561098, 3467521098, 3478591206, 3498571206, 3527461098, 3567421098, 3578491206, 3598471206, 3647251089, 3657241089, 4236751098, 4256731098
Offset: 1

Views

Author

Jonathan Schwartz, Aug 02 2017

Keywords

Comments

Leading zeros in the last four digits are not included, else 1246590783, with 124 + 659 = 783 would be the first term.

Examples

			2467891035 is in the sequence as 246|789|1035: 246 + 789 = 1035 and each digit (0-9) is used exactly once.
		

Crossrefs

Programs

  • Mathematica
    FromDigits /@ Select[Permutations[Range[0, 9]], And[#1 + #2 == #3, #3 >= 1000] & @@ Map[FromDigits, {Take[#, 3], #[[4 ;; 6]], Take[#, -4]}] &] (* Michael De Vlieger, Aug 02 2018 *)
  • Python
    from itertools import permutations
    def t2i(t): return int("".join(map(str, t)))
    alst = [t2i(p) for p in permutations(range(10)) if p[6] != 0 and t2i(p[:3]) + t2i(p[3:6]) == t2i(p[6:])]
    print(alst) # Michael S. Branicky, May 30 2022

A289552 Zeroless pandigital numbers (each digit 1-9 used exactly once) where the first 3 digits plus the next 3 digits equals the last 3 digits.

Original entry on oeis.org

124659783, 125739864, 127359486, 127368495, 128367495, 128439567, 129357486, 129438567, 129654783, 129735864, 134658792, 135729864, 138429567, 138654792, 139428567, 139725864, 142596738, 142695837, 143586729, 145692837, 146583729, 146592738, 152487639, 152784936
Offset: 1

Views

Author

Jonathan Schwartz, Aug 02 2017

Keywords

Examples

			124659783: 124 + 659 = 783.
		

Crossrefs

Programs

  • Java
    import java.util.*;public class Sequence{public static void main(String[] args) {
    for (long i = 123456789l; i < 987654321l; i++)
    {Set set = new HashSet();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 + ", ");}}}}}}
    
  • Mathematica
    FromDigits/@Select[Permutations[Range[9]],FromDigits[Take[#,3]]+FromDigits[ Take[ #,{4,6}]] == FromDigits[Take[#,-3]]&] (* Harvey P. Dale, Oct 18 2022 *)
  • 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

A290725 Numbers with 3k digits for some k such that the first k digits minus the middle k digits equals the last k digits.

Original entry on oeis.org

101, 110, 202, 211, 220, 303, 312, 321, 330, 404, 413, 422, 431, 440, 505, 514, 523, 532, 541, 550, 606, 615, 624, 633, 642, 651, 660, 707, 716, 725, 734, 743, 752, 761, 770, 808, 817, 826, 835, 844, 853, 862, 871, 880, 909, 918, 927, 936, 945, 954, 963, 972, 981, 990, 100010, 100109, 100208, 100307
Offset: 1

Views

Author

N. J. A. Sloane, Aug 09 2017

Keywords

Examples

			987654333 is a member because 987-654=333.
		

Crossrefs

A286846 is a subsequence.

Programs

  • Maple
    N:= 100: # to get the first N terms
    count:= 0:
    Res:= NULL:
    for d from 1 while count < N do
      for x1 from 10^(d-1) to 10^d-1 while count < N do
        for x2 from 0 to x1 while count < N do
          x3:= x1 - x2;
          count:= count+1;
          Res:= Res, x1*10^(2*d)+x2*10^d+x3;
    od od od:
    Res; # Robert Israel, Aug 09 2017
  • Mathematica
    kd3Q[n_]:=Module[{c=FromDigits/@Partition[IntegerDigits[n], IntegerLength[ n]/3]},c[[1]]-c[[2]]==c[[3]]]; Table[Select[Range[10^(3n-1),10^(3n)-1], kd3Q],{n,2}]//Flatten (* Harvey P. Dale, Feb 25 2020 *)

Extensions

More terms from Robert Israel, Aug 09 2017
Showing 1-3 of 3 results.