numbers

package
Version: v0.0.0-...-3532b54 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2016 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GreatestPerfectPower

func GreatestPerfectPower(base, limit int) int

GreatestPerfectPower returns the greatest exponent of base**e < limit

func IsPalindrome

func IsPalindrome(n int) bool

IsPalindrome returns true if n is a palindrome, e.g. 9009

func Reverse

func Reverse(n int) int

Reverse reverses n, e.g. 12345 becomes 54321

func SumOfMultiples

func SumOfMultiples(i, n int) int

SumOfMultiples returns the sum of multiples of i up to n

func SumOfNumbers

func SumOfNumbers(n int) int

SumOfNumbers returns the sum from 1 to n, e.g. 1 + 2 + ... + 100 = 5050

func SumOfSquares

func SumOfSquares(n int) int

SumOfSquares returns the sum from 1**2 to n**2, e.g. 1**2 + 2**2 + ... + 100**2 = 5050

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL