• Home
standardname.space
 
Skip to content
  • Home
Category: Programming
Home Archive for category "Programming"

Category: Programming

Golang, Math, Programming, ProjectEuler

Problem 33: Digit cancelling fractions

By will April 14, 2019 June 29, 2019 0

The fraction 49/98 is a curious fraction, as an inexperienced mathematician in attempting to simplify it may incorrectly believe that 49/98 = 4/8, which is correct, is obtained by cancelling the 9s. We shall consider fractions like, 30/50 = 3/5, to be trivial examples. There are exactly four non-trivial examples …

Continue reading
Golang, Math, Programming, ProjectEuler

Problem 45: Triangular, pentagonal, and hexagonal

By will April 13, 2019 October 4, 2019 0

Triangle, pentagonal, and hexagonal numbers are generated by the following formulae: Triangle Tn=n(n+1)/2 1, 3, 6, 10, 15, … Pentagonal Pn=n(3n−1)/2 1, 5, 12, 22, 35, … Hexagonal Hn=n(2n−1) 1, 6, 15, 28, 45, … It can be verified that T285 = P165 = H143 = 40755. Find the next …

Continue reading
Golang, Math, Programming, ProjectEuler

Problem 87: Prime power triples

By will April 11, 2019 June 29, 2019 0

The smallest number expressible as the sum of a prime square, prime cube, and prime fourth power is 28. In fact, there are exactly four numbers below fifty that can be expressed in such a way: 28 = 22 + 23 + 2433 = 32 + 23 + 2449 = 52 + 23 + 2447 = …

Continue reading
Golang, Math, Programming, ProjectEuler

Problem 55: Lychrel Numbers

By will April 11, 2019 April 11, 2019 0

If we take 47, reverse and add, 47 + 74 = 121, which is palindromic. Not all numbers produce palindromes so quickly. For example, 349 + 943 = 1292, 1292 + 2921 = 4213 4213 + 3124 = 7337 That is, 349 took three iterations to arrive at a palindrome. …

Continue reading
Golang, Math, Programming, ProjectEuler

Problem 44: Pentagon Numbers

By will April 11, 2019 April 11, 2019 0

Pentagonal numbers are generated by the formula, Pn=n(3n−1)/2. The first ten pentagonal numbers are: 1, 5, 12, 22, 35, 51, 70, 92, 117, 145, … It can be seen that P4 + P7 = 22 + 70 = 92 = P8. However, their difference, 70 − 22 = 48, is …

Continue reading
Golang, Math, Programming, ProjectEuler

Problem 52: Permuted Multiples

By will April 11, 2019 April 11, 2019 0

It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order. Find the smallest positive integer, x, such that 2x, 3x, 4x, 5x, and 6x, contain the same digits. Here is my solution in Golang.

Continue reading
Golang, Math, Programming, ProjectEuler

Problem 46: Goldbach’s other conjecture

By will April 11, 2019 April 11, 2019 0

It was proposed by Christian Goldbach that every odd composite number can be written as the sum of a prime and twice a square. 9 = 7 + 2×12 15 = 7 + 2×22 21 = 3 + 2×32 25 = 7 + 2×32 27 = 19 + 2×22 33 …

Continue reading
Golang, Math, Programming, ProjectEuler

Problem 41: Pandigital Prime

By will April 10, 2019 April 10, 2019 0

We shall say that an n-digit number is pandigital if it makes use of all the digits 1 to n exactly once. For example, 2143 is a 4-digit pandigital and is also prime. What is the largest n-digit pandigital prime that exists? Here is my solution in Golang.

Continue reading
Golang, Math, Programming, ProjectEuler

Problem 49: Prime Permutations

By will April 10, 2019 April 10, 2019 0

The arithmetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual in two ways: (i) each of the three terms are prime, and, (ii) each of the 4-digit numbers are permutations of one another. There are no arithmetic sequences made up of three 1-, …

Continue reading
Golang, Math, Programming, ProjectEuler

Problem 50: Consecutive Prime Sum

By will April 10, 2019 April 10, 2019 0

The prime 41, can be written as the sum of six consecutive primes: 41 = 2 + 3 + 5 + 7 + 11 + 13 This is the longest sum of consecutive primes that adds to a prime below one-hundred. The longest sum of consecutive primes below one-thousand that …

Continue reading

Posts navigation

1 2 3 … 6

Recent Posts

  • Problem 33: Digit cancelling fractions
  • Problem 45: Triangular, pentagonal, and hexagonal
  • Problem 87: Prime power triples
  • Problem 55: Lychrel Numbers
  • Problem 44: Pentagon Numbers

Recent Comments

    Archives

    • April 2019
    • December 2018
    • September 2017
    • August 2017
    • July 2017
    • June 2017
    • May 2017
    • February 2017
    • January 2017
    • December 2016
    • November 2016
    • October 2016
    • September 2016
    • August 2016

    Categories

    • Assembly
    • C
    • C++
    • Golang
    • Java
    • Math
    • Programming
    • ProjectEuler
    • Python

    Meta

    • Log in
    • Entries RSS
    • Comments RSS
    • WordPress.org
    Powered by Fluida & WordPress.