Skip to main content
edited tags
Link
Tweeted twitter.com/StackMma/status/936732639775592450
added 10 characters in body
Source Link
asad
  • 848
  • 5
  • 13

Let $N(n)$ be a set of integers, which can be presented using first $n$ Egyptian fractions:

$$ N(n):=\{m\in\mathbb{Z}:\ \ m=\sum_{i=1}^n\frac{\epsilon_i}{i},\ \epsilon_i=0\ \text{or}\ 1\} $$

I want to write a code in Mathematica that gives $N(n)$, but I think A[e,n] does not define what I need above: for example

A[e_,n_]:=Sum[e/i,{e,0,1},{i,1,n}];
n=1000;    
Sum[If[IntegerQ[A[e,n]]==True,m,0],{m,1,10}]

Thanks.

P.S. example

\begin{align} 1=&1\\ 2=&1+\frac12+\frac13+\frac04+\frac05+\frac16 \end{align}\begin{align} 0=&0\\ 1=&1\\ 2=&1+\frac12+\frac13+\frac04+\frac05+\frac16 \end{align} therefore $N(6)=\{1,2\}$$N(6)=\{0,1,2\}$

Let $N(n)$ be a set of integers, which can be presented using first $n$ Egyptian fractions:

$$ N(n):=\{m\in\mathbb{Z}:\ \ m=\sum_{i=1}^n\frac{\epsilon_i}{i},\ \epsilon_i=0\ \text{or}\ 1\} $$

I want to write a code in Mathematica that gives $N(n)$, but I think A[e,n] does not define what I need above: for example

A[e_,n_]:=Sum[e/i,{e,0,1},{i,1,n}];
n=1000;    
Sum[If[IntegerQ[A[e,n]]==True,m,0],{m,1,10}]

Thanks.

P.S. example

\begin{align} 1=&1\\ 2=&1+\frac12+\frac13+\frac04+\frac05+\frac16 \end{align} therefore $N(6)=\{1,2\}$

Let $N(n)$ be a set of integers, which can be presented using first $n$ Egyptian fractions:

$$ N(n):=\{m\in\mathbb{Z}:\ \ m=\sum_{i=1}^n\frac{\epsilon_i}{i},\ \epsilon_i=0\ \text{or}\ 1\} $$

I want to write a code in Mathematica that gives $N(n)$, but I think A[e,n] does not define what I need above: for example

A[e_,n_]:=Sum[e/i,{e,0,1},{i,1,n}];
n=1000;    
Sum[If[IntegerQ[A[e,n]]==True,m,0],{m,1,10}]

Thanks.

P.S. example

\begin{align} 0=&0\\ 1=&1\\ 2=&1+\frac12+\frac13+\frac04+\frac05+\frac16 \end{align} therefore $N(6)=\{0,1,2\}$

added 78 characters in body; edited title
Source Link
ybeltukov
  • 43.9k
  • 5
  • 109
  • 215

Summation with two variables How to represent integers using Egyptian fractions?

Let $N(n)$ be a set of integers, which can be presented using first $n$ Egyptian fractions:

$$ N(n):=\{m\in\mathbb{Z}:\ \ m=\sum_{i=1}^n\frac{\epsilon_i}{i},\ \epsilon_i=0\ \text{or}\ 1\} $$

I want to write a code in Mathematica that gives the above result$N(n)$, but I think A[e,n] does not define what I need above: for example

A[e_,n_]:=Sum[e/i,{e,0,1},{i,1,n}];
n=1000;    
Sum[If[IntegerQ[A[e,n]]==True,m,0],{m,1,10}]

Thanks.

P.S. example

\begin{align} 1=&1\\ 2=&1+\frac12+\frac13+\frac04+\frac05+\frac16 \end{align} therefore $N(6)=\{1,2\}$

Summation with two variables?

Let

$$ N(n):=\{m\in\mathbb{Z}:\ \ m=\sum_{i=1}^n\frac{\epsilon_i}{i},\ \epsilon_i=0\ \text{or}\ 1\} $$

I want to write a code in Mathematica that gives the above result, but I think A[e,n] does not define what I need above: for example

A[e_,n_]:=Sum[e/i,{e,0,1},{i,1,n}];
n=1000;    
Sum[If[IntegerQ[A[e,n]]==True,m,0],{m,1,10}]

Thanks.

P.S. example

\begin{align} 1=&1\\ 2=&1+\frac12+\frac13+\frac04+\frac05+\frac16 \end{align} therefore $N(6)=\{1,2\}$

How to represent integers using Egyptian fractions?

Let $N(n)$ be a set of integers, which can be presented using first $n$ Egyptian fractions:

$$ N(n):=\{m\in\mathbb{Z}:\ \ m=\sum_{i=1}^n\frac{\epsilon_i}{i},\ \epsilon_i=0\ \text{or}\ 1\} $$

I want to write a code in Mathematica that gives $N(n)$, but I think A[e,n] does not define what I need above: for example

A[e_,n_]:=Sum[e/i,{e,0,1},{i,1,n}];
n=1000;    
Sum[If[IntegerQ[A[e,n]]==True,m,0],{m,1,10}]

Thanks.

P.S. example

\begin{align} 1=&1\\ 2=&1+\frac12+\frac13+\frac04+\frac05+\frac16 \end{align} therefore $N(6)=\{1,2\}$

added 6 characters in body
Source Link
yarchik
  • 19.8k
  • 2
  • 33
  • 75
Loading
added 2 characters in body
Source Link
asad
  • 848
  • 5
  • 13
Loading
added 17 characters in body
Source Link
asad
  • 848
  • 5
  • 13
Loading
added 1 character in body
Source Link
Sumit
  • 16k
  • 2
  • 33
  • 74
Loading
Source Link
asad
  • 848
  • 5
  • 13
Loading