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!)
A241501 Numbers n such that the sum of all numbers formed by deleting two digits from n is equal to n. 1

%I #11 May 03 2014 13:17:16

%S 167564622641,174977122641,175543159858,175543162247,183477122641,

%T 183518142444,191500000000,2779888721787,2784986175699,

%U 212148288981849,212148288982006,315131893491390,321400000000000,417586822240846,417586822241003,418112649991390

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

%H Anthony Sand, <a href="/A241501/b241501.txt">Table of n, a(n) for n = 1..48</a>

%F 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.

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

%o (PARI) padbin(n, len) = {b = binary(n); while(length(b) < len, b = concat(0, b);); b;}

%o 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

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

%K nonn,base

%O 1,1

%A _Anthony Sand_, Apr 24 2014

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 16:22 EDT 2024. Contains 371780 sequences. (Running on oeis4.)