chunky v0.10.0 Chunky.Sequence.OEIS.Core View Source

OEIS Core Sequences.

Available Sequences

Link to this section Summary

Functions

OEIS Sequence A000005 - Number of divisors of N, simga-0(n), 𝝈0(n).

OEIS Sequence A000009 - Number of partitions of n into distinct parts

OEIS Sequence A000010 - Euler's totient function phi(n)

OEIS Sequence A000041 - Partitions of integer N

OEIS Sequence A000079 - Powers of 2 a(n) = 2^n

OEIS Sequence A000203 - Sum of Divisors σ1(n)

OEIS Sequence A000244 - Powers of 3.

OEIS Sequence A000290 - The squares: a(n) = n^2.

OEIS Sequence A000302 - Powers of 4: a(n) = 4^n.

OEIS Sequence A000396 - Perfect Numbers

OEIS Sequence A000578 - The cubes: a(n) = n^3.

OEIS Sequence A000593 - Sum of Odd Divisors of N

OEIS Sequence A001065 - Sum of proper divisors (Aliquot parts) of N.

OEIS Sequence A001157 - Sum of squares of divisors of N, simga-2(n), 𝝈2(n).

OEIS Sequence A001221 - Number of distinct primes dividing n (also called omega(n)).

OEIS Sequence A001222 - Number of prime divisors of n counted with multiplicity (also called bigomega(n) or Omega(n)).

OEIS Sequence A001358 - Semiprimes (or biprimes): products of two primes.

OEIS Sequence A001615 - Dedekind psi function: n * Product_{p|n, p prime} (1 + 1/p).

OEIS Sequence A005100 - Deficient Numbers

OEIS Sequence A005101 - Abundant Numbers

OEIS Sequence A005117 - Squarefree numbers: numbers that are not divisible by a square greater than 1.

OEIS Sequence A006530 - Gpf(n): greatest prime dividing n

OEIS Sequence A008683 - Möbius (or Moebius) function mu(n)

OEIS Sequence A020639 - Lpf(n): least prime dividing

Link to this section Functions

Link to this function

create_sequence_a000005(opts)

View Source

OEIS Sequence A000005 - Number of divisors of N, simga-0(n), 𝝈0(n).

From OEIS A000005:

d(n) (also called tau(n) or sigma_0(n)), the number of divisors of n. (Formerly M0246 N0086)

Sequence IDs: :a000005

Finite: False

Offset: 1

Example

iex> Sequence.create(Sequence.OEIS.Core, :a000005) |> Sequence.take!(10)
[1, 2, 2, 3, 2, 4, 2, 4, 3, 4]
Link to this function

create_sequence_a000009(opts)

View Source

OEIS Sequence A000009 - Number of partitions of n into distinct parts

From OEIS A000009:

Expansion of Product_{m >= 1} (1 + x^m); number of partitions of n into distinct parts; number of partitions of n into odd parts (if n > 0). (Formerly M0281 N0100)

Divergence

Calculation of this sequence is based on translation of a Maxima program by Vladimir Kruchinin, and diverges from canonical results for n > 10.

Sequence IDs: :a000009

Finite: False

Offset: 0

Example

iex> Sequence.create(Sequence.OEIS.Core, :a000009) |> Sequence.take!(10)
[1, 1, 1, 2, 2, 3, 4, 5, 6, 8]
Link to this function

create_sequence_a000010(opts)

View Source

OEIS Sequence A000010 - Euler's totient function phi(n)

From OEIS A000010:

Euler totient function phi(n): count numbers <= n and prime to n. (Formerly M0299 N0111)

Sequence IDs: :a000010

Finite: false

Example

iex> Sequence.create(Sequence.OEIS.Core, :a000010) |> Sequence.take!(20)
[1, 1, 2, 2, 4, 2, 6, 4, 6, 4, 10, 4, 12, 6, 8, 8, 16, 6, 18, 8]
Link to this function

create_sequence_a000041(opts)

View Source

OEIS Sequence A000041 - Partitions of integer N

This sequence contains the partitions of the integers from 0 to 250.

From Wikipedia:

In number theory, the partition function p(n) represents the number of possible partitions of a non-negative integer n. For instance, p(4) = 5 because the integer 4 has the five partitions: 1 + 1 + 1 + 1, 1 + 1 + 2, 1 + 3, 2 + 2, and 4.

From OEIS A000041:

a(n) is the number of partitions of n (the partition numbers). (Formerly M0663 N0244)

Sequence IDs: :a000041

Finite: true

Example

iex> Sequence.create(Sequence.OEIS.Core, :a000041) |> Sequence.take!(10)
[1, 1, 2, 3, 5, 7, 11, 15, 22, 30]
Link to this function

create_sequence_a000079(opts)

