Home Menschen Info Artikel Blogs Veranstaltungen Videos Dateien Fotos Seiten Store
Beitrag Ansicht

Twin Function: Integer of Odds *At the beaches of Babylon*

Simple to see,  x*(x+1) is the integral of the odd number function 2x+1

INT 2x+1 = (2/2) x^(1+1) + x ^(0+1) = x^2 + x

Hence a kind of rectangle geometry without squares, but with the blow-up option of 4*(x*(x+1)) + 1 to odd squares

The squares base is the derivative of x*(x+1) or just x+x+1, hence, for 3*4 it's 7 and 7upsquare ;) 49

(a kind of celtic schema to calculate roots without calculator)

Furthermore (without saying), x*(x+1)/Z  has integer results just for x oder x+1 factor or multiples of factors Z

953*954 / 8577 = 954/9 = 106 as 953 is factor of 8577

or x*(x+1)/ 1111 = 230 for x= 505 and 101 = 5*101 is factor of Z

Be aware - You'll find just common factors !! Analysis has to be continued, if...

The funny programme :

//(C) Dr. Ulrike Ritter : Weiterverarbeitung, Vewendung etc. nur mit vorheriger ausdruecklicher Genehmigung der Autorin 4.1.2018

#include<stdio.h>

#include<conio.h>

#include<string.h>

#include <math.h>

#include <cstdlib>

#include <iostream>

#include<algorithm>

int main(void)

{

int n;

int a;

int b;

int c;

int cp;

int lim;

int z;

std::cout <<"\n   Input limit for our test (as high as z is enough)  \n";

std::cout <<"lim: \n";

std::cin>> lim;

std::cout <<"\n   Input your integer to factorize   \n";

std::cout <<"z: \n";

std::cin>> z;

for (int n=1;n<9999;n++)

{

cp=n-1;

if (cp==lim) break;

c=n*(n+1);

a=c/z;

b=z*a;

if(c==b && (a+1)<z)

{

std::cout << " twin product for n  "<<  n<< "  and n+1 "<<n+1<<"    is c = n*(n+1) :   "  <<c<< "   \n";

std::cout << " divided by   "<<n<<" =  "<<a<<" \n";

}

if(c==b && (a==z || a>z))

{std::cout << " prime-twin product for n  "<<  n<< "  and n+1 "<<n+1<<"    is c = n*(n+1) :   "  <<c<< "   \n";

std::cout << " divided by   "<<n<<" =  "<<a<<" \n";

}

if (z==(n*n))

{std::cout << " Z is a square with base   "<<n<<" \n";

}

}

}

Typical output:

Input limit for our test (as high as z is enough)

lim:

277

Input your integer to factorize

z:

277

prime-twin product for n  277  and n+1 278    is c = n*(n+1) :   77006

divided by   277 =  278

--------------------------------

Process exited after 6.09 seconds with return value 0

Drücken Sie eine beliebige Taste . . .

For a non-prime:

Input limit for our test (as high as z is enough)

lim:

51

Input your integer to factorize

z:

51

twin product for n  17  and n+1 18    is c = n*(n+1) :   306

divided by   17 =  6

twin product for n  33  and n+1 34    is c = n*(n+1) :   1122

divided by   33 =  22

prime-twin product for n  51  and n+1 52    is c = n*(n+1) :   2652

divided by   51 =  52

--------------------------------

Process exited after 33.03 seconds with return value 0

Drücken Sie eine beliebige Taste . . .

For a square:

Input limit for our test (as high as z is enough)

lim:

169

Input your integer to factorize

z:

169

Z is a square with base   13

prime-twin product for n  169  and n+1 170    is c = n*(n+1) :   28730

divided by   169 =  170

--------------------------------

Process exited after 4.947 seconds with return value 0

Drücken Sie eine beliebige Taste . . .

Verlag 04.03.2018 0 584
Kommentare
Ordnen nach:
Pro Seite:

• _There are no comments yet
Postinfo
04.03.2018 (_x_days_ago)
Rate
1 Abstimmungen
Aktionen
Empfehlen
Kategorien
Books (14 beiträge)
Entertainment Blogs (23 beiträge)
Lifestyle (1 beiträge)
Politics (1 beiträge)
Tech News (3 beiträge)
Tags