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-10 of 23 results. Next

A325258 a(1) = 1; otherwise, first differences of Levine's sequence A011784.

Original entry on oeis.org

1, 1, 1, 1, 3, 7, 28, 171, 2624, 172613, 139584150, 6837485347187, 266437138079023501057, 508009471379222384299345337895696, 37745517525533091954228691786161750063795478326636142, 5347426383812697233786139576220412396732847744407175515852823296919414647252347610750
Offset: 0

Views

Author

Gus Wiseman, Apr 16 2019

Keywords

Comments

a(n) is the number of nonnegative integers k such that the maximum adjusted frequency depth among integer partitions of k is n. For example, the a(5) = 7 numbers are 7, 8, 9, 10, 11, 12, and 13.
The adjusted frequency depth of an integer partition is 0 if the partition is empty, and otherwise it is 1 plus the number of times one must take the multiset of multiplicities to reach a singleton. For example, the partition (32211) has adjusted frequency depth 5 because we have: (32211) -> (221) -> (21) -> (11) -> (2). The enumeration of integer partitions by adjusted frequency depth is given by A325280. The adjusted frequency depth of the integer partition with Heinz number n is A323014(n). The maximum adjusted frequency depth for partitions of n is A325282(n).

Crossrefs

Programs

  • Mathematica
    grw[q_]:=Join@@Table[ConstantArray[i,q[[Length[q]-i+1]]],{i,Length[q]}];
    ReplacePart[Differences[Last/@NestList[grw,{1,1},9]],2->1]

A014621 Triangle of numbers arising from analysis of Levine's sequence A011784.

Original entry on oeis.org

1, 1, 3, 1, 15, 10, 3, 1, 105, 105, 55, 30, 10, 3, 1, 945, 1260, 910, 630, 350, 168, 76, 30, 10, 3, 1, 10395, 17325, 15750, 12880, 9135, 5789, 3381, 1806, 910, 434, 196, 76, 30, 10, 3, 1, 135135, 270270, 294525, 275275, 228375, 172200, 120960, 78519, 48006, 28336, 16065, 8609, 4461, 2166, 1018, 470, 196, 76, 30, 10, 3, 1
Offset: 1

Views

Author

Keywords

Examples

			Triangle begins:
    1;
    1;
    3,    1;
   15,   10,   3,   1;
  105,  105,  55,  30,  10,   3,  1;
  945, 1260, 910, 630, 350, 168, 76, 30, 10, 3, 1;
10395, 17325, 15750, 12880, 9135, 5789, 3381, 1806, 910, 434, 196, 76, 30,
  10, 3, 1;
135135, 270270, 294525, 275275, 228375, 172200, 120960, 78519, 48006, 28336, 16065, 8609, 4461, 2166, 1018, 470, 196, 76, 30, 10, 3, 1;
2027025, 4729725, 5990985, 6276270, 5853925, 4996530, 3999765, 2997225, 2115960, 1432725, 938644, 593646, 364551, 215940, 123639, 68886, 37276, 19485, 9959, 4911, 2301, 1063, 470, 196, 76, 30, 10, 3, 1;
		

Crossrefs

Cf. A011784, A014622 (row sums), A144006.

Programs

  • Python
    # See Miyamoto link.

Formula

