The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation. Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A281724 Numbers n with the property that (sum of digits of n) times (number of digits of n) equals (sum of {each digit of n} raised to the power {number of digits in n}). 0
 1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 22, 102, 120, 201, 210 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 COMMENTS Numbers with the property that q-p = 0, where p = (sum of digits of n) times (number of digits of n) (A110805) and q = (sum of {each digit of n} raised to the power {number of digits in n}) (A101337). From David Consiglio, Jr., Jan 29 2017: (Start) The sequence is finite and 210 is the last term. Proof: 1. Let Y = length(n). 2. The maximum value of digit_sum(n) is 9Y. 3. Since p = Y*digit_sum(n), p has a maximum value of 9Y^2. 4. 2^Y > 9Y^2 for all Y > 9. Therefore q > p for all numbers longer than 9  digits that contain any digits > 1.    a. Example: 1,000,000,002. q = 1^5 + 8*0^5 + 2^10 = 1025. The largest p value for a 10 digit number would be for 9,999,999,999 which has p = 10*(9*10) = 900. Since q > all possible p values at this size, any member of this sequence must either have fewer than 10 digits or contain only 0's and 1's as digits. 5. Now we can consider only numbers with 0 and 1 digits. 6. Let Z = number of 1 digits in a number n. 7. q = Z because q = Z*1^Y + (Y-Z)*0^Y = Z. 8. p = YZ because the sum of the digits is equal to the number of 1's. 9. Z = YZ only in the case of Y = 1. Thus, the only member of this sequence that contains only 0's and 1's has a length of only 1 digit. Thus, n = 1 is in this sequence. 10. Therefore a candidate number must have fewer than 10 digits if it contains a digit 2 or larger, and must have fewer than 2 digits if it does not. All numbers in this range have been checked, and no additional values of n with q = p have been found. Thus the sequence is finite. (End) LINKS EXAMPLE 9 is a term because             9^1 = 1(9);    20 is a term because       2^2 + 0^2 = 2(2 + 0);   210 is a term because 2^3 + 1^3 + 0^3 = 3(2 + 1 + 0). MATHEMATICA W = Array[Total[IntegerDigits[#]^IntegerLength[#]]&, 100]-Table[IntegerLength[n] * Total[IntegerDigits[n]], {n, 100}]; Flatten[Position[W, 0]] PROG (PYTHON) from itertools import product for n in range(1, 11): ....for x in map(''.join, product('01', repeat=n)): ........if '1' in y: ............q = 0 ............p = len(y) ............temp1 = 0 ............for d in y: ................temp1 += int(d) ................q += int(d)**p ............p = p*temp1 ............if q == p: ................print("HIT", y, q, p) # David Consiglio, Jr., Jan 29 2017 CROSSREFS Cf. A101337, A110805. Sequence in context: A248500 A250041 A132029 * A217489 A217491 A122619 Adjacent sequences:  A281721 A281722 A281723 * A281725 A281726 A281727 KEYWORD nonn,fini AUTHOR José de Jesús Camacho Medina, Jan 28 2017 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 24 18:43 EDT 2021. Contains 345419 sequences. (Running on oeis4.)