A049105 Ratio from A049101.
1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 4, 2, 4, 8, 1, 1, 8, 8, 6, 5, 4, 2, 2, 8, 3
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.
432 is a term because: 4*3*2=24, 4+3+2=9, 24*9=216 and 432/216 = 2.
Select[ Range[10^6], IntegerQ[ # /(Apply[ Times, IntegerDigits[ # ]] * Apply[ Plus, IntegerDigits[ # ]] ) ] & ]
isok(n) = my(d=digits(n)); vecprod(d) && (n % (vecsum(d)*vecprod(d)) == 0); \\ Michel Marcus, Jan 23 2019
function a049106(a,b: integer); var n,k,j,p,r,d: integer; s: string; begin for n := a to b do s := itoa(n); k := 0; p := 1; for j := 0 to length(s) - 1 do d := atoi(s[j..j]); k : = k + d; p := p*d; end; r := p*k; if r > 0 then if n mod r = 0 then write(n div r,","); end; end; end; end; a049106(0,1220000);
For n = 12, a(12) = (1 + 2)*(1*2) = 3*2 = 6 < n; for n = 19, a(19) = (1 + 9)*(1*9) = 90 > n; for n = 135, a(135) =(1 + 3 + 5)*(1*3*5) = 135 = n.
asum[x_] := Apply[Plus, IntegerDigits[x]] apro[x_] := Apply[Times, IntegerDigits[x]] a[n]=asum[n]*apro[n] sdpd[n_]:=Module[{idn=IntegerDigits[n]},Total[idn]Times@@idn]; Array[ sdpd,70] (* Harvey P. Dale, Dec 31 2011 *)
a(n) = my(d = digits(n)); vecsum(d) * vecprod(d); \\ Michel Marcus, Feb 24 2017
Do[ If[ 2n == Apply[ Times, IntegerDigits[n]] Apply[ Plus, IntegerDigits[n]], Print[n]], {n, 0, 10^7} ]
isok(n) = if(n, factorback(digits(n)), 0) * sumdigits(n) == 2*n \\ Mohammed Yaseen, Jul 22 2022
from math import prod def s(n): return sum(map(int, str(n))) def p(n): return prod(map(int, str(n))) for n in range(0, 10**6): if p(n)*s(n)==2*n: print(n) # Mohammed Yaseen, Jul 22 2022
14 < (1*4)*(1+4) = 20, so 14 is a term of this sequence. For n=199, (1+9+9)*1*9*9 = 1539 > 199, so 199 is here.
function a066311(a,b: integer); var n,k,j,p,d: integer; s: string; begin for n := a to b do s := itoa(n); k := 0; p := 1; for j := 0 to length(s) - 1 do d := atoi(s[j..j]); k := k + d; p := p*d; end; if n < p*k then write(n,","); end; end; end; a066311(0,120);
asum[x_] := Apply[Plus, IntegerDigits[x]] apro[x_] := Apply[Times, IntegerDigits[x]] sz[x_] := asu[x]*apro[x] Do[s=sz[n]; If[Greater[s, n], Print[n]], {n, 1, 200}]
isok(m) = my(d=digits(m)); m < vecprod(d)*vecsum(d); \\ Michel Marcus, Mar 23 2020
13 is in the sequence because (1*3)*(1+3) = 3*4 = 12 < 13. 125 is a term because (1*2*5)*(1+2+5) = 10*8 = 80 < 125.
function a066312(a,b: integer); var n,k,j,p,d: integer; s: string; begin for n := a to b do s := itoa(n); k := 0; p := 1; for j := 0 to length(s) - 1 do d := atoi(s[j..j]); k := k + d; p := p*d; end; if n > p*k then write(n,","); end; end; end; a066312(0,150);
asum[x_] := Apply[Plus, IntegerDigits[x]] apro[x_] := Apply[Times, IntegerDigits[x]] sz[x_] := asu[x]*apro[x] Do[s=sz[n]; If[Greater[n, s], Print[n]], {n, 1, 1000}] okQ[n_]:=Module[{idn=IntegerDigits[n]},n> Total[idn]Times@@idn];Select[Range[150],okQ] (* Harvey P. Dale, Mar 12 2011 *)
isok(k) = {my(d=digits(k)); k > vecprod(d) * vecsum(d)} \\ Harry J. Smith, Feb 10 2010
Union[Range[9], Select[Range[10, 301], DigitCount[#, 10, 0] > 0 &]] Select[Range[301], Divisible[Product[i, {i, IntegerDigits[#]}], #] &]
Do[ k = n + 1; While[ k*n != Apply[Times, IntegerDigits[k]] Apply[Plus, IntegerDigits[k]], k++ ]; Print[k], {n, 0, 10} ]
Comments