A066579 Erroneous version of A113315.
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 2, 10, 7, 4, 3, 10, 4, 10, 7, 5, 4, 10, 6, 10, 7, 10, 8, 9, 7
Offset: 1
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.
195 is a term of the sequence because it is divisible by 15 (= 1 + 9 + 5).
Filtered([1..230],n-> n mod List(List([1..n],ListOfDigits),Sum)[n]=0); # Muniru A Asiru
a005349 n = a005349_list !! (n-1) a005349_list = filter ((== 0) . a070635) [1..] -- Reinhard Zumkeller, Aug 17 2011, Apr 07 2011
[n: n in [1..250] | n mod &+Intseq(n) eq 0]; // Bruno Berselli, May 28 2011
[n: n in [1..250] | IsIntegral(n/&+Intseq(n))]; // Bruno Berselli, Feb 09 2016
s:=proc(n) local N:N:=convert(n,base,10):sum(N[j],j=1..nops(N)) end:p:=proc(n) if floor(n/s(n))=n/s(n) then n else fi end: seq(p(n),n=1..210); # Emeric Deutsch
harshadQ[n_] := Mod[n, Plus @@ IntegerDigits@ n] == 0; Select[ Range[1000], harshadQ] (* Alonso del Arte, Aug 04 2004 and modified by Robert G. Wilson v, Oct 16 2012 *) Select[Range[300],Divisible[#,Total[IntegerDigits[#]]]&] (* Harvey P. Dale, Sep 07 2015 *)
is(n)=n%sumdigits(n)==0 \\ Charles R Greathouse IV, Oct 16 2012
A005349 = [n for n in range(1,10**6) if not n % sum([int(d) for d in str(n)])] # Chai Wah Wu, Aug 22 2014
[n for n in (1..10^4) if sum(n.digits(base=10)).divides(n)] # Freddy Barrera, Jul 27 2018
For n = 42: - A001101(42) = 555, - A007953(555) = 15, - hence a(42) = 555/15 = 37.
for (n=1, 1090, if (n%(s=sumdigits(n))==0 && isprime(n/s), print1 (n/s", ")))
190 is a term as 190 is a Niven number and 19 is not a Niven number. 192 is a term as 192 is a Niven number and 192 is not divisible by 10.
is(n, base=10) = my (s=sumdigits(n, base)); n%s==0 && (n%base || (n/base)%s)
def ok(n): sd = sum(map(int, str(n))) return sd and not n%sd and (n%10 or (n//10)%sd) print([k for k in range(235) if ok(k)]) # Michael S. Branicky, Oct 16 2022
2310 = 2*3*5*7*11 is the smallest integer with 5 prime factors because it is a primorial number, as 2310 / (2+3+1+0) = 385, 2310 is a Niven number: a(5) = 2310.
a(n) = my(k=1); while ((k % sumdigits(k)) || (omega(k) != n), k++); k; \\ Michel Marcus, Jan 20 2023
omega_niven(A, B, n) = A=max(A, vecprod(primes(n))); (f(m, p, j) = my(list=List()); forprime(q=p, sqrtnint(B\m, j), my(v=m*q, r=nextprime(q+1)); while(v <= B, if(j==1, if(v>=A && v%sumdigits(v) == 0, listput(list, v)), if(v*r <= B, list=concat(list, f(v, r, j-1)))); v *= q)); list); vecsort(Vec(f(1, 2, n))); a(n) = if(n==0, return(1)); my(x=vecprod(primes(n)), y=2*x); while(1, my(v=omega_niven(x, y, n)); if(#v >= 1, return(v[1])); x=y+1; y=2*x); \\ Daniel Suteu, Jan 22 2023
15 is the 13th term of A055471, hence a(13)=15/(1*5) =3.
pd[n_] := Times @@ Select[IntegerDigits[n], # > 0 &]; Select[Table[n/pd[n], {n, 1000}], IntegerQ] (* Ray Chandler, Mar 11 2014 *)
is_a005349(n) = n%sumdigits(n)==0 terms(n) = my(i=0); for(k=1, oo, if(i>=n, break); if(is_a005349(k), print1(sumdigits(k), ", "); i++)) terms(80) \\ Print initial 80 terms
For n = 11: A161792(11) = 144 = 12^2 = 12^A000120(144), so a(11) = 12.
{ for (n = 1, 2^27, if (ispower(n, hammingweight(n), &r), print1 (r", "););); }
a(1) = 5, because 5 divided by (10 - 5) equals 1. a(7) = 26, because digitsum(26) = 8 and 26 divided by (10 - 8) equals 13. a(20) = 86, the first member of this sequence where digitsum(n) >= 10. Digitsum(86) = 14, so k = 10^2 - 14 = 86, so 86 is a member of this sequence.
fQ[n_] := Block[{d = Total@ IntegerDigits@ n, k}, k = IntegerLength@ d; Divisible[n, 10^k - d]]; Select[Range@ 314, fQ] (* or *) Select[Range@ 314, Divisible[#, (10^(Floor[Log[10, Total@ IntegerDigits@ #]] + 1) - Total@ IntegerDigits@ #)] &] (* Michael De Vlieger, Aug 05 2015 *)
isok(n)=my(sd = sumdigits(n), nsd = #digits(sd)); n % (10^nsd - sd) == 0; \\ Michel Marcus, Aug 05 2015
def sod(n,m): kk = 0 while n > 0: kk= kk+(n%m) n =int(n//m) return kk for c in range (1, 10**6): k=len(str(sod(c,10))) kl=10**k-sod(c,10) if c%kl==0: print (c)
A334416(10) = 12 whose sum of digits is 3; 12/3 = 4, so a(10) = 4.
Select[#/Plus @@ IntegerDigits[#] & /@ Range[3000], PalindromeQ] (* Amiram Eldar, Apr 29 2020 *)
isok(m) = iferr(my(d=digits(m/sumdigits(m))); d==Vecrev(d), E, 0); apply(x->x/sumdigits(x), select(x->isok(x), [1..3000])) \\ Michel Marcus, Apr 29 2020
Comments