|
|
A322323
|
|
Self-stuffable numbers (see the Comments section for definition).
|
|
3
|
|
|
20, 22, 120, 126, 300, 2200, 4000, 50000, 150000, 202020, 231000, 240000, 600000, 1600000, 2500000, 7000000, 12500000, 14300000, 40400000, 44000000, 80000000, 101250000, 102600000, 108000000, 112500000, 120120120, 126000000, 131400000, 144000000, 180000000, 225000000, 300300300, 312300000
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
See A322322 for the definition of a stuffable number in general.
The sequence is infinite because it contains the numbers 202020...20 (that is, k copies of 20) for any odd k. - Hans Havermann, Dec 03 2018
Do we have enough terms now to make a guess about exactly what numbers are in this sequence? - N. J. A. Sloane, Dec 06 2018
Def. 1: Let E(n) = sumdigits(n) - #digits(n) = A007953(n) - A055642(n). We call N > 0 admissible iff E(N) = A010879(N), the last digit of N.
Remark: Any term of this sequence must be admissible. If N is admissible then any permutation of N's digits with fixed last digit (and no leading 0) is again admissible. Also, the last digit of N can be replaced by any arbitrary digit.
Prop. 1: If E(n) >= 0, then N = n*10^E(n) is admissible. (Obvious from definitions.)
Remark: Most terms of this sequence are of that form, with some n not a multiple of 10. Are there any terms not of this form, beyond a(2) = 22 and a(4) = 126?
Prop. 2: If N is admissible and a multiple of 10, then the concatenation of N and any other admissible number M is again admissible. In particular, M can be 1 or any number of concatenations of N. Instead of N one can take an arbitrary number of admissible multiples of 10, (N1, ..., Nk).
Def. 2: When N is admissible, let S(N) be the result of N stuffed with itself, i.e., after each nonzero digit d[i] of N except for the last digit, we insert d[i] digits of N, taken one after the other starting with d[1], d[2], etc.: after d[1] are inserted d[1], ..., d[d[1]]; after d[2], if nonzero, are inserted d[d[1]+1], ..., d[d[1]+d[2]], etc.
Remark: The last digit inserted, just before the last digit d[L], is also d[d[1]+...+d[L-1]] = d[L]. Thus, the result S(N) has both its first and its last digit occurring twice in a row.
Def. 3: We say N is self-stuffable iff N is admissible and N divides S(N).
Example: For 0 < k < 9, N = (k+1)*10^k is self-stuffable, thus in this sequence.
Prop. 3: If N and M are admissible and N = 0 (mod 10), then S(concat(N,M)) = concat(S(N),S(M)). The same is true with any number of copies of N.
Lemma: If N is admissible, then S(N*10^E(N)) = S(N)*10^E(N). (Similar to Prop. 1.)
Corollary: If M is admissible, then so are N = M*10^E(M) and T = concat(N,N,M) = (100^L + 10^L + 1)*M with L = #digits(N), and S(T) = (10^(4L) + 100^L + 1)*S(M) = (100^L - 10^L + 1)*T*S(M)/M. Thus, if N is self-stuffable, then so is T.
More generally, Sum_{k=0..m} x^(2k) = Sum_{k=0..m} (-x)^k * Sum_{k=0..m} x^k for any even m, and therefore (with x = 10^L):
Theorem: If M is self-stuffable, then so is M_m := Sum_{k=0..2m} 10^(k*L)*M with L = #digits(M) + E(M) for all m >= 0. (This is the concatenation of 2m copies of M*10^E(M) and then M.)
Example: For M = 20, E(M) = 0, this is Hans Havermann's comment above. For M = 22, E(M) = 2, it asserts that 22002200...22 (any odd number of '22's) is in the sequence; similarly for M = 126, E(M) = 6, not only 126*10^6 but also 126*(10^18 + 10^9 + 1) etc. are self-stuffable.
We may call a self-stuffable (or an admissible) number primitive if it is not of the form M_m with m > 0. The smallest integer M > 0 such that a(n) = M_m or a(n) = (M*10^E(M))_m will be called the root of a(n). It is easy to see that any term has a root which is not a multiple of 10.
The sequence can be computed very efficiently as follows: Consider numbers M > 0 that are not a multiple of 10. If E(M) > 0 and N | S(N) for N = M*10^E(M), then all {N_m; m>=0} are in the sequence. If in addition to this M is admissible and M | S(M), then all {M_m; m>=0} are also in the sequence. This yields all terms. (End)
For nonnegative k, 10^9*(103*10^k+(10^k-1)/9)+8*10^6 will always be self-stuffable, thus ensuring that there will always be at least one d-digit solution when d > 11. - Hans Havermann, Dec 12 2018
Count of a(n) that have d=1,2,3,... digits is 0, 2, 3, 2, 1, 5, 3, 5, 18, 4, 4, 11, 3, 5, 18, 9, 2, 39, 3, 8, 18, 3, 4, ... The count for d = 0 (mod 3) tend to be larger. - Lars Blomberg, May 26 2019
|
|
LINKS
|
|
|
EXAMPLE
|
126 is in the sequence as 126 will be opened as 1.2..6 and the dots can be filled by 126 itself (as 112266 is divisible by 126: 112266/126 = 891).
1200 isn't a term because 1.2..0 hasn't enough empty places to put the four digits of 1200 (the last 0 isn't concatenated to the right, else 1200 would be a term). - David A. Corneth, Dec 09 2018
|
|
MATHEMATICA
|
Select[Range[10, 10^6], Block[{n = #1, d = #2, w = #3, s = Position[#3, {}][[All, 1]]}, If[Length@ d == Length@ s, Mod[FromDigits@ ReplacePart[w, Array[s[[#]] -> d[[#]] &, Length@ s]], n] == 0, False]] & @@ {#1, #2, Drop[Flatten[Map[Prepend[ConstantArray[{}, #], #] &, #2], 1], -Last@ #2]} & @@ {#, IntegerDigits[#]} &] (* Michael De Vlieger, Dec 08 2018 *)
|
|
PROG
|
(PARI) is(n, d=digits(n), i=0)={#d==vecsum(d)-d[#d] && fromdigits(concat(vector(#d, j, if( d[j]&& j<#d, vector(d[j]+1, k, d[if(k>1, i+=1, j)]), d[j]))))%n==0} \\ M. F. Hasler, Dec 07 2018
|
|
CROSSREFS
|
A322322 gives the definition of a stuffable number.
A322002 lists the roots which produce all terms of this sequence.
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|