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

A107947 Partial sums of A107946.

Original entry on oeis.org

1, 2, 3, 5, 6, 8, 11, 16, 17, 19, 22, 27, 33, 41, 52, 68, 69, 71, 74, 79, 85, 93, 104, 120, 137, 156, 178, 205, 238, 279, 331, 399, 400, 402, 405, 410, 416, 424, 435, 451, 468, 487, 509, 536, 569, 610, 662, 730, 799, 870, 944, 1023, 1108, 1201, 1305, 1425, 1562
Offset: 1

Views

Author

Paul D. Hanna, May 28 2005

Keywords

Comments

Terms at positions 2^k is found in A107948.

Crossrefs

Programs

  • Mathematica
    Accumulate@Nest[Join[#, Accumulate@#] &, {1}, 7] (* Ivan Neretin, Jan 31 2018 *)
  • PARI
    {a(n)=local(A=[1,1],B=[1]);for(i=1,#binary(n), B=concat(B,vector(#B,k,polcoeff(Ser(A)/(1-x),#B+k-1)));A=concat(A,B););B[n]}

A107948 Terms at positions 2^n of A107946 for n>=0.

Original entry on oeis.org

1, 1, 2, 5, 16, 68, 399, 3348, 41417, 775234, 22445788, 1024347395, 74876701760, 8888457145166, 1734062627778860
Offset: 0

Views

Author

Paul D. Hanna, May 28 2005

Keywords

Crossrefs

Programs

  • PARI
    {a(n)=local(A=[1,1],B=[1]);for(i=1,n-1, B=concat(B,vector(#B,k,polcoeff(Ser(A)/(1-x),#B+k-1))); A=concat(A,B););A[2^(n-1)]}

Formula

a(n) = A107946(2^n).

A306211 Concatenation of the current sequence with the lengths of the runs in the sequence, with a(1) = 1.

Original entry on oeis.org

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

Views

Author

A. D. Skovgaard, Jan 29 2019

Keywords

Comments

Conjecture: All terms are less than or equal to 5. - Peter Kagey, Jan 29 2019
Conjecture: Every number appears! (Based on the analogy with the somewhat similar sequence A090822, where the first 5 appeared at around 10^(10^23) steps). - N. J. A. Sloane, Jan 29 2019
An alternative definition: Start with 1, extend the sequence by appending its RUNS transform, recompute the RUNS transform, append it, repeat. - N. J. A. Sloane, Jan 29 2019
The first time we see 1, 2, 3, 4, 5 is at n=1, 3, 37, 60, 255 (A323829). After 65 generations (10228800161220 terms) the largest term is 5. The relative frequencies of 1..5 are roughly 0.71, 6.7e-9, 0.23, 1.6e-8, 0.061. 2s and 4s appear to get rarer as n increases. - Benjamin Chaffin, Feb 07 2019
If we record the successive RUNS transforms and concatenate them, we get 1; 2; 2, 1; 2, 2, 1; 2, 2, 1, 2, 1; ..., which is this sequence without the initial 1. - A. D. Skovgaard, Jan 30 2019 (Rephrased by N. J. A. Sloane, Jan 30 2019)

Examples

			a(2) = 1, since there is a run of length 1 at a(1).
a(3) = 2, since there is a run of length 2 at a(1..2).
a(4..5) = 2, 1, since the runs are as follows:
  1, 1, 2  a(1..3)
  \__/  |
  2,    1  a(4..5)
a(37) = 3, since a(20..22) = 1, 1, 1.
Steps in construction:
  [1]  initial sequence
  [1]  its run length
 .
  [1, 1] concatenation of above is new sequence
  [2]  its run length
 .
  [1, 1, 2] concatenation of above is new sequence
  [2, 1]  its run lengths
 .
  [1, 1, 2, 2, 1]
  [2, 2, 1]
 .
  [1, 1, 2, 2, 1, 2, 2, 1]
  [2, 2, 1, 2, 1]
 .
  [1, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1]
  [2, 2, 1, 2, 1, 2, 1, 1, 1]
 .
  [1, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1, 1]
  [2, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 3]
 .
  [1, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 1, 1, 2, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 3]
From _N. J. A. Sloane_, Jan 31 2019: (Start)
The first 9 generations, in compressed notation (see A323477) are:
  1
  11
  112
  11221
  11221221
  1122122122121
  1122122122121221212111
  1122122122121221212111221212111211113
  1122122122121221212111221212111211113221212111211113211113141
  ... (End)
		

Crossrefs

Positions of 3's, 4's, 5's: A323476, A306222, A306223.
Successive generations: A323477, A323478, A306215, A323475, A306333.
See also A323479, A323480, A323481, A323826 (RUNS transform), A323827, A323829 (where n first appears).

Programs

  • Haskell
    group [] = []
    group (x:xs)= (x:ys):group zs where (ys,zs) = span (==x) xs
    a306211_next_gen xs = xs ++ (map length $ group xs)
    a306211_gen 1 = [1]
    a306211_gen n = a306211_next_gen $ a306211_gen (n-1)
    a306211 n = a306211_gen n !! (n-1)
    -- Jean-François Antoniotti, Jan 31 2021
  • Mathematica
    seq[n_] := seq[n] = If[n==1, {1}, Join[seq[n-1], Length /@ Split[seq[n-1]]]];
    seq[10] (* Jean-François Alcover, Jul 19 2022 *)

A327616 Irregular table read by rows; the first row contains a single 1; for any n > 1, row n+1 corresponds to the ordinal transform of the terms in rows 1..n.

Original entry on oeis.org

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

Views

Author

Rémy Sigrist, Jul 06 2020

Keywords

Comments

The ordinal transform of a sequence b(n) is the sequence t(n) = number of values in b(1), ..., b(n) which are equal to b(n).

Examples

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

Crossrefs

Cf. A000045, A011782 (row lengths), A048297, A060138, A107946.

Programs

  • PARI
    { for (n=1, #a=vector(85), print1 (a[n]=if (n==1, a[n]=1, a[n]=o[a[k++]]++)", "); if (hammingweight(n)==1, k=0; o=vector(vecmax(a[1..n])))) }

Formula

Apparently:
- the greatest term in row n is A000045(n),
- a(n) = 1 iff n = 1 or n belongs to A060138,
- a(A048297(n+1)) = n (and this corresponds to the first occurrence of n),
- a(4^k) = A000045(2*k+1) for any k >= 0,
- a(2*4^k-1) = A000045(2*k+2) for any k >= 0.

A107957 Partial sums of A107947.

Original entry on oeis.org

1, 3, 6, 11, 17, 25, 36, 52, 69, 88, 110, 137, 170, 211, 263, 331, 400, 471, 545, 624, 709, 802, 906, 1026, 1163, 1319, 1497, 1702, 1940, 2219, 2550, 2949, 3349, 3751, 4156, 4566, 4982, 5406, 5841, 6292, 6760, 7247, 7756, 8292, 8861, 9471, 10133, 10863
Offset: 0

Views

Author

Paul D. Hanna, May 29 2005

Keywords

Comments

Terms at positions 2^k is found in A107958.

Examples

			a(3) = 6 = 22 - 16 = A107947(2^3 + 3) - A107947(2^3).
a(5) = 17 = 85 - 68 = A107947(2^4 + 5) - A107947(2^4).
a(8) = 52 = 120 - 68 = A107947(2^4 + 8) - A107947(2^4).
		

Crossrefs

Programs

  • PARI
    {a(n)=local(A=[1,2]);for(i=1,#binary(n), B=vector(#A,k,polcoeff(Ser(A)/(1-x),k-1)+A[2^#binary(#A-1)]); A=concat(A,B););sum(k=1,n,A[k])}

Formula

a(n) = A107947(2^m + n) - A107947(2^m) when n <= 2^(m-1).

A107958 a(n) = term at position 2^n in A107957.

Original entry on oeis.org

1, 3, 11, 52, 331, 2949, 38069, 733817, 21670554, 1001901607, 73852354365, 8813580443406, 1725174170633694
Offset: 0

Views

Author

Paul D. Hanna, May 29 2005

Keywords

Comments

Also terms at positions 2^(n+1) - 1 of A107947, where A107947 equals the first differences of A107957.

Crossrefs

Programs

  • PARI
    {a(n)=local(A=[1,2]);for(i=1,n, B=vector(#A,k,polcoeff(Ser(A)/(1-x),k-1)+A[2^#binary(#A-1)]); A=concat(A,B););sum(k=1,2^n,A[k])}

Formula

a(n) = A107957(2^n). a(n) = A107947(2^(n+1) - 1).

A306216 Successive concatenation of the current sequence with the first differences of the sequence, a(1) = a(2) = 1.

Original entry on oeis.org

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

Views

Author

Peter Kagey, Jan 29 2019

Keywords

Comments

n | generation | first differences
--+------------------------+-------------------
1 | [1,1] | [0]
2 | [1,1,0] | [0,-1]
3 | [1,1,0,0,-1] | [0,-1,0,-1]
4 | [1,1,0,0,-1,0,-1,0,-1] | [0,-1,0,-1,1,-1,1,-1]

Crossrefs

Programs

  • Haskell
    a306216_list = 1 : 1 : concat (Data.List.unfoldr nextGeneration [1,1]) where
      nextGeneration l = Just (diff l, l ++ diff l)
      diff xs =  zipWith subtract xs (tail xs)
  • Mathematica
    Nest[Join[#, Differences@ #] &, {1, 1}, 7] (* Michael De Vlieger, Jan 29 2019 *)
  • Ruby
    generations = 10
    (1...generations).reduce([1,1]) do |s, _|
      s += s.each_cons(2).map { |a, b| b - a }
    end
    
Showing 1-7 of 7 results.