Welcome to MindCipher, a social repository of the world's greatest brain teasers, logic puzzles and mental challenges.

Rahul Kumar

Likes 1

9 1978

Ratings 0

No ratings yet!

Comments 3

Multiples of 8 plus 1

PROOF: Let p be any odd no. (2p+1)^2-1 =4p^2 + 4p +1-1 =4p^2 + 4p =4(p^2 + p) ----(1) clearly when p is an odd no. then p^2 is also an odd no. thus p^2+p is an even no.(as sum of two odd no. is an even no.) let say, p^2 + p =2 x; then eqn (1) becomes: (2p+1)^2-1 = 4(p^2 + p) =42x = 8x proved...

context
1978

2307

include<stdio.h>

include<conio.h>

void main() { int y,a,b,c,d,i,j,flag=0,p,q; scanf("%d",&y); while(flag<1 || y<10000)

{
a=y/1000;
b=y/100-a*10;
c=y/10-a*100-b*10;
d=y-a*1000-b*100-c*10;
p=y/100;
q=c*10+d;
//printf("%d %d %d %d",a,b,c,d);
if((p+q)==(b+c))
    {
    printf("%d\n",y);
    flag++;
    }
}

printf("%d %d",y,flag); getch(); }

context
Gold or silver?

same dude

context