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

A142150 The nonnegative integers interleaved with 0's.

Original entry on oeis.org

0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, 0, 22, 0, 23, 0, 24, 0, 25, 0, 26, 0, 27, 0, 28, 0, 29, 0, 30, 0, 31, 0, 32, 0, 33, 0, 34, 0, 35, 0, 36, 0, 37, 0, 38, 0, 39, 0, 40, 0, 41, 0, 42, 0, 43, 0
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 15 2008

Keywords

Comments

Number of vertical pairs in a wheel with n equal sections. - Wesley Ivan Hurt, Jan 22 2012
Number of even terms of n-th row in the triangles A162610 and A209297. - Reinhard Zumkeller, Jan 19 2013
Also the result of writing n-1 in base 2 and multiplying the last digit with the number with its last digit removed. See A115273 and A257844-A257850 for generalization to other bases. - M. F. Hasler, May 10 2015
Also follows the rule: a(n+1) is the number of terms that are identical with a(n) for a(0..n-1). - Marc Morgenegg, Jul 08 2019

Crossrefs

Programs

Formula

a(n) = XOR{k AND (n-k): 0<=k<=n}.
a(n) = (n/2)*0^(n mod 2); a(2*n)=n and a(2*n+1)=0.
a(n) = floor(n^2/2) mod n. - Enrique Pérez Herrero, Jul 29 2009
a(n) = A027656(n-2). - Reinhard Zumkeller, Nov 05 2009
a(n) = Sum_{k=0..n} (k mod 2)*((n-k) mod 2). - Reinhard Zumkeller, Nov 05 2009
a(n+1) = A000217(n) mod A000027(n+1) = A000217(n) mod A001477(n+1). - Edgar Almeida Ribeiro (edgar.a.ribeiro(AT)gmail.com), May 19 2010
From Bruno Berselli, Oct 19 2010: (Start)
a(n) = n*(1+(-1)^n)/4.
G.f.: x^2/(1-x^2)^2.
a(n) = 2*a(n-2)-a(n-4) for n > 3.
Sum_{i=0..n} a(i) = (2*n*(n+1)+(2*n+1)*(-1)^n-1)/16 (see A008805). (End)
a(n) = -a(-n) = A195034(n-1)-A195034(-n-1). - Bruno Berselli, Oct 12 2011
a(n) = A000326(n) - A191967(n). - Reinhard Zumkeller, Jul 07 2012
a(n) = Sum_{i=1..n} floor((2*i-n)/2). - Wesley Ivan Hurt, Aug 21 2014
a(n-1) = floor(n/2)*(n mod 2), where (n mod 2) is the parity of n, or remainder of division by 2. - M. F. Hasler, May 10 2015
a(n) = A158416(n) - 1. - Filip Zaludek, Oct 30 2016
E.g.f.: x*sinh(x)/2. - Ilya Gutkovskiy, Oct 30 2016
a(n) = A000007(a(n-1)) + a(n-2) for n > 1. - Nicolas Bělohoubek, Oct 06 2024

A111297 First differences of A109975.

Original entry on oeis.org

1, 2, 5, 11, 24, 52, 112, 240, 512, 1088, 2304, 4864, 10240, 21504, 45056, 94208, 196608, 409600, 851968, 1769472, 3670016, 7602176, 15728640, 32505856, 67108864, 138412032, 285212672, 587202560, 1207959552, 2483027968, 5100273664
Offset: 0

Views

Author

Paul Curtz, Jun 07 2007

Keywords

Examples

			    11 = 2 *    5 +   1;
    24 = 2 *   11 +   2;
    52 = 2 *   24 +   4;
   112 = 2 *   52 +   8;
   240 = 2 *  112 +  16;
   512 = 2 *  240 +  32;
  1088 = 2 *  512 +  64;
  2304 = 2 * 1088 + 128; ...
		

Crossrefs

