write an algo to find the sum of even number from 1to n
The sum of all prime numbers between 1 and 11 is 28.
Their sum is 37.
24
The sum of the digits in odd position minus the sum of the digits in even position is divisible by 11.
39
12
Including 11 they are: 11+13+17+19 = 60
If you are including 10 and 30 there are 11 even numbers. If you are not counting 10 and 30 there are 9 even numbers between 10 and 30.
2022
The sum of prime numbers between 1 and 25 is 100. 2 + 3 + 5 + 7 + 11 +13 +17 + 19 + 23 = 100
All prime numbers greater than 2 are odd numbers. For an odd prime to be written as the sum of two primes, one of the primes must be 2 because two odd primes will produce an even sum. 11 cannot be written as the sum of two primes. 13 = 2 + 11. 17 cannot be written as the sum of two primes. 19 = 2 + 17.