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-8 of 8 results.

A182850 a(n) = number of iterations that n requires to reach a fixed point under the x -> A181819(x) map.

Original entry on oeis.org

0, 0, 1, 2, 1, 3, 1, 2, 2, 3, 1, 4, 1, 3, 3, 2, 1, 4, 1, 4, 3, 3, 1, 4, 2, 3, 2, 4, 1, 3, 1, 2, 3, 3, 3, 3, 1, 3, 3, 4, 1, 3, 1, 4, 4, 3, 1, 4, 2, 4, 3, 4, 1, 4, 3, 4, 3, 3, 1, 5, 1, 3, 4, 2, 3, 3, 1, 4, 3, 3, 1, 4, 1, 3, 4, 4, 3, 3, 1, 4, 2, 3, 1, 5, 3, 3, 3, 4, 1, 5, 3, 4, 3, 3, 3, 4, 1, 4, 4, 3, 1, 3, 1, 4, 3
Offset: 1

Views

Author

Matthew Vandermast, Jan 04 2011

Keywords

Comments

The fixed points of the x -> A181819(x) map are 1 and 2. Note that the x -> A000005(x) map has the same fixed points, and that A000005(n) = A181819(n) iff n is cubefree (cf. A004709). Under the x -> A181819(x) map, it seems significantly easier to generalize about which kinds of integers take a given number of iterations to reach a fixed point than under the x -> A000005(x) map.
Also the number of steps in the reduction of the multiset of prime factors of n wherein one repeatedly takes the multiset of multiplicities. For example, the a(90) = 5 steps are {2,3,3,5} -> {1,1,2} -> {1,2} -> {1,1} -> {2} -> {1}. - Gus Wiseman, May 13 2018

Examples

			A181819(6) = 4; A181819(4) = 3; A181819(3) = 2; A181819(2) = 2. Therefore, a(6) = 3, a(4) = 2, a(3)= 1, and a(2) = 0.
		

Crossrefs

A182857 gives values of n where a(n) increases to a record.