Programs

  • Magma
    I:=[1, 2, 5, 11]; [n le 4 select I[n] else 4*Self(n-1)-4*Self(n-2): n in [1..40]]; // Vincenzo Librandi, Jun 27 2012
    
  • Maple
    1,2, seq((n+8)*2^(n-3), n = 2..30); # G. C. Greubel, Sep 27 2022
  • Mathematica
    CoefficientList[Series[(1-2x+x^2-x^3)/(1-2x)^2, {x,0,40}], x]  (* Vincenzo Librandi, Jun 27 2012 *)
    LinearRecurrence[{4,-4},{1,2,5,11},40] (* Harvey P. Dale, Sep 27 2024 *)
  • PARI
    a=[1,2,5,11]; for(i=1,99,a=concat(a,4*a[#a]-4*a[#a-1])); a \\ Charles R Greathouse IV, Jun 01 2011
    
  • SageMath
    [(n+8)*2^(n-3) - int(n==1)/4 for n in range(40)] # G. C. Greubel, Sep 27 2022

Formula

Equals binomial transform of [1, 1, 2, 1, 3, 1, 4, 1, 5, ...] - Gary W. Adamson, Apr 25 2008
From Paul Barry, Mar 18 2009: (Start)
G.f.: (1-2*x+x^2-x^3)/(1-2*x)^2.
a(n) = Sum_{k=0..n} C(n,k)*Sum_{j=0..floor(k/2)} C(j+1,k-j).
a(n) = Sum_{k=0..n} C(n,k)*A158416(k). (End)
a(n) = Sum_{k=0..n-2} (k+5)*binomial(n-2,k) for n >= 2. - Philippe Deléham, Apr 20 2009
a(n) = 2*a(n-1) + 2^(n-3) for n > 2, a(0) = 1, a(1) = 2, a(2) = 5. - Philippe Deléham, Mar 02 2012
G.f.: Q(0), where Q(k) = 1 + (k+1)*x/(1 - x - x*(1-x)/(x + (k+1)*(1-x)/Q(k+1))); (continued fraction). - Sergei N. Gladkovskii, Apr 24 2013
From Amiram Eldar, Jan 13 2021: (Start)
a(n) = (n+8) * 2^(n-3), for n >= 2.
Sum_{n>=0} 1/a(n) = 2048*log(2) - 893149/630.
Sum_{n>=0} (-1)^n/a(n) = 523549/630 - 2048*log(3/2). (End)
E.g.f.: (1/4)*((4+x)*exp(2*x) - x). - G. C. Greubel, Sep 27 2022

A375924 Number A(n,k) of partitions of [n] such that the element sum of each block is one more than a multiple of k; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 1, 5, 0, 1, 1, 0, 2, 15, 0, 1, 1, 0, 0, 4, 52, 0, 1, 1, 0, 1, 1, 10, 203, 0, 1, 1, 0, 1, 2, 3, 28, 877, 0, 1, 1, 0, 0, 0, 3, 9, 96, 4140, 0, 1, 1, 0, 0, 0, 0, 1, 17, 320, 21147, 0, 1, 1, 0, 0, 0, 1, 1, 8, 108, 1436, 115975, 0
Offset: 0

Views

Author

Alois P. Heinz, Sep 02 2024

Keywords

Examples

			A(5,2) = 10: 12345, 124|3|5, 12|34|5, 12|3|45, 14|23|5, 1|234|5, 1|23|45, 14|25|3, 1|245|3, 1|25|34.
A(6,3) = 9: 136|25|4, 13|256|4, 13|25|46, 16|235|4, 1|2356|4, 1|235|46, 16|25|34, 1|256|34, 1|25|346.
A(7,4) = 8: 14|23|5|67, 1|234|5|67, 1|23|45|67, 1|23|467|5, 14|27|36|5, 1|247|36|5, 1|27|346|5, 1|27|36|45.
A(8,5) = 1: 12345678.
A(8,8) = 4: 18|27|36|45, 1|278|36|45, 1|27|368|45, 1|27|36|458.
A(9,6) = 87: 123469|58|7, 12349|568|7, 12349|58|67, 123568|49|7, ..., 1|25|346789, 16|289|3457, 1|2689|3457, 1|289|34567.
A(9,8) = 5: 18|27|36|45|9, 1|278|36|45|9, 1|27|368|45|9, 1|27|36|458|9, 1|27|36|45|89.
A(9,10) = 1: 1|29|38|47|56.
Square array A(n,k) begins:
  1,      1,    1,    1,   1,  1,  1,  1, 1, 1, 1, ...
  1,      1,    1,    1,   1,  1,  1,  1, 1, 1, 1, ...
  0,      2,    1,    0,   0,  0,  0,  0, 0, 0, 0, ...
  0,      5,    2,    0,   1,  1,  0,  0, 0, 0, 0, ...
  0,     15,    4,    1,   2,  0,  0,  0, 1, 1, 0, ...
  0,     52,   10,    3,   3,  0,  1,  1, 0, 0, 0, ...
  0,    203,   28,    9,   1,  1,  3,  0, 0, 1, 1, ...
  0,    877,   96,   17,   8, 15,  4,  0, 1, 1, 0, ...
  0,   4140,  320,  108,  32,  1,  0,  1, 4, 0, 0, ...
  0,  21147, 1436,  324,  51, 10, 87, 72, 5, 0, 1, ...
  0, 115975, 5556, 1409, 621, 50,  1,  0, 0, 1, 5, ...
		

Crossrefs

Rows n=1-2 give: A000012, A033322 (for k>=1).
Main diagonal gives A142150 (for n>=2).
A(n+1,n) gives A158416 (for n>=2).
A(n,n+1) gives A135528(n+1).

A366631 Lexicographically earliest sequence such that each set of numbers enclosed by a pair of equal terms, excluding the endpoints, is distinct.

Original entry on oeis.org

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

Views

Author

Neal Gersh Tolunsky, Oct 14 2023

Keywords

Comments

The word 'set' means that every element is unique and order is irrelevant. {2,3}, for example, is equivalent to {3,2,2} and thus both could never appear in the sequence.
Two consecutive equal values enclose the empty set {}, and thus after [a(1), a(2)] = [1, 1] no consecutive equal values will occur again.
Note that we are considering sets between every pair of equal values, not just those that appear consecutively. For example, [2,1,2,3,2] encloses a set, which is {1,2,3}, as well as [2,3,2], which encloses {3}.
It appears that for n >= 21510, a(n + 17796) = a(n) + 2614 (found by Rémy Sigrist). If this linear recurrence is true, every number appears finitely many times.
A value k is banned after all the values in a set enclosed by a(i1) = a(i2) = k, with i1 < i2, and k itself have reoccurred in the sequence after a(i2). Suppose, for example, after the set S1 enclosed by a(i1) and a(i2) every element in S1 has appeared and also a(i3) = k, and then we had a(i4) = k. Then we would have a new set S2 enclosed by a(i2) and a(i4) that is a superset of S1 U {k}. This would contradict the sequence's definition since the set S2 enclosed by a(i2) and a(i4) is identical to the set S3 enclosed by a(i1) and a(i4) because S1 U {a(i2)} adds no new elements.
Assuming the linear recurrence above is true, the number 526 occurs a record number of 44 times in the sequence and it does not occur again after the linear recurrence begins. The same is true of three other values which occur 41, 42, and 43 times in the sequence.
For n > 2, a new value is always followed by the smallest number that has not yet been banned and is distinct from the previous number (i.e. does not form a null set).
If the definition is changed so that endpoints are included, this becomes A008619.

Examples

			a(2)=1, establishing the empty set, [1,1] -> {}.
a(4)=1, creating the sets [1,2,1] -> {2} and [1,1,2,1] -> {1,2}, which are distinct from any set that has appeared thus far. Note that 1 is now permanently banned since the next 1 would have to enclose the same set with a(1) as it would with a(2).
a(8)=4: a(8) cannot be 1 since 1 has been banned. 2 would form the empty set with a(7)=2. a(8) cannot be 3 since this would form the set [3,2,3] -> {2}, which already occurred as [1,2,1] -> {2}. a(8)=4 because 4 is a first occurrence and thus forms no sets.
For another example of a banned number, see the last occurrence of 2, which is a(9)=2. a(10) cannot be 2 since this would form the empty set. At a(11), the value 2 is banned forever since any further 2 would form the same set of numbers with a(7)=2 as with a(5)=2. This is because a later term paired with a(5)=2 would only add the values a(7)=2 and a(6)=3, in comparison to a pairing with a(7)=2, which already encloses a(9)=2 and a(10)=3.
		

Crossrefs

Programs

  • PARI
    See Links section.
    
  • Python
    from itertools import islice
    def agen(): # generator of terms
        m, a = set(), []
        while True:
            an, allnew = 0, False
            while not allnew:
                allnew, an, mn = True, an+1, set()
                for i in range(len(a)):
                    if an == a[i]:
                        t = tuple(sorted(set(a[i+1:])))
                        if t in m or t in mn: allnew = False; break
                        mn.add(t)
            yield an; a.append(an); m |= mn
    print(list(islice(agen(), 75))) # Michael S. Branicky, Jan 15 2024

Extensions

More terms from Rémy Sigrist, Oct 15 2023
Edited by Peter Munn, Dec 05 2023

A145677 Triangle T(n, k) read by rows: T(n, 0) = 1, T(n, n) = n, n>0, T(n,k) = 0, 0 < k < n-1.

Original entry on oeis.org

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

Views

Author

Gary W. Adamson and Roger L. Bagula, Mar 28 2009

Keywords

Comments

The first entry in each row is 1, the last entry in each of the rows consist of the positive integers (starting 1,1,2,3,...), and all other entries in the triangle are 0's (see example).
The vector of (1, 1, 2, 5, 16, 65, 326,...), which is 1 followed by A000522, is an eigenvector of the matrix: 1 + Sum_{k=1..n} T(n,k)*A000522(k-1) = A000522(n).

Examples

			First few rows of the triangle:
  1;
  1, 1;
  1, 0, 2;
  1, 0, 0, 3;
  1, 0, 0, 0, 4;
  1, 0, 0, 0, 0, 5;
  1, 0, 0, 0, 0, 0, 6;
  1, 0, 0, 0, 0, 0, 0, 7;
  1, 0, 0, 0, 0, 0, 0, 0, 8;
  1, 0, 0, 0, 0, 0, 0, 0, 0, 9;
  1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10;
		

Crossrefs

Programs

  • Mathematica
    T[n_, k_]:= If[k==0, 1, If[k==n, n, 0]];
    Table[T[n, k], {n,0,14}, {k,0,n}]//Flatten (* G. C. Greubel, Dec 23 2021 *)
  • Sage
    def A145677(n,k):
        if (k==0): return 1
        elif (k==n): return n
        else: return 0
    flatten([[A145677(n,k) for k in (0..n)] for n in (0..14)]) # G. C. Greubel, Dec 23 2021

Formula

T(n, k) = A158821(n,n-k).
1 + Sum_{k= 1..n} T(n,k) *(k-1) = A002061(n).
From G. C. Greubel, Dec 23 2021: (Start)
Sum_{k=0..n} T(n, k) = A000027(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A158416(n) = A152271(n+1). (End)

Extensions

Edited by R. J. Mathar, Oct 02 2009

A268696 a(1)=1; thereafter a(n+1) = floor(m/2), where m = number of occurrences of a(n) in [a(1),...,a(n)].

Original entry on oeis.org

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

Views

Author

David Seelmann, Feb 11 2016

Keywords

Comments

It appears that a(n) <= ceiling(sqrt(n)).
Comments from N. J. A. Sloane, Feb 12 2016: (Start)
In fact it appears that a(n) <= floor(sqrt(n)) except when n belongs to the sequence S := [99, 120, 142, 167, 193, 222, 252, 285, 319, ...], which has second differences 1,3,1,3,1,3,... and is the sequence {99; A035608(k)+21*k+120, k>=0}. For these values of n it appears that a(n) = ceiling(sqrt(n)). The first example is a(99) = 10 = ceiling(sqrt(99)).
The zeros occur at positions [2, 3, 8, 13, 19, 28, 38, 51, 65, 82, 100, 121, 143, 168, 194, 223, 253, 286, 320, ...], which apart from the initial terms appears to be S+1.
Without the division by 2 in the definition (that is, if a(n+1)=m), we get A158416. (End)

Examples

			a(2) is equal to the number of times a(1) = 1 appears in the sequence before, divided by two, rounding down. Since 1 appears once before, a(2) = floor(1/2) = 0.
a(3) is  equal to the number of times 0 appears in the sequence before, which is again once, divided by two, rounding down. So a(3) = floor(1/2) = 0.
a(4) is the number of times 0 appears before (twice) divided by two, which gives us 1.
		

Crossrefs

Programs

  • Mathematica
    a = {1}; Do[AppendTo[a, Floor[Count[a, n_ /; n == a[[k - 1]]]/2]], {k, 2, 120}]; a (* Michael De Vlieger, Feb 11 2016 *)

Extensions

More terms from Michael De Vlieger, Feb 11 2016

A329934 a(1)=1, a(2)=1, a(n) = (number of times a(n-1) has appeared before) + (number of times a(n-2) has appeared before).

Original entry on oeis.org

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

Views

Author

Joshua Oliver, Nov 24 2019

Keywords

Comments

Conjecture: This sequence grows logarithmically.

Examples

			a(n)=4 where n=3 because 1 (a(n-1)) has appeared twice before, and 1 (a(n-2)) has appeared twice before as well. 2+2 = 4.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=0, 0, b(n-1)+x^a(n)) end:
    a:= proc(n) option remember; `if`(n<3, 1, (p->
          coeff(p, x, a(n-1))+coeff(p, x, a(n-2)))(b(n-1)))
        end:
    seq(a(n), n=1..120);  # Alois P. Heinz, Nov 24 2019
  • Mathematica
    A={1,1};For[n=3,n<=81,n++,A=Append[A,Sum[Count[Table[Part[A,i],{i,1,n-1}],Part[A,n-k]],{k,2}]]];A
  • PARI
    o=vector(17); for (n=1, 81, print1 (v=if (n<3, 1, o[pp]+o[p]) ", "); o[v]++; [pp,p]=[p,v]) \\ Rémy Sigrist, Nov 27 2019

A179820 a(n) = n-th triangular number mod (n+2).

Original entry on oeis.org

0, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10, 1, 11, 1, 12, 1, 13, 1, 14, 1, 15, 1, 16, 1, 17, 1, 18, 1, 19, 1, 20, 1, 21, 1, 22, 1, 23, 1, 24, 1, 25, 1, 26, 1, 27, 1, 28, 1, 29, 1, 30, 1, 31, 1, 32, 1, 33, 1, 34, 1, 35, 1, 36, 1, 37, 1, 38, 1, 39, 1, 40, 1, 41, 1, 42, 1, 43, 1, 44, 1, 45
Offset: 0

Views

Author

Zak Seidov, Jul 28 2010

Keywords

Crossrefs

Essentially the same as A133622.

Programs

  • Mathematica
    Table[Mod[n(n+1)/2,n+2],{n,0,200}]
    LinearRecurrence[{0,2,0,-1},{0,1,3,1,4},110] (* or *) Join[{0,1},Riffle[Range[3,50],1]] (* Harvey P. Dale, Apr 02 2024 *)

Formula

a(0)=0, afterwards if n is odd then a(n)=1 else a(n)=(n+4)/2
a(0)=0, afterwards a(n)=1 for odd n and n/2+2 for even n.
a(n)= +2*a(n-2) -a(n-4), n>4. a(n) = (6+n*((-1)^n+1)+2*(-1)^n)/4, n>0. G.f.: -x*(-1-3*x+x^2+2*x^3) / ( (x-1)^2*(1+x)^2 ). [From R. J. Mathar, Aug 03 2010]

A327891 Square array A(n,k) (n, k >= 1) read by antidiagonals, where A(n,1) = n-1; A(n,k) is the number of occurrences of A(n,k-1) in the row up to k-1.

Original entry on oeis.org

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

Views

Author

Ali Sada, Oct 02 2019

Keywords

Comments

The terms of each row are quasi-periodic. Starting with n=3, the period starts at k=((n-1)^2)-1. The period is 2*(n-1) long, and we can find its terms with a simple mod function.
The second row is A158416.

Examples

			The square array begins:
  0, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, ...
  1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, ...
  2, 1, 1, 2, 2, 3, 1, 3, 2, 4, 1, 4, 2, 5, 1, 5, ...
  3, 1, 1, 2, 1, 3, 2, 2, 3, 3, 4, 1, 4, 2, 4, 3, ...
  4, 1, 1, 2, 1, 3, 1, 4, 2, 2, 3, 2, 4, 3, 3, 4, ...
  5, 1, 1, 2, 1, 3, 1, 4, 1, 5, 2, 2, 3, 2, 4, 2, ...
  6, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 2, 2, 3, 2, ...
  7, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 2, 2, ...
  8, 1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, ...
From _M. F. Hasler_, May 08 2025: (Start)
The quasi-periodic pattern that starts in row 3, column 3, is: (1 2 2 3), (1 3 2 4), ..., that is, (1 m-1 2 m), starting with m = 3, then m = 4, 5, 6, ...
The pattern that starts in row 4, column 8, is: (2 3 3 4 1 4), (2 4 3 5 1 5), ..., that is, (2 m-1 3 m 1 m), starting with m = 4, then m = 5, 6, 7, ...
The pattern that starts in row 5, column 15, is (3 m-1 4 m 1 m 2 m), starting with m = 5, then m = 6, 7, 8, ...
In row 6, from column 24 on, we have (4 m-1 5 m 1 m 2 m 3 m), with m = 6, 7, 8, ...
And so on: In row n, from column n(n-2) on, we have the pattern (n-2 m-1 n-1 m 1 ... n-3 m), starting with m = n. (End)
		

Crossrefs

The second row is A158416.

Programs

  • PARI
    M327891=Map(); apply( {A327891(n, k=0)= k|| [n+=(1-k=ceil(sqrt(8*n+1)/2-.5))*k\2, k+=1-n]; if(k==1, n-1, n>k\/2 || n<3, (k\/2)^(n==2==k%2), mapisdefined(M327891,[n,k], &n), n, mapput(M327891,[n,k], n=#[0| j<-[1..k-2], A327891(n, j)==A327891(n, k-1)]+1); n)}, [1..20]) \\ A327891 gives A(n,k) if k is given, otherwise a(n). The "quasi-periodic property" is not used.
    matrix(9,19,n,k, A327891(n, k)) \\ M. F. Hasler, May 08 2025

Formula

A(n, 1) = n-1; A(2, 2k-1) = k = A(n, 2k) if n = 1 or n > k; A(2, 2k) = 1 = A(n, 2k-1) if n = 1 or n > k. - M. F. Hasler, May 08 2025

A169591 Triangle T(n,k) with column n = A059841 if n even and column n = A000007 if n odd.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
Offset: 0

Views

Author

Philippe Deléham, Dec 02 2009

Keywords

Comments

Row sums : A158416.

Examples

			Triangle begins : 1 ; 0,1 ; 1,0,1 ; 0 0 0 1 ; 1,0,1,0,1 ; 0,0,0,0,0,1 ; ...
		

Formula

Sum_{k, 0<=k<=n} T(n,k)= A158416(n).
Showing 1-10 of 10 results.