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.

A337819 a(n) is the smallest number k for which k*d is a Niven number, for any divisor d of n, n >= 1.

This page as a plain text file.
%I A337819 #18 Sep 08 2022 08:46:25
%S A337819 1,1,1,1,1,1,1,1,1,1,10,1,9,3,2,3,6,1,6,1,1,10,9,1,2,9,1,3,9,2,12,9,
%T A337819 10,6,6,1,3,6,9,1,10,3,12,10,2,9,9,3,9,2,6,9,18,1,10,9,6,9,9,2,12,18,
%U A337819 1,9,12,10,3,6,9,6,18,1,7,3,2,9,10,9,9,9,1,10
%N A337819 a(n) is the smallest number k for which k*d is a Niven number, for any divisor d of n, n >= 1.
%C A337819 a(n) = 1 if and only if n is in A337741.
%e A337819 The numbers 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 are in A337741, so a(1) = a(2) = ... = a(9) = a(10) = 1.
%e A337819 For n = 11 the divisors are 1, 11 and 10 * 1 = 10 = A005349(10) and 10 * 11 = 110 = A005349(36), so a(11) = 10.
%e A337819 For n = 14 the divisors are 1, 2, 7, 14 and 3 * 1 = 3 = A005349(3), 3 * 2 = 6 = A005349(6), 3 * 7 = 21 = A005349(14), 3 * 14 = 42 = A005349(20), so a(14) = 3.
%e A337819 For n = 40 , A337741(18) = 40, so a(40) = 1.
%t A337819 nivenQ[n_] := Divisible[n, Plus @@ IntegerDigits[n]]; a[n_] := Module[{k = 1}, While[!AllTrue[k * Divisors[n], nivenQ], k++]; k]; Array[a, 100] (* _Amiram Eldar_, Sep 23 2020 *)
%o A337819 (Magma) niven:=func<n| n mod &+Intseq(n) eq 0>; a:=[]; for n in [1..90] do k:=1; while not forall{d: d in Divisors(n)| niven(k*d)} do k:=k+1; end while; Append(~a,k); end for; a;
%o A337819 (PARI) is(n) = n%sumdigits(n)==0; \\ A005349
%o A337819 isok(n, k) = fordiv(n, d, if (!is(k*d), return(0))); return(1);
%o A337819 a(n) = {my(k=1); while (! isok(n,k), k++); k;} \\ _Michel Marcus_, Sep 24 2020
%Y A337819 Cf. A005349, A144261, A337741.
%K A337819 nonn,base
%O A337819 1,11
%A A337819 _Marius A. Burtea_, Sep 23 2020