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!)
A322323 Self-stuffable numbers (see the Comments section for definition). 3

%I #92 May 26 2019 14:24:09

%S 20,22,120,126,300,2200,4000,50000,150000,202020,231000,240000,600000,

%T 1600000,2500000,7000000,12500000,14300000,40400000,44000000,80000000,

%U 101250000,102600000,108000000,112500000,120120120,126000000,131400000,144000000,180000000,225000000,300300300,312300000

%N Self-stuffable numbers (see the Comments section for definition).

%C See A322322 for the definition of a stuffable number in general.

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

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

%C From _M. F. Hasler_, Dec 07 2018: (Start)

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

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

%C Prop. 1: If E(n) >= 0, then N = n*10^E(n) is admissible. (Obvious from definitions.)

%C 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?

%C 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).

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

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

%C Def. 3: We say N is self-stuffable iff N is admissible and N divides S(N).

%C Example: For 0 < k < 9, N = (k+1)*10^k is self-stuffable, thus in this sequence.

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

%C Lemma: If N is admissible, then S(N*10^E(N)) = S(N)*10^E(N). (Similar to Prop. 1.)

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

%C 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):

%C 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.)

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

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

%C 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)

%C The list of roots is now given in A322002. - _M. F. Hasler_, Dec 09 2018

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

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

%H Lars Blomberg, <a href="/A322323/b322323.txt">Table of n, a(n) for n = 1..170</a> (Terms 1..41 from Hans Havermann, 42..145 from John Mason)

%e 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).

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

%t 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 *)

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

%Y A322322 gives the definition of a stuffable number.

%Y A322002 lists the roots which produce all terms of this sequence.

%Y Cf. A007953, A010879, A055642.

%K base,nonn

%O 1,1

%A _Eric Angelini_ and _Jean-Marc Falcoz_, Dec 03 2018

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 08:14 EDT 2024. Contains 371769 sequences. (Running on oeis4.)