%I #26 Sep 08 2022 08:46:25
%S 0,1,2,3,4,6,12,18,56,81,130,225,396,637,854,2034,4059,4095,5985,7650,
%T 21105,31059,41998,46860,83106,114129,120555,150705,201285,287937,
%U 338265,359757,475839,512194,583825,606594,627102,717025,877305,922095,991590,1076355
%N The numbers k for which Lucas(k) are Niven numbers.
%C For a(6) = 6, Lucas(6) = 18 and 18/digsum(18) = 2 is a prime number, so Lucas(6) is a Moran number (A001101).
%C For a(9) = 56, Lucas(56) = 505019158607 and 505019158607/digsum(505019158607) = 10745088481 is a prime number, so Lucas(56) is a Moran number.
%H Chai Wah Wu, <a href="/A337449/b337449.txt">Table of n, a(n) for n = 1..57</a>
%e Lucas(0) = 2 = A005349(2), so 0 is a term.
%e Lucas(1) = 1 = A005349(1), so 1 is a term.
%e Lucas(6) = 12 = A005349(11), so 6 is a term.
%e Lucas(12) = 322 = A005349(90), so 12 is a term.
%e Lucas(18) = 5778 = A005349(1013), so 18 is a term.
%t nivenQ[n_] := Divisible[n, Plus @@ IntegerDigits[n]]; Select[Range[6000], nivenQ[LucasL[#]] &] (* _Amiram Eldar_, Sep 15 2020 *)
%o (Magma) niven:=func<n|n mod &+Intseq(n) eq 0>; [k:k in [0..70000]|niven(Lucas(k))];
%o (PARI) isok(k) = my(l=real((2+quadgen(5))*quadgen(5)^k)); (l % sumdigits(l)) == 0; \\ _Michel Marcus_, Sep 15 2020
%o (Python)
%o A337449_list, k, p, q = [], 0, 2, 1
%o while k < 10**6:
%o if p % sum(int(d) for d in str(p)) == 0:
%o A337449_list.append(k)
%o k += 1
%o p, q = q, p+q # _Chai Wah Wu_, Sep 17 2020
%Y Cf. A000032, A139374, A001101, A005349, A337448.
%K nonn,base
%O 1,3
%A _Marius A. Burtea_, Sep 14 2020