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.

A241501 Numbers n such that the sum of all numbers formed by deleting two digits from n is equal to n.

Original entry on oeis.org

167564622641, 174977122641, 175543159858, 175543162247, 183477122641, 183518142444, 191500000000, 2779888721787, 2784986175699, 212148288981849, 212148288982006, 315131893491390, 321400000000000, 417586822240846, 417586822241003, 418112649991390
Offset: 1

Views

Author

Anthony Sand, Apr 24 2014

Keywords

Examples

			Sum(650000000000000) (15 digits) = 6000000000000 x 13 + 5000000000000 x 13 + 6500000000000 x (78 = 13C2) + 0.
		

Crossrefs

Cf. A131639 (n equal to sum of all numbers formed by deleting one digit from n).

Programs

  • PARI
    padbin(n, len) = {b = binary(n); while(length(b) < len, b = concat(0, b);); b;}
    isok(n) = {d = digits(n); nb = #d; s = 0; for (j=1, 2^nb-1, if (hammingweight(j) == (nb-2), b = padbin(j, nb); nd = []; k = 1; for (i=1, nb, if (b[i], nd = concat(nd, d[k])); k++;); s += subst(Pol(nd), x, 10););); s == n;} \\ Michel Marcus, Apr 25 2014

Formula

For a number with n digits there are nC2 = n!/(n-2)!/2! substrings generated by removing two digits from the original number. So for 12345, these are 345, 245, 235, 234, 145, 135, 134, 125, 124, 123. Sum(x) is defined as the sum of these substrings for a number x and the sequence above is those numbers such that sum(x) = x.