cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

A112798 Table where n-th row is factorization of n, with each prime p_i replaced by i.

Original entry on oeis.org

1, 2, 1, 1, 3, 1, 2, 4, 1, 1, 1, 2, 2, 1, 3, 5, 1, 1, 2, 6, 1, 4, 2, 3, 1, 1, 1, 1, 7, 1, 2, 2, 8, 1, 1, 3, 2, 4, 1, 5, 9, 1, 1, 1, 2, 3, 3, 1, 6, 2, 2, 2, 1, 1, 4, 10, 1, 2, 3, 11, 1, 1, 1, 1, 1, 2, 5, 1, 7, 3, 4, 1, 1, 2, 2, 12, 1, 8, 2, 6, 1, 1, 1, 3, 13, 1, 2, 4, 14, 1, 1, 5, 2, 2, 3, 1, 9, 15, 1, 1, 1, 1
Offset: 2

Views

Author

Keywords

Comments

This is an enumeration of all partitions.
Technically this is an enumeration of all multisets (finite weakly increasing sequences of positive integers) rather than integer partitions. - Gus Wiseman, Dec 12 2016
A000040(a(n)) is a prime factor of A082288(n). - Reinhard Zumkeller, Feb 03 2008
Row n is the partition with Heinz number n. We define the Heinz number of a partition p = [p_1, p_2, ..., p_r] as Product(p_j-th prime, j=1..r) (concept used by Alois P. Heinz in A215366 as an "encoding" of a partition). For example, for the partition [1, 1, 2, 4, 10] we get 2*2*3*7*29 = 2436. For a given n, the 2nd Maple program yields row n; for example, we obtain at once B(2436) = [1,1,2,4,10]. - Emeric Deutsch, Jun 04 2015
From Emeric Deutsch, May 05 2015: (Start)
Number of entries in row n is bigomega(n) (i.e., the number of prime factors of n, multiplicities included).
Product of entries in row n = A003963(n).
Row n contains the Matula numbers of the rooted trees obtained from the rooted tree with Matula number n by deleting the edges emanating from the root. Example: row 8 is 1,1,1; indeed the rooted tree with Matula number 8 is \|/ and deleting the edges emanating from the root we obtain three one-vertex trees, having Matula numbers 1, 1, 1. Example: row 7 is 4; indeed, the rooted tree with Matula number 7 is Y and deleting the edges emanating from the root we obtain the rooted tree V, having Matula number 4.
The Matula (or Matula-Goebel) number of a rooted tree can be defined in the following recursive manner: to the one-vertex tree there corresponds the number 1; to a tree T with root degree 1 there corresponds the t-th prime number, where t is the Matula-Goebel number of the tree obtained from T by deleting the edge emanating from the root; to a tree T with root degree m >= 2 there corresponds the product of the Matula-Goebel numbers of the m branches of T. (End)

Examples

			Row 20 is 1,1,3 because the prime factors of 20, namely 2,2,5 are the 1st, 1st, 3rd primes.
Table begins:
  1;
  2;
  1, 1;
  3;
  1, 2;
  4;
  1, 1, 1;
  ...
The sequence of all finite multisets of positive integers begins: (), (1), (2), (11), (3), (12), (4), (111), (22), (13), (5), (112), (6), (14), (23), (1111), (7), (122), (8), (113), (24), (15), (9), (1112), (33), (16), (222), (114). - _Gus Wiseman_, Dec 12 2016
		

Crossrefs

Row lengths are A001222. Cf. A000040, A027746, A000720, A036036.
Cf. A056239 (row sums).
Cf. A003963 (row products).

