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 14 results. Next

A339399 Pairwise listing of the partitions of k into two parts (s,t), with 0 < s <= t ordered by increasing values of s and where k = 2,3,... .

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Dec 02 2020

Keywords

Comments

a(n-1) and a(n) are the lesser and greater of a twin prime pair if and only if a(n) = a(n-1) + 2 where a(n-1) and a(n) are prime.

Examples

			                                                                     [1,9]
                                                     [1,7]   [1,8]   [2,8]
                                     [1,5]   [1,6]   [2,6]   [2,7]   [3,7]
                     [1,3]   [1,4]   [2,4]   [2,5]   [3,5]   [3,6]   [4,6]
     [1,1]   [1,2]   [2,2]   [2,3]   [3,3]   [3,4]   [4,4]   [4,5]   [5,5]
   k   2       3       4       5       6       7       8       9      10
  --------------------------------------------------------------------------
   k   Nondecreasing partitions of k
  --------------------------------------------------------------------------
   2   1,1
   3   1,2
   4   1,3,2,2
   5   1,4,2,3
   6   1,5,2,4,3,3
   7   1,6,2,5,3,4
   8   1,7,2,6,3,5,4,4
   9   1,8,2,7,3,6,4,5
  10   1,9,2,8,3,7,4,6,5,5
  ...
		

Crossrefs

Bisections: A122197 (odd), A199474 (even).

Programs

  • Mathematica
    t[n_] := Flatten[Reverse /@ IntegerPartitions[n, {2}]]; Array[t, 14, 2] // Flatten (* Amiram Eldar, Dec 03 2020 *)
    Table[(1 + (-1)^n) (1 + Floor[Sqrt[2 n - 1 - (-1)^n]])/2 - ((2 n + 1 - (-1)^n)/2 - 2 Sum[Floor[(k + 1)/2], {k, -1 + Floor[Sqrt[2 n - 2 - (-1)^n]]}]) (-1)^n/2, {n, 100}] (* Wesley Ivan Hurt, Dec 04 2020 *)
  • PARI
    row(n) = vector(n\2, i, [i, n-i]);
    tabf(nn) = for (n=2, nn, print(row(n))); \\ Michel Marcus, Dec 03 2020

Formula

a(n) = (1+(-1)^n)*(1+floor(sqrt(2*n-1-(-1)^n)))/2-((2*n+1-(-1)^n)/2-2 *Sum_{k=1..floor(sqrt(2*n-2-(-1)^n)-1)} floor((k+1)/2))*(-1)^n/2.
a(n) = A339443(A103889(n)). - Wesley Ivan Hurt, May 09 2021

A062052 Numbers with exactly 2 odd integers in their Collatz (or 3x+1) trajectory.

Original entry on oeis.org

5, 10, 20, 21, 40, 42, 80, 84, 85, 160, 168, 170, 320, 336, 340, 341, 640, 672, 680, 682, 1280, 1344, 1360, 1364, 1365, 2560, 2688, 2720, 2728, 2730, 5120, 5376, 5440, 5456, 5460, 5461, 10240, 10752, 10880, 10912, 10920, 10922, 20480, 21504, 21760, 21824
Offset: 1

Views

Author

Keywords

Comments

The Collatz (or 3x+1) function is f(x) = x/2 if x is even, 3x+1 if x is odd.
The Collatz trajectory of n is obtained by applying f repeatedly to n until 1 is reached.
The sequence consists of terms of A002450 and their 2^k multiples. The first odd integer in the trajectory is one of the terms of A002450 and the second odd one is the terminal 1. - Antti Karttunen, Feb 21 2006
This sequence looks to appear first in the literature on page 1285 in R. E. Crandall.

Examples

			The Collatz trajectory of 5 is (5,16,8,4,2,1), which contains 2 odd integers.
		

Crossrefs

Is this a subset of A115774?
Column k=2 of A354236.

