Number Theory – Spread the prime numbers digit by digit while maintaining the primality

I looked at a table of prime numbers and observed the following:

If we choose $ 7 can we concatenate a digit on the left to form a new prime number? Yes, concatenate $ 1 $ get $ 17. Can we do the same thing with $ 17? Yes, concatenate $ 6 $ get $ 617. And with $ 617? Yes, concatenate $ 2 $ get $ 2617. Then we can train $ 62617. And I could not continue since the table gives the prime numbers with the last entry $ 104729.

Now, a little bit of terminology. Call a prime number $ a_1 … a_k $ a surviving from the order $ m $ if there is $ m $ statistics $ b_1, …, b_m $ (all different from zero) so that the numbers $ b_1a_1 … a_k $ and $ b_2b_1a_1..a_k $ and and $ b_mb_ {m-1} … b_1a_1 … a_k $ are all prime numbers.

Call a prime number $ a_1 … a_k $ a surviving from the order $ + infty $ if $ a_1 … a_k $ is a surviving from the order $ m $ for each $ m in mathbb N $.

I would like to know:

Is there a surviving from the order $ + infty $?

(This question, with exactly the same title and content, was asked at MSE about an hour ago, and I think I should excuse myself for asking the same question here and there in such a short time interval, but, as I thought somebody will talk very quickly about the argument that the question would be settled, and that did not happen, I have decided to put it here too, for this question to get attention here too .. Yes, it has a recreational flavor, but I hope you like it.)

graphs – Algorithm to generate random incrementing numbers up to a limit

I'm trying to write code to generate incremental sequences of numbers such as:

0 + 1 + 3 + 5 + 1 = 9
0 + 5 + 1 + 1 + 1 = 8
0 + 1 + 1 + 2 + 1 = 5

I have 3 constraints:

1) I need to have a limited number of addends (here it is = 5)

2) the final sum must be less than a certain limit (the limit is here <9)

3) addends must be random

For now, I generate sequences randomly and selects only those that are appropriate. For 2-digit numbers and for long sequences (> 8) my algorithm takes a lot of time.

At least can you tell me that the CS branch is studying such problems?

Real Numbers – Improving an Inequality

Let $ n $ to be a positive integer, and $ c $ to be a real positive number. It is hardly possible to change this $$ frac {n} {1 + c ^ n}. frac {1} {1 + c} leq frac {n + 1} {1 + c ^ {n + 1}}. $$ By multiplying and comparing the two sides of the inequality, we can see that it is in its weakest form. I'm trying to change this inequality by introducing two more positive real numbers $ a, b $ such as $ a geq c ^ n, ; b geq c $ and restrict $ c leq 1, $ as following.
$$ frac {n (1 + ac ^ n)} {1 + c ^ n}. frac {1 + bc} {1 + c} leq frac {(n + 1) (1 + ab-c ^ {n + 1})} {1 + c ^ {n + 1}}. $$
I just want to know if I'm in the right direction or not?

java – Arrange the numbers in a circle such that the sums of the neighbors and diametric opposites are first

First, Vector should not be used here. It's essentially a synchronized ArrayList, and you do not need synchronization in this case. Just change to one ArrayList.

This has the potential to be a little faster.


Second, you use a crude ArrayList which is not typesafe:

list.add ("Some nonsense"); // does not cause an error

and requires your (Int) typing later. Indicate that the list contains integers using generics and that it will be secure. Read it < > like "from" here:

// Note how we specify what the list can contain
// A list of tables of integers
ArrayList list = new ArrayList <> ();

list.add ("Some nonsense") // This causes an error now when compiling

You also do strange things with the full manufacturer. You do not need to manually convert unframed integers such as Whole (2). 2 will be "automatically boxed" in its object wrapper if needed implicitly.


You call Whole / parseInt apart from one try; which is risky. If the user enters a wrong entry, your entire program is blocked. Wrap it up and manage the failures (yes, users will enter a bad entry):

try {
intene = Integer.parseInt (n);
// Code using "ene"

} catch (NumberFormatException e) {
// Just an example. You will need to do something more involved, like asking again
System.out.println ("Failed to scan");
}

