cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A337449 The numbers k for which Lucas(k) are Niven numbers.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 12, 18, 56, 81, 130, 225, 396, 637, 854, 2034, 4059, 4095, 5985, 7650, 21105, 31059, 41998, 46860, 83106, 114129, 120555, 150705, 201285, 287937, 338265, 359757, 475839, 512194, 583825, 606594, 627102, 717025, 877305, 922095, 991590, 1076355
Offset: 1

Views

Author

Marius A. Burtea, Sep 14 2020

Keywords

Comments

For a(6) = 6, Lucas(6) = 18 and 18/digsum(18) = 2 is a prime number, so Lucas(6) is a Moran number (A001101).
For a(9) = 56, Lucas(56) = 505019158607 and 505019158607/digsum(505019158607) = 10745088481 is a prime number, so Lucas(56) is a Moran number.

Examples

			Lucas(0) = 2 = A005349(2), so 0 is a term.
Lucas(1) = 1 = A005349(1), so 1 is a term.
Lucas(6) = 12 = A005349(11), so 6 is a term.
Lucas(12) = 322 = A005349(90), so 12 is a term.
Lucas(18) = 5778 = A005349(1013), so 18 is a term.
		

Crossrefs

Programs

  • Magma
    niven:=func; [k:k in [0..70000]|niven(Lucas(k))];
    
  • Mathematica
    nivenQ[n_] := Divisible[n, Plus @@ IntegerDigits[n]]; Select[Range[6000], nivenQ[LucasL[#]] &] (* Amiram Eldar, Sep 15 2020 *)
  • PARI
    isok(k) = my(l=real((2+quadgen(5))*quadgen(5)^k)); (l % sumdigits(l)) == 0; \\ Michel Marcus, Sep 15 2020
    
  • Python
    A337449_list, k, p, q = [], 0, 2, 1
    while k < 10**6:
        if p % sum(int(d) for d in str(p)) == 0:
            A337449_list.append(k)
        k += 1
        p, q = q, p+q # Chai Wah Wu, Sep 17 2020