|
|
A065411
|
|
Fibonacci numbers whose digits sum to a square.
|
|
1
|
|
|
|
OFFSET
|
1,3
|
|
LINKS
|
|
|
EXAMPLE
|
144 is in the sequence because (1) it is a Fibonacci number and (2) the sum of its digits 1 + 4 + 4 = 9 is a square.
|
|
PROG
|
(PARI) {m=200; print1(0, ", "); for(n=2, m, a=fibonacci(n); s=0; k=a; while(k>0, d=divrem(k, 10); k=d[1]; s=s+d[2]); if(issquare(s), print1(a, ", ")))} \\ Luc Stevens (lms022(AT)yahoo.com), Apr 15 2006
(PARI) SumD(x)= { local(s=0); while (x>9, s+=x-10*(x\10); x\=10); return(s + x) } { n=0; for (m=0, 10^9, if (m==2, next); f=fibonacci(m); if (issquare(SumD(f)), write("b065411.txt", n++, " ", f); if (n==50, return)) ) } \\ Harry J. Smith, Oct 18 2009
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|