From Roland Miyamoto, Nov 20 2022: (Start)
The n-th row contains 1 + (n-1)*(n-2)/2 numbers a(n,k), where n >= 1 and k = 0..(n-1)*(n-2)/2.
Let f be a solution to the iterative differential equation f(f(x))*f'(x) = -1 defined on some nonnegative interval and let tau=f(tau) be a fixed point of f. Then the n-th derivative of f at tau is
f^{(n)}(tau) = Sum_{k=0..(n-1)*(n-2)/2} (-1)^(n+k)*a(n,k)*tau^(2-3*n-k).
Thus, a(n,k) can be calculated recursively using the equations
0 = (f ° f * f')^{(n)} = Sum_{k=0..n} binomial(n,k) (f ° f)^{(n-k)}*f^{(k+1)} for n=1,2,... (End)

Extensions

More terms from Roland Miyamoto, Nov 20 2022
Offset corrected by Max Alekseyev, Sep 19 2023

A014623 Sequence arising from analysis of Levine's sequence A011784: essentially a duplicate of A144005.

Original entry on oeis.org

1, 1, 2, 7, 33, 201, 1479, 12842, 127952
Offset: 0

Views

Author

Keywords

Comments

Presumably this is the same as A144005.
Yes, I can confirm that. On Aug 28 1997 Colin Mallows wrote to me saying he obtained the present sequence (A014623) by inverting - or reverting - Levine's sequence A011784 using the tables in David-Kendall-Barton (1966). - N. J. A. Sloane, Jul 24 2022

References

  • F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966.

Crossrefs

A144005 is a better version - N. J. A. Sloane, Jul 24 2022
Cf. A011784.

A048979 Primes in A011784.

Original entry on oeis.org

2, 3, 7, 2837
Offset: 1

Views

Author

Keywords

Comments

Is this sequence finite?

A342585 Inventory sequence: record the number of zeros thus far in the sequence, then the number of ones thus far, then the number of twos thus far and so on, until a zero is recorded; the inventory then starts again, recording the number of zeros.

Original entry on oeis.org

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

Views

Author

Joseph Rozhenko, Mar 16 2021

Keywords

Comments

To get started we ask: how many zero terms are there? Since there are no terms in the sequence yet, we record a '0', and having recorded a '0', we begin again: How many zero terms are there? There is now one 0, so we record a '1' and continue. How many 1's are there? There's currently one '1' in the sequence, so we record a '1' and continue. How many 2's are there? There are no 2's yet, so we record a '0', and having recorded a 0, we begin again with the question "how many zero terms are there?" And so on.
a(46) = 0 because no 8's appear before it; but note a higher number, namely 9, has appeared. - Michael S. Branicky, Mar 16 2021
A similar situation occurs at n=124, where 14 has not yet appeared in the sequence, although 15 has appeared.
Reminiscent of Van Eck's sequence A181391. - N. J. A. Sloane, May 02 2021
From Jan Ritsema van Eck, May 02 2021: (Start)
The first 1000 terms seem to grow more or less in saw-tooth fashion with the largest terms (= the number of 0's), as well as the distance between the 0's, both approximately equal to the inverse triangular numbers A003056 (see attached graph #1).
But the picture changes when we go out to 10000 terms. Around the 1700th term, the 1's become more frequent than the 0's and the largest values are consistently somewhat larger than the inverse triangular numbers. Around the 2500th term the 2's become the most frequent number. Also after some 4000 terms, the largest values become much larger than the inverse triangular numbers. See graph #2. (End)
Comment on the colored plot of the first 1000467 terms, from Hans Havermann, May 02 2021: (Start)
If one is drawing a points-joined graph, it will obscure some of the inherent large-number dynamics. To get around that, this plot joins the points with a green line, superimposing the actual points in blue. This plot was created by Mathematica.
Your browser will likely compress the very large image to window size, so click on it to expand.
The points fall into linear features of the various counts of the various integers. The count for each integer changes as we move towards infinity and hence crosses over (changes place with) other counts unpredictably.
I decided to chart (see the blue text) the twenty largest counts at the rightmost spike which runs from the zero at 997010 to the zero at 1000467. These largest values are for the counts of integers 2 to 21 and appear at a(997013) for the 2-count; a(997014) for the 3-count, ..., and a(997032) for the 21-count.
The counts are 15275, 26832, 40162, 48539, 56364, 54372, 53393, 43588, 37288, 27396, 22425, 16735, 13099, 11460, 9466, 8386, 7191, 6478, 5777, and 5208, respectively. In my text they are sorted largest-to-smallest and written "count @ integer-being-counted": 56364 @ 6, 54372 @ 7, 53393 @ 8, 48539 @ 5, ... 5208 @ 21. (End)
A useful view may be gained by plotting the sequence against itself with an offset. Using the "Plot 2" link in the web page footer, enter "A342585" as sequences 1 and 2. Select "Plot Seq2(n+shift) vs Seq1(n)" and "Draw line segments". Start with "1" as the shift. The sequence appears somewhat like a fan, the first 4 or 5 sectors showing clearly, later sectors overlying each other. Larger shift values effectively compress early sectors into the vertical axis, making later sectors more visible. - Peter Munn, May 08 2021
For a version where a row ends not at the first zero, but rather at the last zero, see A347317. - N. J. A. Sloane, Sep 10 2021
For n around 2.5*10^9, the upper envelope of the sequence seems to be growing roughly like n/50, or maybe like O(n/log(n)). - N. J. A. Sloane, Feb 10 2023

Examples

			As an irregular triangle this begins:
   0;
   1,  1,  0;
   2,  2,  2,  0;
   3,  2,  4,  1,  1,  0;
   4,  4,  4,  1,  4,  0;
   5,  5,  4,  1,  6,  2,  1,  0;
   6,  7,  5,  1,  6,  3,  3,  1,  0;
   7,  9,  5,  3,  6,  4,  4,  2,  0;
   8,  9,  6,  4,  9,  4,  5,  2,  1,  3,  0;
   9, 10,  7,  5, 10,  6,  6,  3,  1,  4,  2,  0;
  10, 11,  8,  6, 11,  6,  9,  3,  2,  5,  3,  2,  0;
  ...
For row lengths see A347299. - _N. J. A. Sloane_, Aug 27 2021
From _David James Sycamore_, Oct 18 2021: (Start)
a(1) is 0 because the count is reset, and as yet there is no zero term immediately following another term. a(2) = 1 since the count is reset, a(1) = 0 and a(0) precedes it. The count now increments to terms equal to 1.
a(3) = 1 since a(2) = 1 and a(1) precedes it. a(4) = 0 because there is no term equal to 2 which is immediately preceded by another term.
a(5) = 2 since the count is reset, a(1) = a(4) = 0 and a(0), a(3) respectively, precede them. (End)
		

Crossrefs

Records: A347305 and A348782.
Other inventory-type sequences: A030717, A174382, A333867, A358066, A357443, A356784.
A012257 (cf. also A011784) reverses the inventory process.
See A347062, A347738, A355916, A355917, A355918, A357317 for variants.

Programs

  • AWK
    # See Links section. - Luc Rousseau, May 02 2021
    
  • MATLAB
    function [val,arr]=invSeq(N) % val = Nth term, arr = whole array up to N
    k=0;
    arr=zeros(1,N); % pre-allocate array
    for i=1:N
        an=sum((k==arr(2:i)));
        arr(i)=an;
        if an == 0
            k = 0;
        else
            k=k+1;
        end
    end
    val=arr(end);
    end % Ben Cha, Nov 11 2022
    
  • Maple
    a:= proc(n) option remember; local t;
          t:= `if`(a(n-1)=0, 0, b(n-1)+1);
          b(n):=t; add(`if`(a(j)=t, 1, 0), j=1..n-1)
        end: b(1), a(1):= 0$2:
    seq(a(n), n=1..120);  # Alois P. Heinz, Mar 16 2021
  • Mathematica
    a[n_] := a[n] = Module[{t}, t = If[a[n-1] == 0, 0, b[n-1]+1];
         b[n] = t; Sum[If[a[j] == t, 1, 0], {j, 1, n-1}]];
    b[1] = 0; a[1] = 0;
    Array[a, 120] (* Jean-François Alcover, May 03 2021, after Alois P. Heinz *)
  • PARI
    A342585_vec(N,c=[],i)=vector(N,j, while(#c<=i||#c<=c[i+1], c=concat(c,0)); c[i+=1]+if(c[1+c[i]]++&&!c[i]||j==1,i=0)) \\ M. F. Hasler, Nov 13 2021
    
  • PARI
    \\ See Links section.
    
  • Python
    def calc(required_value_number):
        values_lst = []
        current_count = 0
        new_value = 0
        for i in range(required_value_number):
            new_value = values_lst.count(current_count)
            values_lst.append(new_value)
            if new_value == 0:
                current_count = 0
            else:
                current_count += 1
        return new_value # Written by Gilad Moyal
    
  • Python
    from collections import Counter
    def aupton(terms):
      num, alst, inventory = 0, [0], Counter([0])
      for n in range(2, terms+1):
        c = inventory[num]
        num = 0 if c == 0 else num + 1; alst.append(c); inventory.update([c])
      return alst
    print(aupton(84)) # Michael S. Branicky, Jun 12 2021
    
  • R
    # Prints the first 10,068 terms
    library("dplyr")
    options(max.print=11000)
    inventory <- data.frame(1, 0)
    colnames(inventory) <- c("n", "an")
    value_to_count = 0
    n = 1
    for(x in 1:128) # Increase the 128 for more terms. The number of terms
                    # given is on the order of x^1.9 in the region around 128.
      {
      status <- TRUE
      while(status)
        {
        count <- length(which(inventory$an == value_to_count))
        n = n + 1
        inventory <- rbind(inventory, c(n, count))
        status <- isTRUE(count != 0)
        value_to_count = value_to_count + 1
        }
      value_to_count = 0
      }
    inventory # Damon Lay, Nov 10 2023

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)).

A325238 First positive integer with each omega-sequence.

Original entry on oeis.org

1, 2, 4, 6, 8, 12, 16, 24, 30, 32, 36, 48, 60, 64, 96, 120, 128, 192, 210, 216, 240, 256, 360, 384, 420, 480, 512, 720, 768, 840, 900, 960, 1024, 1260, 1296, 1440, 1536, 1680, 1920, 2048, 2310, 2520, 2880, 3072, 3360, 3840, 4096, 4620, 5040, 5760, 6144, 6720
Offset: 1

Views

Author

Gus Wiseman, Apr 14 2019

Keywords

Comments

We define the omega-sequence of n (row n of A323023) to have length A323014(n) = frequency depth of n, and the k-th part is Omega(red^{k-1}(n)), where Omega = A001222 and red^{k} is the k-th functional iteration of red = A181819, given by red(n = p^i*...*q^j) = prime(i)*...*prime(j), i.e., the product of primes indexed by the prime exponents of n.

Examples

			The sequence of terms together with their omega-sequences begins:
    1:
    2: 1
    4: 2 1
    6: 2 2 1
    8: 3 1
   12: 3 2 2 1
   16: 4 1
   24: 4 2 2 1
   30: 3 3 1
   32: 5 1
   36: 4 2 1
   48: 5 2 2 1
   60: 4 3 2 2 1
   64: 6 1
   96: 6 2 2 1
  120: 5 3 2 2 1
  128: 7 1
  192: 7 2 2 1
  210: 4 4 1
  216: 6 2 1
  240: 6 3 2 2 1
  256: 8 1
  360: 6 3 3 1
  384: 8 2 2 1
  420: 5 4 2 2 1
		

Crossrefs

Programs

  • Mathematica
    tomseq[n_]:=If[n<=1,{},Most[FixedPointList[Sort[Length/@Split[#]]&,Sort[Last/@FactorInteger[n]]]]];
    omseqs=Table[Total/@tomseq[n],{n,1000}];
    Sort[Table[Position[omseqs,x][[1,1]],{x,Union[omseqs]}]]

A225486 Maximal frequency depth for the partitions of n.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, May 08 2013

Keywords

Comments

See A225485 for the definition of frequency depth.
The frequency depth of an integer partition is the number of times one must take the multiset of multiplicities to reach (1). For example, the partition (32211) has frequency depth 5 because we have: (32211) -> (221) -> (21) -> (11) -> (2) -> (1). Differs from A325282 at a(0) and a(1). - Gus Wiseman, Apr 19 2019

Examples

			(See A225485.)
		

Crossrefs

Run lengths are A325258, i.e., first differences of Levine's sequence A011784.

Programs

  • Mathematica
    c[s_] := c[s] = Select[Table[Count[s, i], {i, 1, Max[s]}], # > 0 &]
    f[s_] := f[s] = Drop[FixedPointList[c, s], -2]
    t[s_] := t[s] = Length[f[s]]
    u[n_] := u[n] = Table[t[Part[IntegerPartitions[n], k]],
        {k, 1, Length[IntegerPartitions[n]]}];
    Prepend[Table[Max[u[n]], {n, 2, 10}], 0]
    (* second program *)
    grw[q_]:=Join@@Table[ConstantArray[i,q[[Length[q]-i+1]]],{i,Length[q]}];
    Join@@MapIndexed[ConstantArray[#2[[1]]-1,#1]&,Length[#]-Last[#]&/@NestList[grw,{1,1},6]] (* Gus Wiseman, Apr 19 2019 *)

Formula

a(n) = number of terms in row n of the array in A225485, for n > 0.

Extensions

More terms from Gus Wiseman, Apr 19 2019

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

A325278 Smallest number with adjusted frequency depth n.

Original entry on oeis.org

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

Views

Author

Gus Wiseman, Apr 17 2019

Keywords

Comments

The adjusted frequency depth of a positive integer n is 0 if n = 1, and otherwise it is 1 plus the number of times one must apply A181819 to reach a prime number, where A181819(k = p^i*...*q^j) = prime(i)*...*prime(j) = product of primes indexed by the prime exponents of k. For example, 180 has adjusted frequency depth 5 because we have: 180 -> 18 -> 6 -> 4 -> 3.
Differs from A182857 in having 2 instead of 3.

Crossrefs

A subsequence of A325238.
Omega-sequence statistics: A001222 (first omega), A001221 (second omega), A071625 (third omega), A323022 (fourth omega), A304465 (second-to-last omega), A182850 or A323014 (length/frequency depth), A325248 (Heinz number).

Programs

  • Mathematica
    nn=10000;
    fd[n_]:=Switch[n,1,0,?PrimeQ,1,,1+fd[Times@@Prime/@Last/@FactorInteger[n]]];
    fds=fd/@Range[nn];
    Sort[Table[Position[fds,x][[1,1]],{x,Union[fds]}]]
Showing 1-10 of 23 results. Next