Programs

  • Haskell
    a182850 n = length $ takeWhile (`notElem` [1,2]) $ iterate a181819 n
    -- Reinhard Zumkeller, Mar 26 2012
    
  • Mathematica
    Table[If[n<=2,0,Length[FixedPointList[Sort[Length/@Split[#]]&,Sort[Last/@FactorInteger[n]]]]-1],{n,100}] (* Gus Wiseman, May 13 2018 *)
  • Scheme
    ;; With memoization-macro definec.
    (definec (A182850 n) (if (<= n 2) 0 (+ 1 (A182850 (A181819 n))))) ;; Antti Karttunen, Feb 05 2016

Formula

For n > 2, a(n) = a(A181819(n)) + 1.
a(n) = 0 iff n equals 1 or 2.
a(n) = 1 iff n is an odd prime (A000040(n) for n>1).
a(n) = 2 iff n is a composite perfect prime power (A025475(n) for n>1).
a(n) = 3 iff n is a squarefree composite integer or a power of a squarefree composite integer (cf. A182853).
a(n) = 4 iff n's prime signature a) contains at least two distinct numbers, and b) contains no number that occurs less often than any other number (cf. A182854).

A182857 Smallest number that requires exactly n iterations to reach a fixed point under the x -> A181819(x) map.

Original entry on oeis.org

1, 3, 4, 6, 12, 60, 2520, 1286485200, 35933692027611398678865941374040400000
Offset: 0

Views

Author

Matthew Vandermast, Jan 05 2011

Keywords

Comments

a(9) has 296 digits.
Related to Levine's sequence (A011784): A011784(n) = A001222(a(n)) = A001221(a(n+1)) = A051903(a(n+2)) = A071625(a(n+2)). Also see A182858.
Values of n where A182850(n) increases to a record.
The multiplicity of prime(k) in a(n+1) is the k-th largest prime index of a(n), which is A296150(a(n),k). - Gus Wiseman, May 13 2018

Examples

			From _Gus Wiseman_, May 13 2018: (Start)
Like A001462 the following sequence of multisets whose Heinz numbers belong to this sequence is a run-length describing sequence, as the number of k's in row n + 1 is equal to the k-th term of row n.
{2}
{1,1}
{1,2}
{1,1,2}
{1,1,2,3}
{1,1,1,2,2,3,4}
{1,1,1,1,2,2,2,3,3,4,4,5,6,7}
{1,1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,7,7,7,8,8,9,9,10,10,11,12,13,14}
(End)
		

Crossrefs

Programs

  • Mathematica
    Prepend[Function[m,Times@@Prime/@m]/@NestList[Join@@Table[Table[i,{Reverse[#][[i]]}],{i,Length[#]}]&,{2},8],1] (* Gus Wiseman, May 13 2018 *)

Formula

For n > 0, a(n) = A181819(a(n+1)). For n > 1, a(n) = A181821(a(n-1)).

A304660 A run-length describing inverse to A181819. The multiplicity of prime(k) in a(n) is the k-th smallest prime index of n, which is A112798(n,k).

Original entry on oeis.org

1, 2, 4, 6, 8, 18, 16, 30, 36, 54, 32, 150, 64, 162, 108, 210, 128, 450, 256, 750, 324, 486, 512, 1470, 216, 1458, 900, 3750, 1024, 2250, 2048, 2310, 972, 4374, 648, 7350, 4096, 13122, 2916, 10290, 8192, 11250, 16384, 18750, 4500, 39366, 32768, 25410, 1296
Offset: 1

Views

Author

Gus Wiseman, May 16 2018

Keywords

Comments

A permutation of A133808. a(n) is the smallest member m of A133808 such that A181819(m) = n.

Examples

			Sequence of normalized prime multisets together with the normalized prime multisets of their images begins:
   1:        {} -> {}
   2:       {1} -> {1}
   3:       {2} -> {1,1}
   4:     {1,1} -> {1,2}
   5:       {3} -> {1,1,1}
   6:     {1,2} -> {1,2,2}
   7:       {4} -> {1,1,1,1}
   8:   {1,1,1} -> {1,2,3}
   9:     {2,2} -> {1,1,2,2}
  10:     {1,3} -> {1,2,2,2}
  11:       {5} -> {1,1,1,1,1}
  12:   {1,1,2} -> {1,2,3,3}
  13:       {6} -> {1,1,1,1,1,1}
  14:     {1,4} -> {1,2,2,2,2}
  15:     {2,3} -> {1,1,2,2,2}
  16: {1,1,1,1} -> {1,2,3,4}
  17:       {7} -> {1,1,1,1,1,1,1}
  18:   {1,2,2} -> {1,2,2,3,3}
		

Crossrefs

Programs

  • Mathematica
    Table[With[{y=If[n===1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]]},Times@@Power[Array[Prime,Length[y]],y]],{n,100}]

Formula

a(n) = Product_{i = 1..Omega(n)} prime(i)^A112798(n,i).

A329747 Runs-resistance of the sequence of prime indices of n.

Original entry on oeis.org

0, 0, 0, 1, 0, 2, 0, 1, 1, 2, 0, 3, 0, 2, 2, 1, 0, 3, 0, 3, 2, 2, 0, 3, 1, 2, 1, 3, 0, 2, 0, 1, 2, 2, 2, 2, 0, 2, 2, 3, 0, 2, 0, 3, 3, 2, 0, 3, 1, 3, 2, 3, 0, 3, 2, 3, 2, 2, 0, 4, 0, 2, 3, 1, 2, 2, 0, 3, 2, 2, 0, 3, 0, 2, 3, 3, 2, 2, 0, 3, 1, 2, 0, 4, 2, 2, 2, 3, 0, 3, 2, 3, 2, 2, 2, 3, 0, 3, 3, 2, 0, 2, 0, 3, 2, 2, 0, 3, 0, 2, 2, 3, 0, 2, 2, 3, 3, 2, 2, 4
Offset: 1

Views

Author

Gus Wiseman, Nov 21 2019

Keywords

Comments

First differs from A304455 at a(90) = 3, A304455(90) = 4.
For the operation of taking the sequence of run-lengths of a finite sequence, runs-resistance is defined as the number of applications required to reach a singleton.
A prime index of n is a number m such that prime(m) divides n. The sequence of prime indices of n is row n of A112798.

Examples

			We have (1,2,2,3) -> (1,2,1) -> (1,1,1) -> (3), so a(90) = 3.
		

Crossrefs

The version for partitions is A329746.
The version for compositions is A329744.
The version for binary words is A329767.
The version for binary expansion is A318928.
Cf. A008578 (positions of 0's), A056239, A112798, A329745, A329750.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    runsres[q_]:=Length[NestWhileList[Length/@Split[#]&,q,Length[#]>1&]]-1;
    Table[runsres[primeMS[n]],{n,50}]
  • PARI
    pis_to_runs(n) = { my(runs=List([]), f=factor(n)); for(i=1,#f~,while(f[i,2], listput(runs,primepi(f[i,1])); f[i,2]--)); (runs); };
    runlengths(lista) = if(!#lista, lista, if(1==#lista, List([1]), my(runs=List([]), rl=1); for(i=1, #lista, if((i< #lista) && (lista[i]==lista[i+1]), rl++, listput(runs,rl); rl=1)); (runs)));
    A329747(n) = { my(runs=pis_to_runs(n)); for(i=0,oo,if(#runs<=1, return(i), runs = runlengths(runs))); }; \\ Antti Karttunen, Jan 20 2025

Extensions

More terms from Antti Karttunen, Jan 20 2025

A012257 Irregular triangle read by rows: row 0 is {2}; if row n is {r_1, ..., r_k} then row n+1 is {r_k 1's, r_{k-1} 2's, r_{k-2} 3's, etc.}.

Original entry on oeis.org

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

Views

Author

Lionel Levine (levine(AT)ultranet.com)

Keywords

Comments

I have sometimes referred to this as Lionel Levine's triangle in lectures. - N. J. A. Sloane, Mar 21 2021
The shape of each row tends to a limit curve when scaled to a fixed size. It is the same limit curve as this continuous version: start with f_0=x over [0,1]; then repeatedly reverse (1-x), integrate from zero (x-x^2/2), scale to 1 (2x-x^2) and invert (1-sqrt(1-x)). For the limit curve we have f'(0) = F(1) = lim A011784(n+2)/(A011784(n+1)*A011784(n)) ~ 0.27887706 (obtained numerically). - Martin Fuller, Aug 07 2006

Examples

			Initial rows are:
{2},
{1,1},
{1,2},
{1,1,2},
{1,1,2,3},
{1,1,1,2,2,3,4},
{1,1,1,1,2,2,2,3,3,4,4,5,6,7},
...
		

Crossrefs

Programs

  • Haskell
    a012257 n k = a012257_tabf !! (n-1) !! (k-1)
    a012257_row n = a012257_tabf !! (n-1)
    a012257_tabf = iterate (\row -> concat $
                            zipWith replicate (reverse row) [1..]) [1, 1]
    -- Reinhard Zumkeller, Aug 11 2014, May 30 2012
  • Maple
    T:= proc(n) option remember; `if`(n=0, 2, (h->
          seq(i$h[-i], i=1..nops(h)))([T(n-1)]))
        end:
    seq(T(n), n=0..8);  # Alois P. Heinz, Mar 31 2021
  • Mathematica
    row[1] = {1, 1}; row[n_] := row[n] = MapIndexed[ Function[ Table[#2 // First, {#1}]], row[n-1] // Reverse] // Flatten; Array[row, 7] // Flatten (* Jean-François Alcover, Feb 10 2015 *)
    NestList[Flatten@ MapIndexed[ConstantArray[First@ #2, #1] &, Reverse@ #] &, {1, 1}, 6] // Flatten (* Michael De Vlieger, Jul 12 2017 *)

Formula

Sum of row n = A011784(n+2); e.g. row 5 is {1, 1, 1, 2, 2, 3, 4} and the sum of the elements is 1+1+1+2+2+3+4 = 14 = A011784(7). - Benoit Cloitre, Aug 06 2003
T(n,A011784(n+1)) = A011784(n). - Reinhard Zumkeller, Aug 11 2014

Extensions

Initial row {2} added by N. J. A. Sloane, Mar 21 2021

A304679 A prime-multiplicity (or run-length) describing recurrence: a(n+1) = A181821(a(n)).

Original entry on oeis.org

3, 4, 6, 18, 450, 205439850, 241382525361273331926149714645357743772646450
Offset: 0

Views

Author

Gus Wiseman, May 16 2018

Keywords

Comments

The first entry 3 is optional so has offset 0.

Examples

			The list of multisets with Heinz numbers in the sequence is A014643. The number of k's in row n + 1 is equal to the k-th term of row n. The length of row n is A014644(n).
        3: {2}
        4: {1,1}
        6: {1,2}
       18: {1,2,2}
      450: {1,2,2,3,3}
205439850: {1,2,2,3,3,4,4,4,5,5,5}
		

Crossrefs

Programs

  • Mathematica
    Function[m,Times@@Prime/@m]/@NestList[Join@@Table[Table[i,{#[[i]]}],{i,Length[#]}]&,{2},6]

A014643 Triangular array starting with {1,1}; then i-th term in a row gives number of i's in next row.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The row {2} could be safely prepended to this triangle. - Gus Wiseman, May 13 2018

Examples

			Triangle begins:
{1,1},
{1,2},
{1,2,2},
{1,2,2,3,3},
...
		

Crossrefs

Programs

  • Maple
    T:= proc(n) option remember; `if`(n=0, 2, (l->
          seq(i$l[i], i=1..nops(l)))([T(n-1)]))
        end:
    seq(T(n), n=1..7);  # Alois P. Heinz, May 17 2018
  • Mathematica
    NestList[Join@@Table[Table[i,{#[[i]]}],{i,Length[#]}]&,{2},8] (* Gus Wiseman, May 13 2018 *)

Extensions

More terms from Patrick De Geest

A319157 Smallest Heinz number of a superperiodic integer partition requiring n steps in the reduction to a multiset of size 1 obtained by repeatedly taking the multiset of multiplicities.

Original entry on oeis.org

2, 3, 9, 441, 11865091329, 284788749974468882877009302517495014698593896453070311184452244729
Offset: 1

Views

Author

Gus Wiseman, Sep 12 2018

Keywords

Comments

The Heinz number of an integer partition (y_1, ..., y_k) is prime(y_1) * ... * prime(y_k).
An integer partition is superperiodic if either it consists of a single part equal to 1 or its parts have a common divisor > 1 and its multiset of multiplicities is itself superperiodic. For example, (8,8,6,6,4,4,4,4,2,2,2,2) has multiplicities (4,4,2,2) with multiplicities (2,2) with multiplicities (2) with multiplicities (1). The first four of these partitions are periodic and the last is (1), so (8,8,6,6,4,4,4,4,2,2,2,2) is superperiodic.

Crossrefs

Programs

  • Mathematica
    Function[m,Times@@Prime/@m]/@NestList[Join@@Table[Table[2i,{Reverse[#][[i]]}],{i,Length[#]}]&,{1},4]
Showing 1-8 of 8 results.