Programs

  • Haskell
    a112798 n k = a112798_tabf !! (n-2) !! (n-1)
    a112798_row n = a112798_tabf !! (n-2)
    a112798_tabf = map (map a049084) $ tail a027746_tabf
    -- Reinhard Zumkeller, Aug 04 2014
    
  • Maple
    T:= n-> sort([seq(numtheory[pi](i[1])$i[2], i=ifactors(n)[2])])[]:
    seq(T(n), n=2..50);  # Alois P. Heinz, Aug 09 2012
    with(numtheory): B := proc (n) local nn, j, m: nn := op(2, ifactors(n)); for j to nops(nn) do m[j] := op(j, nn) end do: [seq(seq(pi(op(1, m[i])), q = 1 .. op(2, m[i])), i = 1 .. nops(nn))] end proc: # Emeric Deutsch, Jun 04 2015. (This is equivalent to the first Maple program.)
  • Mathematica
    PrimePi /@ Flatten[Table[#1, {#2}] & @@@ FactorInteger@ #] & /@ Range@ 60 // Flatten // Rest (* Michael De Vlieger, May 09 2015 *)
  • PARI
    row(n)=my(v=List(),f=factor(n)); for(i=1,#f~,for(j=1,f[i,2], listput(v,primepi(f[i,1])))); Vec(v) \\ Charles R Greathouse IV, Nov 09 2021

Formula

T(n,k) = A000720(A027746(n,k)); A027746(n,k) = A000040(T(n,k)).
Also T(n,k) = A049084(A027746(n,k)). - Reinhard Zumkeller, Aug 04 2014

A252464 a(1) = 0, a(2n) = 1 + a(n), a(2n+1) = 1 + a(A064989(2n+1)); also binary width of terms of A156552 and A243071.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 4, 3, 3, 4, 5, 4, 6, 5, 4, 4, 7, 4, 8, 5, 5, 6, 9, 5, 4, 7, 4, 6, 10, 5, 11, 5, 6, 8, 5, 5, 12, 9, 7, 6, 13, 6, 14, 7, 5, 10, 15, 6, 5, 5, 8, 8, 16, 5, 6, 7, 9, 11, 17, 6, 18, 12, 6, 6, 7, 7, 19, 9, 10, 6, 20, 6, 21, 13, 5, 10, 6, 8, 22, 7, 5, 14, 23, 7, 8, 15, 11, 8, 24, 6, 7, 11, 12, 16, 9, 7, 25, 6, 7, 6, 26, 9, 27
Offset: 1

Views

Author

Antti Karttunen, Dec 20 2014

Keywords

Comments

a(n) tells how many iterations of A252463 are needed before 1 is reached, i.e., the distance of n from 1 in binary trees like A005940 and A163511.
Similarly for A253553 in trees A253563 and A253565. - Antti Karttunen, Apr 14 2019

Examples

			From _Gus Wiseman_, Apr 02 2019: (Start)
The Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), so a(n) is the size of the inner lining of the integer partition with Heinz number n, which is also the size of the largest hook of the same partition. For example, the partition with Heinz number 715 is (6,5,3), with diagram
  o o o o o o
  o o o o o
  o o o
which has inner lining
          o o
      o o o
  o o o
and largest hook
  o o o o o o
  o
  o
both of which have size 8, so a(715) = 8.
(End)
		

Crossrefs

Programs

  • Mathematica
    Table[If[n==1,1,PrimeOmega[n]+PrimePi[FactorInteger[n][[-1,1]]]]-1,{n,100}] (* Gus Wiseman, Apr 02 2019 *)
  • PARI
    A061395(n) = if(n>1, primepi(vecmax(factor(n)[, 1])), 0);
    A252464(n) = (bigomega(n) + A061395(n) - 1); \\ Antti Karttunen, Apr 14 2019
    
  • Python
    from sympy import primepi, primeomega, primefactors
    def A252464(n): return primeomega(n)+primepi(max(primefactors(n)))-1 if n>1 else 0 # Chai Wah Wu, Jul 17 2023

Formula

a(1) = 0; for n > 1: a(n) = 1 + a(A252463(n)).
a(n) = A029837(1+A243071(n)). [a(n) = binary width of terms of A243071.]
a(n) = A029837(A005941(n)) = A029837(1+A156552(n)). [Also binary width of terms of A156552.]
Other identities. For all n >= 1:
a(A000040(n)) = n.
a(A001248(n)) = n+1.
a(A030078(n)) = n+2.
And in general, a(prime(n)^k) = n+k-1.
a(A000079(n)) = n. [I.e., a(2^n) = n.]
For all n >= 2:
a(n) = A001222(n) + A061395(n) - 1 = A001222(n) + A252735(n) = A061395(n) + A252736(n) = 1 + A252735(n) + A252736(n).
a(n) = A325134(n) - 1. - Gus Wiseman, Apr 02 2019
From Antti Karttunen, Apr 14 2019: (Start)
a(1) = 0; for n > 1: a(n) = 1 + a(A253553(n)).
a(n) = A001221(n) + A297167(n) = A297113(n) + A297155(n).
(End).

A246688 Triangle in which n-th row lists lexicographically ordered increasing lists of parts of all partitions of n into distinct parts.

Original entry on oeis.org

1, 2, 1, 2, 3, 1, 3, 4, 1, 4, 2, 3, 5, 1, 2, 3, 1, 5, 2, 4, 6, 1, 2, 4, 1, 6, 2, 5, 3, 4, 7, 1, 2, 5, 1, 3, 4, 1, 7, 2, 6, 3, 5, 8, 1, 2, 6, 1, 3, 5, 1, 8, 2, 3, 4, 2, 7, 3, 6, 4, 5, 9, 1, 2, 3, 4, 1, 2, 7, 1, 3, 6, 1, 4, 5, 1, 9, 2, 3, 5, 2, 8, 3, 7, 4, 6, 10
Offset: 1

Views

Author

Alois P. Heinz, Sep 01 2014

Keywords

Examples

			Triangle begins:
  [1];
  [2];
  [1,2], [3];
  [1,3], [4];
  [1,4], [2,3], [5];
  [1,2,3], [1,5], [2,4], [6];
  [1,2,4], [1,6], [2,5], [3,4], [7];
  [1,2,5], [1,3,4], [1,7], [2,6], [3,5], [8];
  [1,2,6], [1,3,5], [1,8], [2,3,4], [2,7], [3,6], [4,5], [9];
  [1,2,3,4], [1,2,7], [1,3,6], [1,4,5], [1,9], [2,3,5], [2,8], [3,7], [4,6], [10];
		

Crossrefs

Row lengths are A015723.
Row sums give A066189.
Last elements of rows are A000027.

Programs

  • Maple
    b:= proc(n, i) b(n, i):= `if`(n=0, [[]], `if`(i>n, [],
          [map(x->[i, x[]], b(n-i, i+1))[], b(n, i+1)[]]))
        end:
    T:= n-> map(x-> x[], b(n, 1))[]:
    seq(T(n), n=1..12);
  • Mathematica
    T[n_] := Module[{ip, lg}, ip = Reverse /@ Select[ IntegerPartitions[n], # == DeleteDuplicates[#]&]; lg = Length /@ ip // Max; SortBy[PadRight[#, lg]&][ip]];
    Table[T[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Oct 21 2022 *)

A265145 Number of lambda-parking functions of the unique strict partition lambda with parts i_1

Original entry on oeis.org

1, 1, 2, 3, 3, 5, 4, 16, 8, 7, 5, 25, 6, 9, 12, 125, 7, 34, 8, 34, 16, 11, 9, 189, 15, 13, 50, 43, 10, 49, 11, 1296, 20, 15, 21, 243, 12, 17, 24, 253, 13, 64, 14, 52, 74, 19, 15, 1921, 24, 58, 28, 61, 16, 307, 27, 317, 32, 21, 17, 343, 18, 23, 98, 16807, 33
Offset: 1

Views

Author

Alois P. Heinz, Dec 02 2015

Keywords

Comments

A strict partition is a partition into distinct parts.

Examples

			n = 10 = 2*5 = prime(1)*prime(3) encodes strict partition [1,4] having seven lambda-parking functions: [1,1], [1,2], [2,1], [1,3], [3,1], [1,4], [4,1], thus a(10) = 7.
		

Crossrefs

Programs

  • Maple
    p:= l-> (n-> n!*LinearAlgebra[Determinant](Matrix(n, (i, j)
             -> (t->`if`(t<0, 0, l[i]^t/t!))(j-i+1))))(nops(l)):
    a:= n-> p((l-> [seq(l[j]+j-1, j=1..nops(l))])(sort([seq(
             numtheory[pi](i[1])$i[2], i=ifactors(n)[2])]))):
    seq(a(n), n=1..100);
  • Mathematica
    p[l_] := Function [n, n! Det[Table[Function[t, If[t<0, 0,
         l[[i]]^t/t!]][j-i+1], {i, n}, {j, n}]]][Length[l]];
    a[n_] := If[n==1, 1, p[Function[l, Flatten[Table[l[[j]]+j-1,
         {j, 1, Length[l]}]]][Sort[Flatten[Table[Table[PrimePi[
         i[[1]]], {i[[2]]}], {i, FactorInteger[n]}]]]]]];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Aug 21 2021, after Alois P. Heinz *)

A266475 Sum of the parts i_1 + i_2 + ... + i_{A001222(n)} of the unique strict partition with encoding n = Product_{j=1..A001222(n)} prime(i_j-j+1).

Original entry on oeis.org

0, 1, 2, 3, 3, 4, 4, 6, 5, 5, 5, 7, 6, 6, 6, 10, 7, 8, 8, 8, 7, 7, 9, 11, 7, 8, 9, 9, 10, 9, 11, 15, 8, 9, 8, 12, 12, 10, 9, 12, 13, 10, 14, 10, 10, 11, 15, 16, 9, 10, 10, 11, 16, 13, 9, 13, 11, 12, 17, 13, 18, 13, 11, 21, 10, 11, 19, 12, 12, 11, 20, 17, 21
Offset: 1

Views

Author

Alois P. Heinz, Dec 29 2015

Keywords

Comments

A strict partition is a partition into distinct parts.

Examples

			n = 12 = 2*2*3 = prime(1)*prime(1)*prime(2) encodes strict partition [1,2,4].  So a(12) = 1+2+4 = 7.  Value a(n) = 7 occurs A000009(7) = 5 times, for n in {12, 17, 21, 22, 25}.
		

Crossrefs

Row sums of A265146.
Ordinal transform gives A266476.

Programs

  • Maple
    a:= n-> ((l-> add(l[j]+j-1, j=1..nops(l)))(sort([seq(
            numtheory[pi](i[1])$i[2], i=ifactors(n)[2])]))):
    seq(a(n), n=1..100);
  • Mathematica
    a[n_] := Function[l, Sum[l[[j]]+j-1, {j, 1, Length[l]}]][Sort[ Flatten[ Table[ Array[ PrimePi[i[[1]]]&, i[[2]]], {i, FactorInteger[n]}]]]];
    Array[a,100] (* Jean-François Alcover, Mar 23 2017, translated from Maple *)

Formula

a(n) = Sum_{k=1..A001222(n)} A265146(n,k).
[x^n] Sum_{i>=1} x^a(i) = A000009(n) for n>=0.
Showing 1-5 of 5 results.