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.

A357823 a(n) is the number of bases > 1 where n is not divisible by the sum of its digits.

This page as a plain text file.
%I A357823 #38 Oct 21 2022 07:00:01
%S A357823 0,0,1,0,3,0,5,1,4,3,9,1,11,9,7,5,15,5,17,7,11,17,21,5,18,20,17,14,27,
%T A357823 12,29,16,24,28,24,13,35,33,31,17,39,22,41,33,26,41,45,18,42,34,42,38,
%U A357823 51,33,45,35,48,53,57,26,59,57,44,41,52,43,65,56,60,48
%N A357823 a(n) is the number of bases > 1 where n is not divisible by the sum of its digits.
%C A357823 The sequence is well defined as the sum of digits of n equals n (and hence divides n) in any base > n.
%F A357823 a(n) = n - A080221(n).
%F A357823 a(p) = p - 2 for any prime number p.
%e A357823 For n = 10, we have:
%e A357823        b  sum of digits  divisible?
%e A357823     ----  -------------  ----------
%e A357823        2              2  Yes
%e A357823        3              2  Yes
%e A357823        4              4  No
%e A357823        5              2  Yes
%e A357823        6              5  Yes
%e A357823        7              4  No
%e A357823        8              3  No
%e A357823        9              2  Yes
%e A357823       10              1  Yes
%e A357823     >=11             10  Yes
%e A357823 so a(n) = #{ 4, 7, 8 } = 3.
%t A357823 NivenQ[n_, b_] := Divisible[n, Total @ IntegerDigits[n, b]]; a[n_] := Sum[Boole @ !NivenQ[n, b], {b, 2, n}]; Array[a, 70]
%o A357823 (PARI) a(n) = sum(b=2, n, n%sumdigits(n,b)!=0)
%o A357823 (Python)
%o A357823 from sympy.ntheory.factor_ import digits
%o A357823 def A357823(n): return sum(1 for b in range(2,n) if n%sum(digits(n,b)[1:])) # _Chai Wah Wu_, Oct 19 2022
%Y A357823 Cf. A080221, A138530, A356555.
%K A357823 nonn,base
%O A357823 1,5
%A A357823 _Rémy Sigrist_, Oct 17 2022