# Newbie questions - simple integers with larger numbers

**URL:** https://openfhe.discourse.group/t/newbie-questions-simple-integers-with-larger-numbers/200
**Category:** Library Questions
**Created:** [November 2, 2022, 3:26pm UTC](https://openfhe.discourse.group/t/newbie-questions-simple-integers-with-larger-numbers/200 "2022-11-02T15:26:08Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![rohit](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@rohit](https://openfhe.discourse.group/u/rohit)
#### Post date: [November 2, 2022, 3:26pm UTC](https://openfhe.discourse.group/t/newbie-questions-simple-integers-with-larger-numbers/200/1 "2022-11-02T15:26:08Z")

</div>

I am trying to modify the simple-integers example to add the following two integer vectors:

```auto
// First plaintext vector is encoded
std::vector<int64_t> vectorOfInts1 = {100000, 120000, 130000, 140000, 150000, 100006, 70000, 80000, 90000, 100000, 110000, 100002};
Plaintext plaintext1 = cryptoContext->MakePackedPlaintext(vectorOfInts1);
// Second plaintext vector is encoded
std::vector<int64_t> vectorOfInts2 = {106000, 120060, 133000, 141000, 154000, 180006, 75000, 81000, 95000, 140000, 119000, 105002};
Plaintext plaintext2 = cryptoContext->MakePackedPlaintext(vectorOfInts2);

```

I get the following runtime exception.

```auto
libc++abi: terminating with uncaught exception of type lbcrypto::math_error: ...openfhe-development/src/core/lib/math/nbtheory.cpp:294 
Please provide a primeModulus(q) and a cyclotomic number(m) satisfying the condition: (q-1)/m is an integer. 
The values of primeModulus = 500009 and m = 16384 do not satisfy this condition

```

Where can I find information on how to select the right parameters for my use case?

Thanks

---

<div class="post-metadata">

### Author: ![Caesar](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/caesar/32/63_2.png) [@Caesar](https://openfhe.discourse.group/u/Caesar)
#### Post date: [November 2, 2022, 6:31pm UTC](https://openfhe.discourse.group/t/newbie-questions-simple-integers-with-larger-numbers/200/2 "2022-11-02T18:31:08Z")

</div>

Please provide the crypto-context parameters or the source code of your test case.

---

<div class="post-metadata">

### Author: ![saroja](https://avatars.discourse-cdn.com/v4/letter/s/eada6e/32.png) [@saroja](https://openfhe.discourse.group/u/saroja)
#### Post date: [November 2, 2022, 6:40pm UTC](https://openfhe.discourse.group/t/newbie-questions-simple-integers-with-larger-numbers/200/3 "2022-11-02T18:40:37Z")

</div>

To use MakePackedPlaintext with BFV/BGV, you need to choose a prime plaintext modulus t such that `t = 1 (mod m),` which in your case is 16,384. Try using a plaintext modulus of 557,057.

---

<div class="post-metadata">

### Author: ![rohit](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@rohit](https://openfhe.discourse.group/u/rohit)
#### Post date: [November 3, 2022, 1:10pm UTC](https://openfhe.discourse.group/t/newbie-questions-simple-integers-with-larger-numbers/200/4 "2022-11-03T13:10:26Z")

</div>

That seems to have solved the error.  
Thank you!
