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.
8, 87, 887, 8887, 99868, 978887, 7978887, 96699868, 987978887, 9896699868, 89987978887, 969896699868, 7969896699868, 97969896699868, 897969896699868, 9988999939998887, 99988999939998887, 999988999939998887, 8999988999939998887, 78999988999939998887
Offset: 1
Examples
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.
Links
- Martin Raab, Table of n, a(n) for n = 1..250
- Johannes F. Morgenbesser, The sum of digits of floor(n^c), Acta Arithmetica 148 (2011), 367-393.
Programs
-
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
-
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))}
Comments