|
|
A358982
|
|
In base 10, for all numbers with n digits, a(n) is the number where the sum of digits of a(n) minus the sum of the last n digits of a(n)^3 reaches a record maximum.
|
|
1
|
|
|
8, 87, 887, 8887, 99868, 978887, 7978887, 96699868, 987978887, 9896699868, 89987978887, 969896699868, 7969896699868, 97969896699868, 897969896699868, 9988999939998887, 99988999939998887, 999988999939998887, 8999988999939998887, 78999988999939998887
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
The corresponding last n digits of a(n)^3 are 2, 03, 103, 0103, 00032, 110103, 1110103, 00100032, 011110103, 0300100032, ...
The corresponding differences between the digit sums are 6, 12, 19, 27, 35, 41, 47, 55, 63, 69, 77, 84, 91, 99, 107, 115, 124, 132, ...
Question: what constant does the ratio between the maximum differences and n converge to?
In case of a tie, only the smallest example is given. For example, n=7, a(n)=9899868 would also meet the criterion. Other cases of a tie happen at n=10, 12, 13, 14, 28, 29, 31, ...
|
|
LINKS
|
|
|
EXAMPLE
|
The digit sum of 7978887 is 54, the digit sum of 7978887^3 mod 10^7 = 1110103 is 7. 54-7=47, which means that randomly finding numbers for which the sum of digits of x^3 is smaller than the sum of digits of x is easiest when choosing x with the given seven ending digits (that is, of course, depending on the preferred size of x).
Heuristically it can be conjectured that there are infinitely many numbers x for which the digit sum of x^3 is smaller than the digit sum of x.
|
|
PROG
|
(PARI) a(n)={r=0; i=10^n; for(x=1, i-1, s1=sumdigits(x); s2=sumdigits(x^3%i); d=s2-s1; if(d<r, r=d; b=x)); b}
(PARI)
/* The following program finds the first 69 terms, and also many of the larger terms, correctly. The 70th term will be incorrect because of the truncation to 10^4*(9/10)=9000 record numbers for each number of digits; if the truncation is increased to 10^5*(9/10) records (n=5 at the beginning), the first 237 terms give a(n) with corresponding maxima. (Further restrictions on ending digits find optimal solutions for a higher number of digits.) */
{n=4; d=10^n; v=vector(d*9/10); print("keeping "#v" record numbers"); w=vector(d*9); for(x=1, d-1, if(x%10, y=sumdigits((x^3)%d); z=sumdigits(x); v[9*(x\10)+(x%10)]=x+d*(y-z))); v=vecsort(v); while(d<10^250, for(i=1, #v, for(j=0, 9, x=d*j+v[i]%d; y=sumdigits((x^3)%(d*10)); z=sumdigits(x); w[10*(i-1)+j+1]=x+d*10*(y-z))); d*=10; n++; w=vecsort(w); v=vecextract(w, Str("1.."#v)); print(n" digits - record differences: "vecextract(v, "1..5")\d" / record mod "10"^"n": "v[1]%d))}
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|