oeis
Copyright(c) Eric Bailey 2020-2025
LicenseMIT
Maintainereric@ericb.me
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageGHC2021

Math.OEIS

Description

Some sequences from OEIS

Synopsis

Documentation

a000010 :: (Integral a, UniqueFactorisation a) => Infinite a Source #

Euler totient function \(\phi(n)\): count numbers \(1 \le k \le n\) such that \(k\) is coprime with (n), i.e., A000010.

a000040 :: (Bits a, Enum (Prime a), Integral a, UniqueFactorisation a) => Infinite a Source #

The prime numbers, i.e., A000040.

a000078 :: Integral a => Infinite a Source #

Tetranacci numbers, i.e., A000078.

a000111 :: Integral a => Infinite a Source #

Euler up/down numbers: e.g.f. \(\sec(x) + \tan(x)\), i.e. A000111.

a000120 :: Infinite Int Source #

Binary weight, i.e., A000120.

a000182 :: Integral a => Infinite a Source #

Tangent (or "Zag") numbers: e.g.f. \(\tan(x)\), also (up to signs), e.g., \(\tanh(x)\), i.e., A000182.

a000203 :: (UniqueFactorisation a, Integral a, GcdDomain a) => Infinite a Source #

The sum of the divisors of \(n\), i.e., A000203.

a000217 :: Integral a => a -> a Source #

Triangular numbers: \(T_{n} = \frac{n(n+1)}{2}\), i.e., A000217.

a000285 :: Num a => Infinite a Source #

Pseudo-Fibonacci numbers, i.e., A000285.

a000290 :: (Enum a, Num a) => Infinite a Source #

The squares: \(a000290(n) = n^2\), i.e., A000290.

a000312 :: Integral a => Infinite a Source #

\(a(n) = n^n\), i.e., A000312.

a000326 :: Integral a => a -> a Source #

Pentagonal numbers: \(P_{n} = \frac{n(3n-1)}{2}\), i.e., A000326.

a000330 :: Integral a => a -> a Source #

Square pyramidal numbers: \(a(n) = 0^2+1^2+2^2 + \dotsb + n^2 = \frac{n(n+1)(2n+1)}{6}\), i.e., A000330.

a000364 :: Integral a => Infinite a Source #

Euler (or secant or "Zig") numbers: e.g.f. (even powers only) \(\sec(x) = \frac{1}{\cos(x)}\), i.e., A000364.

a000384 :: Integral a => a -> a Source #

Hexagonal numbers: \(H_{n} = n(2n-1)\), i.e., A000384.

a000537 :: Integral a => Infinite a Source #

Sum of first \(n\) cubes; or \(n\)-th triangular number squared, i.e. A000537.

a001065 :: (UniqueFactorisation a, Integral a, GcdDomain a) => Infinite a Source #

Aliquot sum of \(n\), i.e., A001065.

a001142 :: (Integral a, GcdDomain a) => Infinite a Source #

Products of rows of Pascal's triangle, i.e., A001142.

a001913 :: (Bits a, Enum (Prime a), Integral a, UniqueFactorisation a) => Infinite a Source #

Full reptend primes, i.e., A001913.

a002034 :: (Integral a, UniqueFactorisation a) => Infinite a Source #

Kempner numbers: smallest positive integer \(m\) such that \(n\) divides \(m!\), i.e., A002034.

a002088 :: (Integral a, UniqueFactorisation a) => Infinite a Source #

Summatory totient, i.e., A002088.

See also a000010.

a002109 :: Integral a => Infinite a Source #

Hyperfactorials: \(\prod_{k=1}^n k^k\), i.e. A002109.

See also a000312.

a002326 :: Integral a => Infinite a Source #

Multiplicative order of \(2 \bmod{2n + 1}\), i.e., A002326.

a002378 :: Integral a => a -> a Source #

Oblong (or promic, pronic, or heteromecic) numbers: \(a002378(n) = n(n+1)\), i.e., A002378.

a003313 :: Natural -> Int Source #

Length of shortest addition chain for \(n\), i.e. A003313.

a004185 :: Infinite Integer Source #

Sort the digits of \(n\) in ascending order, removing any zeros, i.e., A004185.

a005101 :: (UniqueFactorisation a, Integral a, GcdDomain a) => Infinite a Source #