Just as an example of what I mentioned earlier:

static vacuum exchange (ArrayList arr, int k) {
...
int one = (int) arr.get (j);
int two = (int) arr.get (j + half);
Integer number_test = new Integer (one + two);

Make the setting generic, and eliminate throws and boxing. Write:

static vacuum exchange (ArrayList arr, int k) {
...
int one = arr.get (j);
int two = arr.get (j + half);
int number_test = one + two;

And then similarly below that.


In addition, Java prefers camelCase, not snake_case. It is best to respect the conventions of the language you use.


import java.sql.Date;

is a bit disturbing. You should not really loot a SQL library just to use a date object. Java has a java.time package for this purpose.


Just like a tip,

int two;
if (j + 1 == arr.size ()) {
two = arr.get (0);

} other {
two = arr.get (j + 1);
}

Can also be written as:

int two = j + 1 == arr.size ()? arr.get (0): arr.get (j + 1);

Or:

int two = arr.get (j + 1 == arr.size ()? 0: j + 1);

Depending on the duplication you can tolerate. the ? : a part is called a "ternary operator" / a "conditional expression".


if (! bonus.contains (number_test)) {

It's quite expensive when you do it on a listing like a ArrayList. If you need to use contains, you should Probably use a Together like a HashSet. Membership searches are a lot faster using sets. The time difference will become more and more perceptible the first ones expands.

Probability – Large Numbers Law for Triangular Tables with Conditional Expectations

I have to solve a book exercise. The exercise requires me to apply a law of large numbers for triangular tables. The setting seems rather complicated and I would like your help to understand how to proceed. In addition, I believe that some assumptions required to go ahead can be implicit.


Consider the triangular array $ {X_J epsilon_ {J, 1}, …, X_J epsilon_ {J, j}, …, X_J epsilon_ {J, J} } _ {J in mathbb {N}} $.

Let $ mathcal {X} _J $ denotes the support of $ X_J $, $ forall J in mathbb {N} $.

Consider the function $ z_ {J, j}: mathcal {X} _J rightarrow mathbb {R} $ $ forall j = 1, …, J $, $ forall J in mathbb {N} $.

Consider the function $ q_ {J, j}: mathcal {X} _J rightarrow {0,1 } $ $ forall j = 1, …, J $, $ forall J in mathbb {N} $.

Hypotheses:

1) $ { epsilon_ {J, 1}, …, epsilon_ {J, J} $ are mutually independent, $ forall J in mathbb {N} $.

2) $ E ( epsilon_ {J, j} | X_J) = $ 0 $ forall j = 1, …, J $, $ forall J in mathbb {N} $.

3) $ forall J in mathbb {N} $, take the realization $ x_J in mathcal {X} _J $ the random variable $ X_J $.
Let $$ mathcal {J} ^ * (x_J) equiv {j in {1, …, J }: q_ {J, j} (x_J) = 1 } $$
Suppose the cardinality of $ mathcal {J} ^ * (x_J) $, noted by $ | mathcal {J} ^ * (x_J) | $, increases in $ J.


CA watch
$$
Large[ frac{1}{|mathcal{J}^*(x_J)|} sum_{jin mathcal{J}^*(x_J)} epsilon^J_j times z_{J,j}(X_J)Big] – Large[ frac{1}{|mathcal{J}^*(x_J)|} sum_{jin mathcal{J}^*(x_J)} EBig(epsilon^J_j times z_{J,j}(X_J)Big| q_{J,j}(X_J)=1Big)Big] to_ {a.s.} 0
$$

as $ J rightarrow infty $.

Note that the summation is taken through $ j in mathcal {J} ^ * (x_J) $, or $ x_J $ has been corrected (this is not random).

Note that the conditioning event in $ E Big ( epsilon ^ J_j times z_ {J, j} (X_J) Big | q_ {J, j} (X_J) = 1 Big) $ limits attention to the subpopulation $ { bar {x} _ {J} in mathcal {X} _J: q_ {J, j} ( bar {x} _J) = 1 } $ whose $ x_J $ belongs.

Could you help? I am totally confused by the conditional waiting.

Backing up contacts in the Google cloud and syncing WhatsApp conversation numbers

I had an older Android phone where contacts were backed up in the cloud and Whatsapp. This phone has burst, so I have a new Android phone with WhatsApp. This phone was able to recover contacts. But the problem is, when my friends send me a message about the app, the figure + X (XXX) XXX-XXXX and with the ability to add or block them. I would expect that if I did not have this number in my contacts, but I have this number in the contacts exactly and it has a name. If I click add, the contact opens and adds the same number below the existing number. When I click Save, nothing happens, the problem persists.

The new phone is Android 9 (a user interface).

Does anyone know how to solve this problem?

Thank you

java – Go to TextField content in a list of colors and numbers

Click on the following link to learn more about the number, color, and color options, as well as order numbers, phone numbers, phone numbers, and card settings. as work options and command parameters. , por favor alguien me explica, gracias.

Public class AppletCalculadora extended Applet implements ActionListener {

private static final long serialVersionUID = 1L;
TextField caja;
Button b1, b2, b3, b4, b5, b6, b7, b8, b9, b0, bmas, bmenos, bmult, bdiv, bmod, bigual, bborrar, bpunto, bce;
Panel p1, p2;

public AppletCalculadora () {

p1 = new panel ();
caja = new TextField ();
p1.setLayout (new BorderLayout ());
p2 = new panel ();
p2.setLayout (new GridLayout (7, 3, 8, 8));
b1 = new button ("1");
b2 = new button ("2");
b3 = new button ("3");
b4 = new button ("4");
b5 = new button ("5");
b6 = new button ("6");
b7 = new button ("7");
b8 = new button ("8");
b9 = new button ("9");
b0 = new button ("0");
bmas = new button ("+");
bmenos = new button ("-");
bmult = new Button ("*");
bdiv = new button ("/");
bmod = new button ("%");
bigual = new Button ("=");
bborrar = new button ("C");
bpunto = new Button (".");
bce = new button ("CE");

p1.add (caja);
p2.add (b1); p2.add (b2); p2.add (b3); p2.add (b4); p2.add (b5);
p2.add (b6); p2.add (b7); p2.add (b8); p2.add (b9); p2.add (b0);
p2.add (bmas); p2.add (bmenos); p2.add (bmult); p2.add (bdiv); p2.add (bmod);
p2.add (bigual); p2.add (bborrar); p2.add (bpunto); p2.add (bce);

add (caja); add (b1); add (b2); add (b3); add (b4); add (b5); add (b6); add (b7); add (b8); add (b9); add (b0); add (bmas); add (bmenos); add (bmult); add (bdiv); add (bmod); add (bigual); add (bborrar); add (bpunto); add (bce); add (p1) add (p2);

}

Matlab: Matrix with negative numbers

I have a matrix, A = [745 x 678]which consists of negative and positive values. I would like to do all zero negative numbers but I am not sure how to do it.

I thought of something like:

n = 678
for i = 1: n
A (A <0) = 0
end

However, I am not sure how to apply this to each element of the matrix. Any help would be appreciated.

sequences and series – How to evaluate the next sum with 2 numbers less than sigma

Thank you for your contribution to Mathematics Stack Exchange!

  • Please make sure to respond to the question. Provide details and share your research!

But to avoid

  • Ask for help, clarification, or answer other answers.
  • Make statements based on the opinion; save them with references or personal experience.

Use MathJax to format equations. MathJax reference.

To learn more, read our tips for writing good answers.

5th dnd – Do you need numbers to play D & D?

Thanks for contributing a response to the Games Stack Exchange role-playing games!

  • Please make sure to respond to the question. Provide details and share your research!

But to avoid

  • Ask for help, clarification, or answer other answers.
  • Make statements based on the opinion; save them with references or personal experience.

Use MathJax to format equations. MathJax reference.

To learn more, read our tips for writing good answers.