Programs

  • Haskell
    import Data.List (elemIndices)
    a062052 n = a062052_list !! (n-1)
    a062052_list = map (+ 1) $ elemIndices 2 a078719_list
    -- Reinhard Zumkeller, Oct 08 2011
    
  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; countOdd[lst_] := Length[Select[lst, OddQ]]; Select[Range[22000], countOdd[Collatz[#]] == 2 &] (* T. D. Noe, Dec 03 2012 *)
  • PARI
    for(n=2,100000,s=n; t=0; while(s!=1,if(s%2==0,s=s/2,s=3*s+1; t++); if(s*t==1,print1(n,","); ); ))
    
  • Python
    def a(n):
        l=[n, ]
        while True:
            if n%2==0: n//=2
            else: n = 3*n + 1
            if n not in l:
                l.append(n)
                if n<2: break
            else: break
        return len([i for i in l if i % 2])
    print([n for n in range(1, 22001) if a(n)==2]) # Indranil Ghosh, Apr 14 2017

Formula

A078719(a(n)) = 2; A006667(a(n)) = 1.
a(n) = 2^x * (4^y - 1)/3 where x = A122196(n) - 1 and y = A122197(n) + 1. - Alan Michael Gómez Calderón, Jan 16 2025 after Antti Karttunen

A122196 Fractal sequence: count down by 2's from successive integers.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

First differences of A076644. Fractal - deleting the first occurrence of each integer leaves the original sequence. Also, original sequence plus 1. 1's occur at square indices. New values occur at indices m^2+1 and m^2+m+1.
Ordinal transform of A122197.
Row sums give A002620. - Gary W. Adamson, Nov 29 2008
From Gary W. Adamson, Dec 05 2009: (Start)
A122196 considered as an infinite lower triangular matrix * [1,2,3,...] =
A006918 starting (1, 2, 5, 8, 14, 20, 30, 40, ...).
Let A122196 = an infinite lower triangular matrix M; then lim_{n->infinity} M^n = A171238, a left-shifted vector considered as a matrix. (End)
A122196 is the fractal sequence associated with the dispersion A082156; that is, A122196(n) is the number of the row of A082156 that contains n. - Clark Kimberling, Aug 12 2011
From Johannes W. Meijer, Sep 09 2013: (Start)
The alternating row sums lead to A004524(n+2).
The antidiagonal sums equal A001840(n). (End)

Examples

			The first few rows of the sequence a(n) as a triangle T(n, k):
n/k  1   2   3
1    1
2    2
3    3,  1
4    4,  2
5    5,  3,  1
6    6,  4,  2
		

Crossrefs

Programs

  • Haskell
    a122196 n = a122196_list !! (n-1)
    a122196_list = concatMap (\x -> enumFromThenTo x (x - 2) 1) [1..]
    -- Reinhard Zumkeller, Jul 19 2012
  • Maple
    From Johannes W. Meijer, Sep 09 2013: (Start)
    a := proc(n) local t: t:=floor((sqrt(4*n-3)-1)/2): floor(sqrt(4*n-1))-2*((n-1) mod (t+1)) end: seq(a(n), n=1..92); # End first program.
    T := (n, k) -> n-2*k+2: seq(seq(T(n, k), k=1..floor((n+1)/2)), n=1..18); # End second program. (End)
  • Mathematica
    Flatten@Range[Range[10], 1, -2] (* Birkas Gyorgy, Apr 07 2011 *)

Formula

From Boris Putievskiy, Sep 09 2013: (Start)
a(n) = 2*(1-A122197(n)) + A000267(n-1).
a(n) = floor(sqrt(4*n-1)) - 2*((n-1) mod (t+1)), where t = floor((sqrt(4*n-3)-1)/2). (End)
From Johannes W. Meijer, Sep 09 2013: (Start)
T(n, k) = n - 2*k + 2, for n >= 1 and 1 <= k <= floor((n+1)/2).
T(n, k) = A002260(n, n-2*k+2). (End)

A082375 Irregular triangle read by rows: row n begins with n and decreases by 2 until 0 or 1 is reached, for n >= 0.

Original entry on oeis.org

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

Views

Author

Michael Somos, Apr 09 2003

Keywords

Comments

As a sequence, a(n) = A025644(n+1) for n <= 142.
The length of row n is given by A008619(n) = 1 + floor(n/2).
From Wolfdieter Lang, Feb 17 2020: (Start)
This table T(n, m) can be used for the conversion identity
2*cos(Pi*k/N) = 2*sin((Pi/(2*N))*(N - 2*k)) = 2*sin((Pi/(2*N))*T(N-2, k-1)), here for N = n+2 >= 2, and k = m + 1 = 1, 2, ..., floor(N/2).
2*cos((Pi/N)*k) = R(k, rho(N)), where R is a monic Chebyshev polynomial from A127672 and rho(N) = 2*cos(Pi/N), gives part of the roots of the polynomial S(N-1, x), for k = 1, 2, ..., floor(N/2), with the Chebyshev S polynomials from A049310.
2*sin((Pi/(2*N))*q) = d^{(2*N)}_q/r, for q = 1, 2, ..., N, with the length ratio (q-th diagonal)/r, where r is the radius of the circle circumscribing a regular (2*N)-gon. The counting q starts with the diagonal d^{(2*N)}_1 = s(2*N) (in units of r), the side of the (2*N)-gon. The next diagonal is d^{(2*N)}_2 = rho(2*N)*s(2*N) (in units of r).
For the instances N = 4 (n = 2) and 5 (n = 3), we have:
N = n+2 = 4:
k = m+1 = 1, 2*cos(Pi*1/4) = 2*sin(Pi*2/8) = sqrt(2);
k = 2, 2*cos(Pi*2/4) = 2*sin(Pi*0/8) = 0.
N = 5 (n=3):
k=1 (m=0), 2*cos(Pi*1/5) = 2*sin(Pi*3/10) = (1 + sqrt(5))/2 = rho(5) = A001622;
k=2: 2*cos(Pi*2/5) = 2*sin(Pi*1/10) = rho(5) - 1. (End)
If b > 0 and c > 0 are the integer coefficients of a monic quadratic x^2 + b*x + c, it has integer roots if its discriminant d^2 = b^2 - 4c is a perfect square. This sequence is the values of d for increasing b sorted by b then c. The first pair of (b, c) = (2, 1) and has d = a(0) = 0. The n-th pair of (b, c) = (A027434(n), A350634(n)) and has d = a(n-1). - Frank M Jackson, Jan 20 2024
This sequence is related to an instance of Clark Kimberling's generic dispersion arrays; in this case the leader sequence is the square numbers A000290 (without 0), and the follower sequence is the nonsquare numbers A000037. This sequence gives the 0-origin column index of n in the resulting dispersion array. - Allan C. Wechsler, Feb 26 2025

Examples

			The irregular triangle T(n, m) begins:
  n\m  0 1 2 3 4 5 ...
  0:   0
  1:   1
  2:   2 0
  3:   3 1
  4:   4 2 0
  5:   5 3 1
  6:   6 4 2 0
  7:   7 5 3 1
  8:   8 6 4 2 0
  9:   9 7 5 3 1
  10: 10 8 6 4 2 0
  ...
		

Crossrefs

Programs

  • Mathematica
    Flatten[Table[Range[n,0,-2],{n,0,20}]] (* Harvey P. Dale, Apr 03 2019 *)
    lst = {}; Do[If[IntegerQ[d=Sqrt[b^2-4c]], AppendTo[lst, d]], {b, 1, 20}, {c, 1, b^2/4}]; lst (* Frank M Jackson, Jan 20 2024 *)
  • PARI
    a(n)=local(m); if(n<0,0,m=sqrtint(1+4*n); m-1-(1+4*n-m^2)\2)

Formula

T(n, m) = n - 2*m, m = 0, 1, ..., floor(n/2), n >= 0 (see the name and programs). - Wolfdieter Lang, Feb 17 2020
a(n) = A199474(n+1) - A122197(n+1). - Wesley Ivan Hurt, Jan 09 2022
a(n) = sqrt((A027434(n+1))^2 - 4*A350634(n+1)). - Frank M Jackson, Jan 20 2024

A261036 Table read by rows: number of complete partitions of n with largest part = k.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 3, 2, 2, 1, 3, 4, 2, 1, 4, 5, 4, 2, 1, 4, 6, 5, 4, 1, 5, 8, 8, 5, 4, 1, 5, 10, 10, 8, 5, 1, 6, 11, 14, 10, 8, 5, 1, 6, 14, 16, 16, 10, 8, 1, 7, 16, 22, 20, 16, 10, 8, 1, 7, 18, 26, 27, 20, 16, 10, 1, 8, 21, 32, 34, 31
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 08 2015

Keywords

Comments

See A126796 for definition of complete partitions;
A126796(n) = sum of n-th row;
also T(n,floor((n+1)/2)) = A126796(floor(n/2)).

Examples

			T(8,2) = #{1+1+1+1+1+1+2, 1+1+1+1+2+2, 1+1+2+2+2} = 3;
T(8,3) = #{1+1+1+1+1+3, 1+1+1+2+3, 1+1+3+3, 1+2+2+3} = 4;
T(8,4) = #{1+1+1+1+4, 1+1+2+4} = 2;
T(9,2) = #{+11+1+1+1+1+1+2, 1+1+1+1+1+2+2, 1+1+1+2+2+2, 1+2+2+2+2} = 4;
T(9,3) = #{1+1+1+1+1+1+3, 1+1+1+1+2+3, 1+1+1+3+3, 1+1+2+2+3, 3,3,2,1} = 5;
T(9,4) = #{1+1+1+1+1+4, 1+1+1+2+4, 1+1+3+4, 1+2+2+4} = 4;
T(9,5) = #{1+1+1+1+5, 1+1+2+2+5} = 2.
. -----------------------------------------------
.   n |  T(n,k), k = 1 .. [(n+1)/2]  | A126796(n)
. ----+------------------------------+-----------
.   1 |  1                           |         1
.   2 |  1                           |         1
.   3 |  1 1                         |         2
.   4 |  1 1                         |         2
.   5 |  1 2  1                      |         4
.   6 |  1 2  2                      |         5
.   7 |  1 3  2  2                   |         8
.   8 |  1 3  4  2                   |        10
.   9 |  1 4  5  4  2                |        16
.  10 |  1 4  6  5  4                |        20
.  11 |  1 5  8  8  5  4             |        31
.  12 |  1 5 10 10  8  5             |        39
.  13 |  1 6 11 14 10  8  5          |        55
.  14 |  1 6 14 16 16 10  8          |        71
.  15 |  1 7 16 22 20 16 10  8       |       100
.  16 |  1 7 18 26 27 20 16 10       |       125
.  17 |  1 8 21 32 34 31 20 16 10    |       173
.  18 |  1 8 24 37 42 39 31 20 16    |       218
.  19 |  1 9 26 46 53 50 39 31 20 16 |       291
.  20 |  1 9 30 52 66 63 55 39 31 20 |       366
		

Crossrefs

Cf. A008619 (row lengths), A126796 (row sums).
Cf. A122197.

Programs

  • Haskell
    import Data.MemoCombinators (memo2, integral, Memo)
    a261036 n k = a261036_tabf !! (n-1) !! (k-1)
    a261036_row n = a261036_tabf !! (n-1)
    a261036_tabf = zipWith (map . flip dMemo) [1..] a122197_tabf where
       dMemo = memo2 integral integral d
       d 0 _ = 0
       d _ 0 = 0
       d 1 _ = 1
       d k n | n <= 2 * k - 2 = 0
             | n <= 3 * k - 2 = dMemo (k - 1) (n - 1)
             | otherwise      = dMemo (k - 1) (n - 1) + dMemo k (n - k)
  • Mathematica
    d[k_, n_] := d[k, n] = Which[n == 0 || k == 0, 0, k == 1, 1, n >= 3 k - 1, d[k - 1, n - 1] + d[k, n - k], 2 k - 1 <= n <= 3 k - 2, d[k - 1, n - 1], True, 0]; Table[d[k, n], {n, 17}, {k, Floor[(n + 1)/2]}] // Flatten (* Michael De Vlieger, Jul 13 2017 *)

Formula

According to the Park link, Theorem 3.7, p. 357f:
Let D_k(n) be the number of complete partitions of a positive integer n with largest part exactly k.
D_0(n) = 0 for all n, D_k(0) = 0 for all k, D_1(n)=1 for n>0, and for k>1:
D_k(n) = D_(k-1)(n-1) + D_k(n-k) if n >= 3*k-1, D_(k-1)(n-1) if 2*k-1 <= n <= 3*k-2, 0 if 1 <= n <= 2*k-2.
In the following, T(n,k) = D_k(n).

A339443 Pairwise listing of the partitions of k into two parts (s,t), with 0 < t <= s ordered by decreasing values of s and where k = 2,3,... .

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Dec 05 2020

Keywords

Examples

			                                                                     [9,1]
                                                     [7,1]   [8,1]   [8,2]
                                     [5,1]   [6,1]   [6,2]   [7,2]   [7,3]
                     [3,1]   [4,1]   [4,2]   [5,2]   [5,3]   [6,3]   [6,4]
     [1,1]   [2,1]   [2,2]   [3,2]   [3,3]   [4,3]   [4,4]   [5,4]   [5,5]
   k   2       3       4       5       6       7       8       9      10
  --------------------------------------------------------------------------
   k   Nonincreasing partitions of k
  --------------------------------------------------------------------------
   2   1,1
   3   2,1
   4   3,1,2,2
   5   4,1,3,2
   6   5,1,4,2,3,3
   7   6,1,5,2,4,3
   8   7,1,6,2,5,3,4,4
   9   8,1,7,2,6,3,5,4
  10   9,1,8,2,7,3,6,4,5,5
  ...
		

Crossrefs

Bisections: A199474, A122197.

Programs

  • Mathematica
    Table[(1 - (-1)^n) (1 + Floor[Sqrt[2 n - 1]])/2 - (((-1)^n - 2 n - 1)/2 + 2 Sum[Floor[(k + 1)/2], {k, -1 + Floor[Sqrt[2 n - 2 - (-1)^n]]}]) (-1)^n/2, {n, 100}]

Formula

a(n) = (1-(-1)^n)*(1+floor(sqrt(2*n-1)))/2-(((-1)^n-2*n-1)/2 + 2*Sum_{k=1..-1+floor(sqrt(2*n-2-(-1)^n))} floor((k+1)/2))*(-1)^n/2.
a(n) = A339399(A103889(n)). - Wesley Ivan Hurt, May 09 2021

A173284 Triangle by columns, Fibonacci numbers in every column shifted down twice, for k > 0.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 5, 2, 1, 8, 3, 1, 13, 5, 2, 21, 8, 3, 1, 34, 13, 5, 2, 1, 55, 21, 8, 3, 1, 89, 34, 13, 5, 2, 1, 144, 55, 21, 8, 3, 1, 233, 89, 34, 13, 5, 2, 1, 377, 144, 55, 21, 8, 3, 1, 610, 233, 89, 34, 13, 5, 2, 1
Offset: 0

Views

Author

Gary W. Adamson, Feb 14 2010

Keywords

Comments

The row sums equal A052952.
Let the triangle = M. Then lim_{n->infinity} M^n = A173285 as a left-shifted vector.
A173284 * [1, 2, 3, ...] = A054451: (1, 1, 4, 5, 12, 17, 33, ...). - Gary W. Adamson, Mar 03 2010
From Johannes W. Meijer, Sep 05 2013: (Start)
Triangle read by rows formed from antidiagonals of triangle A104762.
The diagonal sums lead to A004695. (End)

Examples

			First few rows of the triangle:
    1;
    1;
    2,   1;
    3,   1;
    5,   2,  1;
    8,   3,  1;
   13,   5,  2,  1;
   21,   8,  3,  1;
   34,  13,  5,  2,  1;
   55,  21,  8,  3,  1;
   89,  34, 13,  5,  2, 1;
  144,  55, 21,  8,  3, 1;
  233,  89, 34, 13,  5, 2, 1;
  377, 144, 55, 21,  8, 3, 1;
  610, 233, 89, 34, 13, 5, 2, 1;
  ...
		

Crossrefs

Cf. (Similar triangles) A008315 (Catalan), A011973 (Pascal), A102541 (Losanitsch), A122196 (Fractal), A122197 (Fractal), A128099 (Pell-Jacobsthal), A152198, A152204, A207538, A209634.

Programs

  • Maple
    T := proc(n, k): if n<0 then return(0) elif k < 0 or k > floor(n/2) then return(0) else combinat[fibonacci](n-2*k+1) fi: end: seq(seq(T(n, k), k=0..floor(n/2)), n=0..14); # Johannes W. Meijer, Sep 05 2013

Formula

Triangle by columns, Fibonacci numbers in every column shifted down twice, for k > 0.
From Johannes W. Meijer, Sep 05 2013: (Start)
T(n,k) = A000045(n-2*k+1), n >= 0 and 0 <= k <= floor(n/2).
T(n,k) = A104762(n-k, k). (End)

Extensions

Term a(15) corrected by Johannes W. Meijer, Sep 05 2013

A194061 Natural interspersion of A002620; a rectangular array, by antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 6, 7, 11, 15, 9, 10, 14, 19, 24, 12, 13, 18, 23, 29, 35, 16, 17, 22, 28, 34, 41, 48, 20, 21, 27, 33, 40, 47, 55, 63, 25, 26, 32, 39, 46, 54, 62, 71, 80, 30, 31, 38, 45, 53, 61, 70, 79, 89, 99, 36, 37, 44, 52, 60, 69, 78, 88, 98, 109, 120
Offset: 1

Views

Author

Clark Kimberling, Aug 14 2011

Keywords

Comments

See A194029 for definitions of natural fractal sequence and natural interspersion. Every positive integer occurs exactly once (and every pair of rows intersperse), so that as a sequence, A194061 is a permutation of the positive integers; its inverse is A194062.

Examples

			Northwest corner:
1...2...4...6...9...12
3...5...7...10..13..17
8...11..14..18..22..27
15..19..23..28..33..39
24..29..34..40..46..53
		

Crossrefs

Programs

  • Mathematica
    z = 50;
    c[k_] := Floor[((k + 1)^2)/4];
    c = Table[c[k], {k, 1, z}]  (* A002620 *)
    f[n_] := If[MemberQ[c, n], 1, 1 + f[n - 1]]
    f = Table[f[n], {n, 1, 400}]   (* [A122197] *)
    r[n_] := Flatten[Position[f, n]]
    t[n_, k_] := r[n][[k]]
    TableForm[Table[t[n, k], {n, 1, 7}, {k, 1, 7}]]
    p = Flatten[
      Table[t[k, n - k + 1], {n, 1, 11}, {k, 1, n}]] (* A194061 *)
    q[n_] := Position[p, n]; Flatten[
     Table[q[n], {n, 1, 90}]]  (* A194062 *)

A209634 Triangle with (1,4,7,10,13,16...,(3*n-2),...) in every column, shifted down twice.

Original entry on oeis.org

1, 4, 7, 1, 10, 4, 13, 7, 1, 16, 10, 4, 19, 13, 7, 1, 22, 16, 10, 4, 25, 19, 13, 7, 1, 28, 22, 16, 10, 4, 31, 25, 19, 13, 7, 1, 34, 28, 22, 16, 10, 4, 37, 31, 25, 19, 13, 7, 1, 40, 34, 28, 22, 16, 10, 4, 43, 37, 31, 25, 19, 13, 7, 1, 46, 40, 34, 28, 22, 16, 10
Offset: 1

Views

Author

Ctibor O. Zizka, Mar 11 2012

Keywords

Comments

OEIS contains a lot of similar sequences, for example A152204, A122196, A173284.
Row sums for this sequence gives A006578.
In general, by given triangle with (A-B,2*A-B,...,A*n-B,...) in every column, shifted down K-times, we have the row sum s(n)= A*(n*n+K*n+nmodK)/(2*K) - B*(n+nmodK)/K. In this sequence K=2,A=3,B=2, in A152204 K=2,A=2,B=1.
No triangle with primes in every column, shifted down by K>=2 in OEIS, no row sums of it in OEIS.
From Johannes W. Meijer, Sep 28 2013: (Start)
Triangle read by rows formed from antidiagonals of triangle A143971.
The alternating row sums equal A004524(n+2) + 2*A004524(n+1).
The antidiagonal sums equal A171452(n+1). (End)

Examples

			Triangle:
1
4
7,  1
10, 4
13, 7,  1
16, 10, 4
19, 13, 7,  1
22, 16, 10, 4
25, 19, 13, 7,  1
28, 22, 16, 10, 4
...
		

Crossrefs

Programs

  • Maple
    T := (n, k) -> 3*n - 6*k + 4: seq(seq(T(n, k), k=1..floor((n+1)/2)), n=1..15); # Johannes W. Meijer, Sep 28 2013

Formula

From Johannes W. Meijer, Sep 28 2013: (Start)
T(n, k) = 3*n - 6*k + 4, n >= 1 and 1 <= k <= floor((n+1)/2).
T(n, k) = A143971(n-k+1, k), n >= 1 and 1 <= k <= floor((n+1)/2). (End)

A269837 Irregular triangle read by rows: even terms of A094728(n+1) divided by 4.

Original entry on oeis.org

1, 2, 4, 3, 6, 4, 9, 8, 5, 12, 10, 6, 16, 15, 12, 7, 20, 18, 14, 8, 25, 24, 21, 16, 9, 30, 28, 24, 18, 10, 36, 35, 32, 27, 20, 11, 42, 40, 36, 30, 22, 12, 49, 48, 45, 40, 33, 24, 13, 56, 54, 50, 44, 36, 26, 14, 64, 63, 60, 55, 48, 39, 28, 15
Offset: 0

Views

Author

Paul Curtz, Mar 06 2016

Keywords

Comments

See A264798 and A261046 for the Hydrogen atom and the Janet periodic table.
a(n) odd terms are again A264798.
Decomposition by multiplication i.e. a(n) = b(n)*c(n) by irregular triangle:
1, 1 1,
2, 1 2,
4, 3, 2, 1, 2, 3,
6, 4, = 2, 1, * 3, 4,
9, 8, 5, 3, 2, 1, 3, 4, 5,
12, 10, 6, 3, 2, 1, 4, 5, 6,
16, 15, 12, 7, 4, 3, 2, 1, 4, 5, 6, 7,
etc. etc. etc.
b(n) is duplicated A004736(n) or mirror of A122197(n+1). c(n) = A138099(n+1).
Decomposition by subtraction, a(n) = d(n) - e(n):
1, 1 0,
2, 2, 0,
4, 3, 4, 3, 0, 0,
6, 4, = 6, 5, - 0, 1,
9, 8, 5, 9, 8, 7, 0, 0, 2,
12, 10, 6, 12, 11, 10, 0, 1, 4,
16, 15, 12, 7, 16, 15, 14, 13, 0, 0, 2, 6,
20, 18, 14, 8, 20, 19, 18, 17, 0, 1, 4, 9,
etc. etc. etc.
d(n) is the natural numbers A000027 inverted by lines. e(n) will be studied (see A239873).
Sum of a(n) by diagonals: 1, 5, 13, 27, 48, ... . The third differences have the period 2: repeat 2, 1. See A002717.

Crossrefs

Programs

Showing 1-10 of 14 results. Next