OFFSET
2,2
COMMENTS
1 is considered a fixed point in all bases, 0 is not.
a(n)=1 iff A194025(n)=1.
In order for a number with d digits in base n to be a fixed point, it must satisfy the condition d*(n-1)^3<n^d, which can only occur when d<=4 for n>2. Because all binary numbers are "happy" (become 1 under iteration), there are no fixed points with more than 4 digits in any base.
Furthermore, 4-digit solutions of the form x0mm or xmmm (where m is n-1) represent extreme values of sum of cubed digits, and so 4-digit numbers can only be solutions if xn^3+n^2-1<=2n^3+x^3. For x=2 this reduces to n<=3, so any 4-digit solution must begin with 1 in bases above 3.
LINKS
Christian N. K. Anderson, Table of n, a(n) for n = 2..1000
Christian N. K. Anderson, Table of base, maximum fixed point, number of fixed points, and all fixed points for base 2 to 1000.
EXAMPLE
In base 5, the numbers 1, 28 and 118 are written as 1, 103, and 433. The sum of the cubes of their digits are 1, 1+0^3+3^3=28, and 4^3+3^3+3^3=118. There are no other solutions, so a(5)=118.
PROG
(R) inbase=function(n, b) { x=c(); while(n>=b) { x=c(n%%b, x); n=floor(n/b) }; c(n, x) }
yfp=vector("list", 100)
for(b in 2:100) { fp=c()
for(w in 0:1) for(x in 1:b-1) for(y in 1:b-1) if((u1=w^3+x^3+y^3)<=(u2=w*b^3+x*b^2+y*b) & u1+b^3>u2+b-1)
if(length((z=which((1:b-1)*((1:b-1)^2-1)==u2-u1)-1))) fp=c(fp, u2+z)
yfp[[b]]=fp[-1]
cat("Base", b, ":", fp, "\n")
}
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Kevin L. Schwartz and Christian N. K. Anderson, May 23 2013
STATUS
approved