View Source

OEIS Sequence A000079 - Powers of 2 a(n) = 2^n

From OEIS A000009:

Powers of 2: a(n) = 2^n. (Formerly M1129 N0432)

Sequence IDs: :a000079

Finite: False

Offset: 0

Example

iex> Sequence.create(Sequence.OEIS.Core, :a000079) |> Sequence.take!(20)
[1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288]
Link to this function

create_sequence_a000203(opts)

View Source

OEIS Sequence A000203 - Sum of Divisors σ1(n)

From OEIS A000203:

(n) = sigma(n), the sum of the divisors of n. Also called sigma_1(n). (Formerly M2329 N0921)

Sequence IDs: :a000203

Finite: False

Offset: 1

Example

iex> Sequence.create(Sequence.OEIS.Core, :a000203) |> Sequence.take!(20)
[1, 3, 4, 7, 6, 12, 8, 15, 13, 18, 12, 28, 14, 24, 24, 31, 18, 39, 20, 42]  
Link to this function

create_sequence_a000244(opts)

View Source

OEIS Sequence A000244 - Powers of 3.

From OEIS A000244:

Powers of 3. (Formerly M2807 N1129)

Sequence IDs: :a000244

Finite: False

Offset: 0

Example

iex> Sequence.create(Elixir.Chunky.Sequence.OEIS.Core, :a000244) |> Sequence.take!(28)
[1,3,9,27,81,243,729,2187,6561,19683,59049,177147,531441,1594323,4782969,14348907,43046721,129140163,387420489,1162261467,3486784401,10460353203,31381059609,94143178827,282429536481,847288609443,2541865828329,7625597484987]
Link to this function

create_sequence_a000290(opts)

View Source

OEIS Sequence A000290 - The squares: a(n) = n^2.

From OEIS A000290:

The squares: a(n) = n^2. (Formerly M3356 N1350)

Sequence IDs: :a000290

Finite: False

Offset: 0

Example

iex> Sequence.create(Elixir.Chunky.Sequence.OEIS.Core, :a000290) |> Sequence.take!(51)
[0,1,4,9,16,25,36,49,64,81,100,121,144,169,196,225,256,289,324,361,400,441,484,529,576,625,676,729,784,841,900,961,1024,1089,1156,1225,1296,1369,1444,1521,1600,1681,1764,1849,1936,2025,2116,2209,2304,2401,2500]
Link to this function

create_sequence_a000302(opts)

View Source

OEIS Sequence A000302 - Powers of 4: a(n) = 4^n.

From OEIS A000302:

Powers of 4: a(n) = 4^n. (Formerly M3518 N1428)

Sequence IDs: :a000302

Finite: False

Offset: 0

Example

iex> Sequence.create(Elixir.Chunky.Sequence.OEIS.Core, :a000302) |> Sequence.take!(25)
[1,4,16,64,256,1024,4096,16384,65536,262144,1048576,4194304,16777216,67108864,268435456,1073741824,4294967296,17179869184,68719476736,274877906944,1099511627776,4398046511104,17592186044416,70368744177664,281474976710656]
Link to this function

create_sequence_a000396(opts)

View Source

OEIS Sequence A000396 - Perfect Numbers

From OEIS A000396:

Perfect numbers n: n is equal to the sum of the proper divisors of n. (Formerly M4186 N1744)

Sequence IDs: :a000396

Finite: True

Offset: 1

Example

iex> Sequence.create(Sequence.OEIS.Core, :a000396) |> Sequence.take!(5)
[6, 28, 496, 8128, 33550336]  
Link to this function

create_sequence_a000578(opts)

View Source

OEIS Sequence A000578 - The cubes: a(n) = n^3.

From OEIS A000578:

The cubes: a(n) = n^3. (Formerly M4499 N1905)

Sequence IDs: :a000578

Finite: False

Offset: 0

Example

iex> Sequence.create(Elixir.Chunky.Sequence.OEIS.Core, :a000578) |> Sequence.take!(41)
[0,1,8,27,64,125,216,343,512,729,1000,1331,1728,2197,2744,3375,4096,4913,5832,6859,8000,9261,10648,12167,13824,15625,17576,19683,21952,24389,27000,29791,32768,35937,39304,42875,46656,50653,54872,59319,64000]
Link to this function

create_sequence_a000593(opts)

View Source

OEIS Sequence A000593 - Sum of Odd Divisors of N

From OEIS A000593:

Sum of odd divisors of n. (Formerly M3197 N1292)

Sequence IDs: :a000593

Finite: False

Offset: 1

Example

iex> Sequence.create(Sequence.OEIS.Core, :a000593) |> Sequence.take!(10)
[1, 1, 4, 1, 6, 4, 8, 1, 13, 6]
Link to this function

