A020997 revision #31
|
|
A020997
|
|
Numbers n such that the sum of the digits of Lucas(n) is n.
|
|
1
|
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
|
|
LINKS
|
|
|
MATHEMATICA
|
Do[ If[ Mod[ 2Fibonacci[n + 1] - Fibonacci[n], 9] == Mod[n, 9], If[ Plus @@ IntegerDigits[ 2Fibonacci[n + 1] - Fibonacci[n]] == n, Print[n]]], {n, 0, 10^5}] (* Robert G. Wilson v *)
Select[Range[0, 10^4], Plus@@IntegerDigits[LucasL[#]]==#&] (* Vincenzo Librandi, Feb 18 2015 *)
|
|
PROG
|
(PARI) isok(n) = sumdigits(fibonacci(n+1)+fibonacci(n-1)) == n; \\ Michel Marcus, Feb 18 2015
(Perl) use ntheory ":all"; for (1..1e5) { say if $_ == sumdigits(lucasv(1, -1, $_)) } # Dana Jacobsen, Sep 06 2015
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,more
|
|
AUTHOR
|
|
|
STATUS
|
editing
|
|
|
|