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-1 of 1 results.

A256104 Differential autobiographical numbers: number n = x0 x1 x2 ... x9 such that xi is the number of pairs (xj, xk), j different from k, where |xj - xk| = i.

Original entry on oeis.org

20404, 31330
Offset: 1

Views

Author

Michel Lagneau, Mar 14 2015

Keywords

Comments

The first digit specifies how many |xj - xk| = 0 in the number, the next digit specifies how many |xj - xk| = 1, etc.

Examples

			31330 is in the sequence because:
|x0 - x2| = 0, |x0 - x3| = 0 and |x2 - x3| = 0 => x0 = 3;
|x1 - x3| = 1 => x1 = 1;
|x0 - x1| = 2, |x1 - x2| = 2 and |x1 - x3| = 2 => x2 = 3;
|x0 - x4| = 3, |x2 - x4| = 3 and |x3 - x4| = 3 => x2 = 3;
|xj - xk| = 4 does not occur for all j and k => x4 = 0.
		

Crossrefs

Programs

  • Maple
    for n from  10 to 10^10 do:
      x:=convert(n,base,10):n0:=nops(x):T:=array(0..9):
        for a from 0 to 9 do:
        T[a]:=0:
        od:
         for i from 0 to 9 do:
          for j from 1 to n0-1 do:
           for k from j+1 to n0 do:
           if abs(x[j]-x[k])= i
           then
           T[i]:=T[i]+1:
           else
           fi:
         od:
        od:
       od:
        s:=sum('T[m]*10^(n0-m-1)', 'm'=0..9):
        if s=n then print(n) else fi:od:
Showing 1-1 of 1 results.