create_sequence_a001065(opts)

View Source

OEIS Sequence A001065 - Sum of proper divisors (Aliquot parts) of N.

From OEIS A001065:

Sum of proper divisors (or aliquot parts) of n: sum of divisors of n that are less than n. (Formerly M2226 N0884)

Sequence IDs: :a001065

Finite: False

Offset: 1

Example

iex> Sequence.create(Sequence.OEIS.Core, :a001065) |> Sequence.take!(20)
[0, 1, 1, 3, 1, 6, 1, 7, 4, 8, 1, 16, 1, 10, 9, 15, 1, 21, 1, 22]
Link to this function

create_sequence_a001157(opts)

View Source

OEIS Sequence A001157 - Sum of squares of divisors of N, simga-2(n), 𝝈2(n).

From OEIS A001157:

sigma_2(n): sum of squares of divisors of n. (Formerly M3799 N1551)

Sequence IDs: :a001157

Finite: False

Offset: 1

Example

iex> Sequence.create(Sequence.OEIS.Core, :a001157) |> Sequence.take!(10)
[1, 5, 10, 21, 26, 50, 50, 85, 91, 130]
Link to this function

create_sequence_a001221(opts)

View Source

OEIS Sequence A001221 - Number of distinct primes dividing n (also called omega(n)).

From OEIS A001221:

Number of distinct primes dividing n (also called omega(n)). (Formerly M0056 N0019)

Sequence IDs: :a001221

Finite: False

Offset: 1

Example

iex> Sequence.create(Elixir.Chunky.Sequence.OEIS.Core, :a001221) |> Sequence.take!(111)
[0,1,1,1,1,2,1,1,1,2,1,2,1,2,2,1,1,2,1,2,2,2,1,2,1,2,1,2,1,3,1,1,2,2,2,2,1,2,2,2,1,3,1,2,2,2,1,2,1,2,2,2,1,2,2,2,2,2,1,3,1,2,2,1,2,3,1,2,2,3,1,2,1,2,2,2,2,3,1,2,1,2,1,3,2,2,2,2,1,3,2,2,2,2,2,2,1,2,2,2,1,3,1,2,3,2,1,2,1,3,2]
Link to this function

create_sequence_a001222(opts)

View Source

OEIS Sequence A001222 - Number of prime divisors of n counted with multiplicity (also called bigomega(n) or Omega(n)).

From OEIS A001222:

Number of prime divisors of n counted with multiplicity (also called bigomega(n) or Omega(n)). (Formerly M0094 N0031)

Sequence IDs: :a001222

Finite: False

Offset: 1

Example

iex> Sequence.create(Elixir.Chunky.Sequence.OEIS.Core, :a001222) |> Sequence.take!(111)
[0,1,1,2,1,2,1,3,2,2,1,3,1,2,2,4,1,3,1,3,2,2,1,4,2,2,3,3,1,3,1,5,2,2,2,4,1,2,2,4,1,3,1,3,3,2,1,5,2,3,2,3,1,4,2,4,2,2,1,4,1,2,3,6,2,3,1,3,2,3,1,5,1,2,3,3,2,3,1,5,4,2,1,4,2,2,2,4,1,4,2,3,2,2,2,6,1,3,3,4,1,3,1,4,3,2,1,5,1,3,2]
Link to this function

create_sequence_a001358(opts)

View Source

OEIS Sequence A001358 - Semiprimes (or biprimes): products of two primes.

From OEIS A001358:

Semiprimes (or biprimes): products of two primes. (Formerly M3274 N1323)

Sequence IDs: :a001358

Finite: False

Offset: 1

Example

iex> Sequence.create(Elixir.Chunky.Sequence.OEIS.Core, :a001358) |> Sequence.take!(61)
[4,6,9,10,14,15,21,22,25,26,33,34,35,38,39,46,49,51,55,57,58,62,65,69,74,77,82,85,86,87,91,93,94,95,106,111,115,118,119,121,122,123,129,133,134,141,142,143,145,146,155,158,159,161,166,169,177,178,183,185,187]
Link to this function

create_sequence_a001615(opts)

View Source

OEIS Sequence A001615 - Dedekind psi function: n * Product_{p|n, p prime} (1 + 1/p).

From OEIS A001615:

Dedekind psi function: n * Product_{p|n, p prime} (1 + 1/p). (Formerly M2315 N0915)

Sequence IDs: :a001615

Finite: False

Offset: 1

Example

iex> Sequence.create(Sequence.OEIS.Core, :a001615) |> Sequence.take!(69)
[1,3,4,6,6,12,8,12,12,18,12,24,14,24,24,24,18,36,20,36,32,36,24,48,30,42,36,48,30,72,32,48,48,54,48,72,38,60,56,72,42,96,44,72,72,72,48,96,56,90,72,84,54,108,72,96,80,90,60,144,62,96,96,96,84,144,68,108,96]
Link to this function

