Is there a way to make Pari-gp return an integer rather than another Modulo?
Can
(21:49) gp > Mod(1100,19)
%11 = Mod(17, 19)
return 17?
Sort of like Wolfram Alpha:
https://www.wolframalpha.com/input/?i=Mod%5B1100,19%5D
Thanks in advance.
given $h+k=2016$, and the two roots $\alpha \,\, and \,\, \beta $ of equation $x^2+hx+k=0$ are all integers , please find the value of:
$h,k,\alpha \,\, and \,\, \beta$
I learned Fortran from ancient people who disregard modern standards. As such, my code consists mainly of that older syntax. I am wondering how well this meshes with current Fortran environments, specifically regarding double precision calculations. This comes up mainly because I have been...
At work I am writing a somewhat complex piece of software, and inside it at some point I have to solve the following problem:
I have several "streams", each of which has equally spaced points according to a proportionality factor 'a', i.e. X=a*n. Each stream has a different 'a'.
As an example...
Homework Statement
If ℤ[x] denotes the commutative ring consisting of all polynomials with integer coefficients, list all the elements in ℤ[x] that have a multiplicative inverse in ℤ[x].
Homework Equations
Multiplicative inverse if rs = 1 where rs ∈ R (rs are elements of the ring)...
Homework Statement
Let a and n be positive integers. Prove that a^(1/n) is either an integer or is irrational.
Homework EquationsThe Attempt at a Solution
Proof:
If a^(1/n) = x/y where y divides x, then we have an integer.
If a^(1/n) = x/y where y does not divide x, then
a = (a^(1/n))^n =...
Say I apply a raising operator to the spin state |2,-1>, then by using the the equation
S+|s,ms> = ћ*sqrt(s(s+1) - ms(ms+1))|s,ms+1>
I get,
S+|2,-1> = sqrt(6)ћ|2,0>
Does this correspond to a physical eigenvalue or should I disregard it and only take states with integer multiples of ћ as...
Homework Statement
Write a program that will square the input positive integer represented as a string.
Homework Equations
3. The Attempt at a Solution [/B]
Is there another way of squaring a string number instead of multiplying it by itself?
Something like a pow() function for strings?
If...
Hey! :o
I want to prove the following implication:
$$k \in \mathbb{Z} \Leftrightarrow ce^x-1 \mid c^ke^{kx}-1$$ For the direction $\Rightarrow$ I tried the following:
$k >0$:
$$\sum_{i=0}^{k-1} (ce^x)^i=\frac{(ce^x)^k-1}{ce^x-1} \\ \Rightarrow (ce^x)^k-1=(ce^x-1)\sum_{i=0}^{k-1}...
Homework Statement
How many non-negative integer solutions are there to the equation
x1 + x2 + x3 + x4 + x5 < 11,
(i)if there are no restrictions?
(ii)How many solutions are there if x1 > 3?
(iii)How many solutions are there if each xi < 3?
Homework Equations
N/A
The Attempt at a Solution...
I am confused about the concept of a mole. Avogadro's # says that 1 mole has 6.023*10^23 particles.
Does it make sense to talk about moles in a non-integer sense?
For example, can you say that 1/2 mole has 1/2*(6.023*10^23) particles?
Homework Statement
I am to write a program that has its user enter 100 character or less and determine if the line is a palindrome or not. I must use pointers one that starts at the beginning and one at the end of the array that must work their way in until they meet.(I'm also having trouble...
write a c programs Take integer and find all divisors/Factors , print is it prime or not? and how many divisors contain print it?
how to solve in one program and how many divisors/Factors
contains
my code:
#include<stdio.h>
#include<conio.h>
#include<math.h>
int main()
{
int number,i...
Write a “C++” program to read any integer number and print each digit into word.
I went like this
# include <iostream.h>
#include <conio.h>
void main(){
int a,b,c,d;
clrscr();
b=a
cout<<"Enter any number"<<endl;
cin>>a;
c=a%10;
d=a/10;
I am not getting further logic.
someone was saying for loop...
Hey! :o
I want to prove the following lemma:
Let $F[t,t^{-1}]$ be the ring of the polynomials in $t$ and $t^{-1}$ with coefficients in the field $F$ and assume that the characteristic of $F$ is zero.
Then for any $n$ in $F[t, t^{-1}]$, $n$ is a nonzero integer if and only if
$n$ divides...
So I just completed a simple exercise that converts all letters of a string to upper case letters. The program works but it comes with the warning: comparison between signed and unsigned integer expressions [Wsign-compare].
What does this mean? While whatever is causing the warning does not seem...
Homework Statement
For a positive integer ##n##, let
##a_n=\frac{1}{n} \sqrt[3]{n^{3}+n^{2}-n-1}##
Find the smallest positive integer ##k \geq2## such that ##a_2a_3\cdots a_k>4##
Homework Equations
The restrictions are the only relevant thing I can think of
The Attempt at a Solution
I have...
Homework Statement
##x_1+x_2 \cdots x_{251}=708## has a certain # of solutions in positive integers ##x_1 \cdots x_{251}##
Now the equation ##y_1+y_2 \cdots y_{n}=708## also has the same number of positive integer solutions ##y_1, \cdots y_n## Where ##n \neq251## What is ##n##
Homework...
Homework Statement
Let ##x,y,z## be positive integers such that ##\sqrt{x+2\sqrt{2015}}=\sqrt{y}+\sqrt{z}## find the smallest possible value of ##x##
Homework Equations
Not even sure what to ask I'm trying to learn number theory doing problems and look up information by doing the problems...
Dear Everyone,I would like some help to get start with a proof. A problem states, "if p is an integer, show that p is even iff p^2 is even."I know that p is the an integer.
Let p be an integer.
$p=2m$, where m is an integer.Thank you for your help
CBarker
$A=\sqrt{1^2+\dfrac{1}{1^2+2^2}}+\sqrt{1^2+\dfrac{1}{2^2+3^2}}+\sqrt{1^2+\dfrac{1}{3^2+4^2}}+---+\sqrt{1^2+\dfrac{1}{2011^2+2012^2}}$
please find an integer S most close to A and less than A
I am trying to define a real number as follows:
real*8 r
r=2.5*10**20
This results in the following warning:
r=2.5*10**20
1
Warning(131): Integer overflow at 1
First off, I am not even declaring it as an integer, yet the warning is named as such.
After searching around for...
Homework Statement
I am a hobbyist looking for solutions to ax^2 + bx - cy^2 - dy = 0 where all variables are integers and are non-zero. Is there a method of doing this effectively?
Homework EquationsThe Attempt at a Solution
I can look at the numbers produced by ax^2 + bx vs cy^2 + dy and see...
Not homework but given the question it probably fits here best
Given the following equation
$$x^2+138x+317=y^2$$
How do you find the integer solutions?
For example wolframalpha has the solutions. but I cannot see how they are derived
http://www.wolframalpha.com/input/?i=x^2+138x+317=y^2
By...
Why is π/2∫3π/2[cos-1t].dt = π/2∫3π/2-1.dt?
[.] denotes the greatest integer function. Is it because [cos-1t] = -1 in t ∈ [π/2,3π/2)? But [cos-1t] = 0 for x = 3π/2. So we have one 0 along with all the -1's in (π/2,3π/2]. So how can we substitute [cos-1t] = -1 for every x in (π/2,3π/2] even...
Hi, so I'm trying to use the following if statement:
if (sum(i,j) <=1.0 ) then
sidash=(si)*(Death)
else if (1 <= sum(i,j) <= 2) then
sidash=(si)*((sqrt(2.0)+1.0)*(2.0-sum(i,j))*(Death)+(sum(i,j)-1.0)*(Survive))
else if (sum(i,j)<=3 .and. sum(i,j)=>2) then...
so our thesis is about fuzzy integer programming and even if I am searching what it is or what does it normally solve or how can it be solved the only results appearing are thesis which are difficult to understand. can someone explain what it is or suggest sites where I can have an idea? Thank you!
Just a simple question -- can the dimension of coupling constant be a rational number or should it always be an integer?
The question arose when I was trying to construct a Lagrangian with an interaction term involving two spin-1 particles and a fermion. The dimensions add up to 7/2, which...
Assume that I have absolutely no clue to what is the formula used to generate a sequence.
How do I know what kind of formula that is? (Exponential / Linear / Polynomial / etc)
Also assume that there is only 1 formula that generates the sequence.
I have read somewhere before that:
f'(x) ~...
Q:Explain this phenomenon by finding a sequence of integers a_i, defined by a recursion relation similar to the Fibonacci sequence, such that a_n = (2 + √
3)^n + (2 −√3)^n.
Make sure to explain why constructing such a sequence proves (2 + √3)^50 is close to an integer, though you needn’t analyze...
I mean why is f=ma?
why not m0.123a1.43 or some random non integers?
I hope you understand that my doubt doesn't limit just to force or energy or velocity e.t.c.
it also extends to area of a square,circle e.t.c and all other formulae
i think whole thing starts with direct proportionality.
I am about to do a paper about distributing subjects to students with the constraints on: number of subjects that the student need, number of students whom these subjects will be distributed to, and the number of students that every subject can handle (for example, 50 for math 1 and so on)...