Abundant numbers (sum of divisors of \(n\) exceeds \(2n\), i.e. A005101.

a005252 :: Integral a => Infinite a Source #

\(a(n) = \sum_{k=0}^{\lfloor \frac{n}{4} \rfloor} \binom{n-2k}{2k}\), i.e., A005252.

a007318 :: (Integral a, Semiring a) => Infinite a Source #

Pascal's triangle read by rows: \(\binom{n}{k}\) for \(0 \le k \le n\), i.e., A007318.

a007947 :: UniqueFactorisation a => a -> a Source #

Largest squarefree number diving \(n\): the square free kernel of \(n\), \(\text{rad}(n)\), radical of \(n\), i.e., A007947.

a007953 :: Integral a => a -> a Source #

Digital sum of \(n\), i.e., A007953.

a013928 :: (Integral a, UniqueFactorisation a) => Infinite a Source #

Number of (positive) squarefree numbers \(< n\), i.e., A013928.

a015614 :: (Integral a, UniqueFactorisation a) => Infinite a Source #

\(a(n) = -1 + \Phi(n)\), i.e., A015614.

See also a002088.

a027748 :: (Enum a, UniqueFactorisation a) => Infinite a Source #

Irregular triangle in which first row is \(1\), \(n\)-th row \((n > 1)\) lists distinct prime factors of \(n\), i.e. A027748.

See distinctPrimeFactors.

a034705 :: Infinite Int Source #

Numbers that are sums of consecutive squares, i.e. A034705.

See also a000290 and squares.

a048260 :: (UniqueFactorisation a, Integral a, GcdDomain a) => Infinite a Source #

The sum of two (not necessarily distinct) abundant numbers, i.e., A048260.

See also a005101.

a049690 :: (Integral a, UniqueFactorisation a) => Infinite a Source #

\(a(n) = \sum_{k=1}^n \phi(2k)\), i.e., A049690.

See also a000010 and a002088.

a051885 :: Integral a => a -> a Source #

Smallest number whose sum of digits is \(n\), i.e. A051885.

See also a007953 and digitSum.

a056924 :: (Integral a, UniqueFactorisation a) => a -> a Source #

Number of divisors of \(n\) that are smaller than \(\sqrt{n}\), i.e. A056924.

\(a056924(n) = N(4n)\) from Project Euler Problem 174: Hollow Square Laminae II.

a057627 :: (Integral a, UniqueFactorisation a) => Infinite a Source #

Number of nonsquarefree numbers not exceeding \(n\), i.e., A057627.

a060735 :: UniqueFactorisation a => Infinite a Source #

\(a060735(1) = 1\), \(a060735(2) = 2\); thereafter, \(a060735(n)\) is the smallest number \(m\) not yet in the sequence such that every prime that divides \(a(n-1)\) also divides \(m\), i.e. A060735.

See a007947.

a072389 :: Integral a => Infinite a Source #

Numbers of the form \(x(x+1)y(y+1)\) ("bipronics") with \(x\) and \(y\) nonnegative integers, i.e., A072389.

See a002378.

a076314 :: Integral a => a -> a Source #

\(a076314(n) = \lfloor \frac{n}{10} \rfloor + (n \bmod 10)\), i.e. A0076314.

a082949 :: Infinite HybridInteger Source #

Numbers of the form \(p^{q}q^{p}\), with distinct primes \(p\) and \(q\), i.e., A082949.

a111251 :: Infinite Integer Source #

Numbers \(k\) such that \(3k^2 + 3k + 1\) is prime, i.e. A111251.

a161680 :: Integral a => a -> a Source #

\(\binom{n}{2}\), i.e., A161680.

a204692 :: Integral a => a -> a Source #

The number of base-10 bouncy numbers below \(10^{n}\), i.e., A204692.

a211264 :: Integral a => a -> a Source #

Number of integer pairs \((x,y,)\) such that \(0 < x < y \leq n\) and \(xy \leq n\), i.e., A211264.

digitSum :: Integral a => a -> a Source #

See a007953.

distinctPrimeFactors :: UniqueFactorisation a => a -> NonEmpty a Source #

The distinct prime factors of a given number.

>>> distinctPrimeFactors 504
2 :| [3,7]

See also a007947 and a027748.

isPentagonal :: Integral a => a -> Bool Source #

Determine whether a given number is pentagonal, i.e., a member of a000326.

squares :: (Enum a, Num a) => Infinite a Source #

See a000290.