create_sequence_a005100(opts)

View Source

OEIS Sequence A005100 - Deficient Numbers

From OEIS A005100:

Deficient numbers: numbers n such that sigma(n) < 2n. (Formerly M0514)

Sequence IDs: :a005100

Finite: False

Offset: 1

Example

iex> Sequence.create(Sequence.OEIS.Core, :a005100) |> Sequence.take!(25)
[1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 29, 31, 32]
Link to this function

create_sequence_a005101(opts)

View Source

OEIS Sequence A005101 - Abundant Numbers

From OEIS A005101:

Abundant numbers (sum of divisors of n exceeds 2n). (Formerly M4825)

Sequence IDs: :a005101

Finite: False

Offset: 1

Example

iex> Sequence.create(Sequence.OEIS.Core, :a005101) |> Sequence.take!(10)
[12, 18, 20, 24, 30, 36, 40, 42, 48, 54]
Link to this function

create_sequence_a005117(opts)

View Source

OEIS Sequence A005117 - Squarefree numbers: numbers that are not divisible by a square greater than 1.

From OEIS A005117:

Squarefree numbers: numbers that are not divisible by a square greater than 1. (Formerly M0617)

Sequence IDs: :a005117

Finite: False

Offset: 1

Example

iex> Sequence.create(Elixir.Chunky.Sequence.OEIS.Core, :a005117) |> Sequence.take!(71)
[1,2,3,5,6,7,10,11,13,14,15,17,19,21,22,23,26,29,30,31,33,34,35,37,38,39,41,42,43,46,47,51,53,55,57,58,59,61,62,65,66,67,69,70,71,73,74,77,78,79,82,83,85,86,87,89,91,93,94,95,97,101,102,103,105,106,107,109,110,111,113]
Link to this function

create_sequence_a006530(opts)

View Source

OEIS Sequence A006530 - Gpf(n): greatest prime dividing n

From OEIS A006530:

Gpf(n): greatest prime dividing n, for n >= 2; a(1)=1. (Formerly M0428)

Sequence IDs: :a006530

Finite: False

Offset: 1

Example

iex> Sequence.create(Elixir.Chunky.Sequence.OEIS.Core, :a006530) |> Sequence.take!(86)
[1,2,3,2,5,3,7,2,3,5,11,3,13,7,5,2,17,3,19,5,7,11,23,3,5,13,3,7,29,5,31,2,11,17,7,3,37,19,13,5,41,7,43,11,5,23,47,3,7,5,17,13,53,3,11,7,19,29,59,5,61,31,7,2,13,11,67,17,23,7,71,3,73,37,5,19,11,13,79,5,3,41,83,7,17,43]
Link to this function

create_sequence_a008683(opts)

View Source

OEIS Sequence A008683 - Möbius (or Moebius) function mu(n)

From OEIS A008683:

Möbius (or Moebius) function mu(n). mu(1) = 1; mu(n) = (-1)^k if n is the product of k different primes; otherwise mu(n) = 0.

Sequence IDs: :a008683

Finite: False

Offset: 1

Example

iex> Sequence.create(Elixir.Chunky.Sequence.OEIS.Core, :a008683) |> Sequence.take!(78)
[1,-1,-1,0,-1,1,-1,0,0,1,-1,0,-1,1,1,0,-1,0,-1,0,1,1,-1,0,0,1,0,0,-1,-1,-1,0,1,1,1,0,-1,1,1,0,-1,-1,-1,0,0,1,-1,0,0,0,1,0,-1,0,1,0,1,1,-1,0,-1,1,0,0,1,-1,-1,0,1,-1,-1,0,-1,1,0,0,1,-1]
Link to this function

create_sequence_a020639(opts)

View Source

OEIS Sequence A020639 - Lpf(n): least prime dividing

From OEIS A020639:

Lpf(n): least prime dividing n (when n > 1); a(1) = 1.

Sequence IDs: :a020639

Finite: False

Offset: 1

Example

iex> Sequence.create(Elixir.Chunky.Sequence.OEIS.Core, :a020639) |> Sequence.take!(97)
[1,2,3,2,5,2,7,2,3,2,11,2,13,2,3,2,17,2,19,2,3,2,23,2,5,2,3,2,29,2,31,2,3,2,5,2,37,2,3,2,41,2,43,2,3,2,47,2,7,2,3,2,53,2,5,2,3,2,59,2,61,2,3,2,5,2,67,2,3,2,71,2,73,2,3,2,7,2,79,2,3,2,83,2,5,2,3,2,89,2,7,2,3,2,5,2,97]