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.

Previous Showing 21-30 of 32 results. Next

A230421 Triangle A230420 transposed.

Original entry on oeis.org

1, 1, 1, 1, 2, 2, 4, 4, 5, 6, 12, 14, 16, 19, 22, 55, 59, 65, 73, 82, 94, 293, 314, 336, 362, 395, 432, 479, 1881, 1971, 2073, 2189, 2324, 2482, 2667, 2886, 14011, 14555, 15140, 15775, 16473, 17249, 18124, 19123, 20276, 115974, 120010, 124289, 128831, 133664, 138828, 144378, 150389, 156961, 164224
Offset: 1

Views

Author

Antti Karttunen, Oct 18 2013

Keywords

Examples

			The first rows of this triangular table are:
1;
1, 1;
1, 2, 2;
4, 4, 5, 6;
12, 14, 16, 19, 22;
55, 59, 65, 73, 82, 94;
...
		

Crossrefs

Transpose: A230420. Row sums: A219661.

Programs

Formula

a(n) = A230420(A038722(n)).

A343809 Divide the positive integers into subsets of lengths given by successive primes, then reverse the order of terms in each subset.

Original entry on oeis.org

2, 1, 5, 4, 3, 10, 9, 8, 7, 6, 17, 16, 15, 14, 13, 12, 11, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59
Offset: 1

Views

Author

Paolo Xausa, Apr 30 2021

Keywords

Comments

From Omar E. Pol, Apr 30 2021: (Start)
Irregular triangle read by rows T(n,k) in which row n lists the next p positive integers in decreasing order, where p is the n-th prime, with n >= 1.
The triangle has the following properties:
Column 1 gives the nonzero terms of A007504.
Column 2 gives A237589.
Column 3 gives A071148.
Column 4 gives the terms > 2 of A343859.
Column 5 gives the absolute values of the terms < -1 of A282329.
Column 6 gives the terms > 7 of A082548.
Column 7 gives the terms > 6 of A115030.
Records are in the column 1.
Indices of records are in the right border.
Right border gives A014284.
Row lengths give A000040.
Row products give A078423.
Row sums give A034956. (End)

Examples

			From _Omar E. Pol_, Apr 30 2021: (Start)
Written as an irregular triangle in which row lengths give A000040 the sequence begins:
   2,  1;
   5,  4,  3;
  10,  9,  8,  7,  6;
  17, 16, 15, 14, 13, 12, 11;
  28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18;
  41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29;
  58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42;
  77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59;
  ...
(End)
		

Crossrefs

Programs

  • Maple
    R:= NULL: t:= 1:
    for i from 1 to 20 do
      p:= ithprime(i);
      R:= R, seq(i,i=t+p-1..t,-1);
      t:= t+p;
    od:
    R; # Robert Israel, Apr 30 2021
  • Mathematica
    With[{nn=10},Reverse/@TakeList[Range[Total[Prime[Range[nn]]]],Prime[Range[nn]]]]//Flatten (* Harvey P. Dale, Apr 27 2022 *)

Formula

T(n,k) = A007504(n) - k + 1, with n >= 1 and 1 <= k <= A000040(n). - Omar E. Pol, May 01 2021

A380649 Rectangular array ((-1)*D(i,j,1,2)) read by descending antidiagonals: D(i,j,s,n) denotes the determinant of the matrix described in Comments.

Original entry on oeis.org

1, 4, 3, 8, 7, 6, 13, 12, 11, 10, 19, 18, 17, 16, 15, 26, 25, 24, 23, 22, 21, 34, 33, 32, 31, 30, 29, 28, 43, 42, 41, 40, 39, 38, 37, 36, 53, 52, 51, 50, 49, 48, 47, 46, 45, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66
Offset: 1

Views

Author

Clark Kimberling, Jan 31 2025

Keywords

Comments

Suppose that (m(i,j)) is a rectangular array of infinitely many rows and infinitely many columns. For integers s>=1 and n>=1, let M(i,j,s,n) be the nXn matrix (m(i+h*s,j+k*s)), where h=0..n-1, k=0..n-1.
Let D(i,j,s,n) and P(i,j,s,n) denote the determinant and permanent of M(i,j,s,n), respectively. For A380649, we take (m(i,j)) to be the natural number array (see A000027, A185787, and A144112), and ((-1)*D(i,j,1,2)) is as shown below in Example.
* D(i,j,1,1) = M(i,j,1,1) = m(i,j) has linearly recurrent row sequences, all with signature (3,-3,1).
* D(i,j,1,2) has linearly recurrent row sequences, all with signature (3,-3,1).
* (-1)*D(i,j,s,3) is the constant array in which every term is s^6, for all i,j,s.
* D(i,j,s,n) is the constant 0 array for all n>=4, for all i,j,s.
* P(i,j,s,n) depends only on n, and the rows all have the following linear recurrence signature:
b(2n+1,1), - b(2n+1,2), b(2n+1-3),..., -(2n+1,2n), 1, where b=binomial.
((-1)*D(i,j,1,2)) includes, exactly once, every positive integer not in A000096. The order array of ((-1)*D(i,j,1,2)) is the array in Example in A038722; see A333029 for the definition of order array.

Examples

			Corner of (-1)*D(i,j,1,2):
   1   4    8   13   19   26   34   43   53   64   76   89
   3   7   12   18   25   33   42   52   63   75   88  102
   6  11   17   24   32   41   51   62   74   87  101  116
  10  16   23   31   40   50   61   73   86  100  115  131
  15  22   30   39   49   60   72   85   99  114  130  147
  21  29   38   48   59   71   84   98  113  129  146  164
  28  37   47   58   70   83   97  112  128  145  163  182
  36  46   57   69   82   96  111  127  144  162  181  201
  45  56   68   81   95  110  126  143  161  180  200  221
  55  67   80   94  109  125  142  160  179  199  220  242
  66  79   93  108  124  141  159  178  198  219  241  264
  78  92  107  123  140  158  177  197  218  240  263  287
m(1,1) = 1, so M(1,1,1,2) is the matrix having (row 1) = (1,2) and (row 2) = (3,5), so (-1)*D(1,1,1,2) = -(1*5-2*3) = 1.
		

Crossrefs

Programs

  • Mathematica
    s = 1; n = 2; z = 12;
    r[n_, k_] := n + (n + k - 2)*(n + k - 1)/2;
    Grid[Table[r[n, k], {n, 1, z}, {k, 1, z}]]  (* Array A000027 *)
    FindLinearRecurrence[Table[r[1, k], {k, 1, 20}]]
    t[i_, j_] := Table[r[i, j + k*s], {k, 0, n - 1}];
    d[i_, j_] := -Det[Table[t[i + k*s, j], {k, 0, n - 1}]];  (* (-1)*D(i,j,s,n) *)
    Grid[Table[d[i, j], {i, 1, z}, {j, 1, z}]]  (* array *)
    FindLinearRecurrence[Table[d[12, k], {k, 1, 20}]]
    Table[d[k, m - k], {m, 2, z}, {k, 1, m - 1}] // Flatten (* sequence *)

A182194 a(1)=2, a(n)=a(n-1)^2 if the minimal natural number > 1 not yet in the sequence is greater than a(n-1), else a(n)=a(n-1)-1.

Original entry on oeis.org

2, 4, 3, 9, 8, 7, 6, 5, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54
Offset: 1

Views

Author

Hieronymus Fischer, Apr 30 2012

Keywords

Comments

A reordering of the natural numbers > 1.
The sequence is quasi self-inverse in that a(a(n-1)-1)=n.

Examples

			a(2)=4=a(1)^2, since 3>2=a(1) is the minimal number not yet in the sequence (because of a(1)=2);
a(15)=19=a(14)-1, since the minimal number not yet in the sequence (=10) is <=a(14)=20.
a(10^4)=b(8)+b(7)-10^4-2=877.
a(10^6)=b(10)+b(9)-10^6-2= 103539133.
		

Crossrefs

Formula

a(n)=a(n-1)-1, if a(n-1)-1 > 1 is not in the set {a(k)| 1<=k<=n-1}, else a(n)=a(n-1)^2.
a(a(n)-1)=n+1.
If we define b(1)=2, b(2)=3, b(k)=b(k-2)^2+1, we get the sequence 2, 3, 5, 10, 26, 101, 677, 10202, 458330, 104080805, …. The b(k) are those terms a(n) of the original sequence for which a(n+1)=a(n)^2.
With these b(k) we obtain for k>1:
a(b(k)-2)=b(k-1),
a(b(k)-1)=b(k-1)^2.
a(b(k))=b(k-1)^2 - 1.
a(n)=b(m)+b(m-1)-n-2, where m is the least index such that b(m)>n+1 (valid for n>=1).

A210882 a(1)=1, a(n)=a(n-1)-1 if a(n-1)-1 > 0 is not in the set {a(k)| 1<=k

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 6, 11, 10, 9, 8, 13, 12, 17, 16, 15, 14, 19, 18, 23, 22, 21, 20, 29, 28, 27, 26, 25, 24, 31, 30, 37, 36, 35, 34, 33, 32, 41, 40, 39, 38, 43, 42, 47, 46, 45, 44, 53, 52, 51, 50, 49, 48, 59, 58, 57, 56, 55, 54, 61, 60, 67, 66, 65, 64, 63, 62, 71
Offset: 1

Views

Author

Hieronymus Fischer, Apr 30 2012

Keywords

Comments

A reordering of the natural numbers.
The sequence is self-inverse in that a(a(n))=n.
If n is a prime, then a(n+1) is the next prime > n. Hence, the subsequence 2, a(2+1), a(a(2+1)+1), a(a(a(2+1)+1)+1), a(a(a(a(2+1)+1)+1)+1), ... generates the sequence of primes A000040.

Examples

			a(4)=5, since 5 is the least prime > a(1), a(2), a(3), and the minimal number not yet in the sequence (=4) is greater than 3=a(3).
a(5)=4, since 4 is not in the set {1,2,3,5}={a(k)| 1<=k<n}.
7=p(4)=a(p(3)+1)=a(a(p(2)+1)+1)= a(a(a(p(1)+1)+1)+1)= a(a(a(2+1)+1)+1).
		

Crossrefs

Formula

a(1)=1, a(n)=p (where p is the least prime number > a(k) for 1<=k
a(n)<>n for all n>3.
p(n+1)=a(p(n)+1), where p(n) is the n-th prime.
a(n+1)=p(m+2), if a(n)-1 is the m-th prime, else a(n+1)=a(n)-1, for n>2.
a(n)=p(m)+p(m-1)-n+1, where m is the least index such that p(m)>n-1 (valid for n>2).

A275724 Transpose of square array A275723.

Original entry on oeis.org

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

Author

Antti Karttunen, Aug 09 2016

Keywords

Comments

See A275723.

Crossrefs

Transpose: A275723.

Programs

Formula

a(n) = A275723(A038722(n)). [When A275723 and A275724 are considered as one-dimensional sequences.]

A286238 Triangle A286239 reversed.

Original entry on oeis.org

1, 2, 1, 4, 0, 3, 7, 0, 2, 3, 11, 0, 0, 0, 10, 16, 0, 0, 4, 5, 3, 22, 0, 0, 0, 0, 0, 21, 29, 0, 0, 0, 7, 0, 5, 10, 37, 0, 0, 0, 0, 0, 8, 0, 21, 46, 0, 0, 0, 0, 11, 0, 0, 14, 10, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 67, 0, 0, 0, 0, 0, 16, 0, 12, 8, 5, 10, 79, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 78, 92, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 27, 21, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 19, 0, 36
Offset: 1

Author

Antti Karttunen, May 06 2017

Keywords

Comments

See A286239.

Examples

			The first fifteen rows of triangle:
    1,
    2, 1,
    4, 0, 3,
    7, 0, 2, 3,
   11, 0, 0, 0, 10,
   16, 0, 0, 4,  5, 3,
   22, 0, 0, 0,  0,  0, 21,
   29, 0, 0, 0,  7,  0,  5, 10,
   37, 0, 0, 0,  0,  0,  8,  0, 21,
   46, 0, 0, 0,  0, 11,  0,  0, 14, 10,
   56, 0, 0, 0,  0,  0,  0,  0,  0,  0, 55,
   67, 0, 0, 0,  0,  0, 16,  0, 12,  8,  5, 10,
   79, 0, 0, 0,  0,  0,  0,  0,  0,  0,  0,  0, 78,
   92, 0, 0, 0,  0,  0,  0, 22,  0,  0,  0,  0, 27, 21,
  106, 0, 0, 0,  0,  0,  0,  0,  0,  0, 17,  0, 19,  0, 36
		

Crossrefs

Transpose: A286239 (triangle reversed).

Programs

  • Python
    from sympy import totient
    def T(n, m): return ((n + m)**2 - n - 3*m + 2)//2
    def t(n, k): return 0 if n%k!=0 else T(totient(n//k), k)
    for n in range(1, 21): print([t(n, k) for k in range(1, n + 1)][::-1]) # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A286238 n) (A286239tr (A002024 n) (A038722 n))) ;; For A286239tr see A286239.
    

Formula

T(n,k) = A286239(k,n).

A307693 Rectangular quotient array, R, of A003188 read by descending antidiagonals; see Comments.

Original entry on oeis.org

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

Author

Clark Kimberling, Oct 26 2019

Keywords

Comments

Suppose that P = (p(m)) is a permutation of the positive integers, such as A038722. For each n >= 1, let q(n,k) be the k-th index m such that n divides p(m), and let r(n) = p(q(n,k))/n. Let R be the array having (r(n)) as row n. We call R the quotient array of P. Every row of R is a permutation of the positive integers.
In the present case that P = A003188, every row occurs infinitely many times. Specifically, if p is a prime (A000040), then for every multiple m*p of p, the rows numbered m*p are identical. See A327314 for the array that results by deleting duplicate rows from R.

Examples

			A003188 = (1, 3, 2, 6, 7, 5, 4, 12, 13, 15, 14, 10, 11, 9, 8, 24, 25, 27, 26, 30, 31, 29, 28, 20, ...)
Row 1 of R is just A003188. To get row 2 of R, skip the odds in A003188 and divide the evens by 2; row 2 equals row 1. Generally, to get row n, divide A003188 by n and then delete the non-integers.
________________
Northwest corner of R:
  1   3   2   6   7   5    4   12   13   15
  1   3   2   6   7   5    4   12   13   15
  1   2   4   5   3   8    9   10    7    6
  1   3   2   6   7   5    4   12   13   15
  1   3   2   5   6   4   10   11   12    8
  1   2   4   5   3   8    9   10    7    6
		

Crossrefs

Programs

  • Mathematica
    s = Table[BitXor[n, Floor[n/2]], {n, 300}]  (* A003188 *)
    g[n_] := Flatten[Position[Mod[s, n], 0]];
    u[n_] := s[[g[n]]]/n;
    TableForm[Table[Take[u[n], 10], {n, 1, 20}]]  (* A307693 array *)
    v[n_, k_] := u[n][[k]]
    Table[v[n - k + 1, k], {n, 14}, {k, n, 1, -1}] // Flatten (* A307693 sequence *)

A367844 Triangle read by rows: T(n, k) = (n+5)*n/2 + 1 + (n^2 mod 3) - 3*k for 0 <= k <= n.

Original entry on oeis.org

1, 5, 2, 9, 6, 3, 13, 10, 7, 4, 20, 17, 14, 11, 8, 27, 24, 21, 18, 15, 12, 34, 31, 28, 25, 22, 19, 16, 44, 41, 38, 35, 32, 29, 26, 23, 54, 51, 48, 45, 42, 39, 36, 33, 30, 64, 61, 58, 55, 52, 49, 46, 43, 40, 37, 77, 74, 71, 68, 65, 62, 59, 56, 53, 50, 47, 90, 87, 84, 81, 78, 75, 72, 69, 66, 63, 60, 57
Offset: 0

Author

Werner Schulte, Dec 02 2023

Keywords

Comments

This triangle read by rows yields a permutation of the natural numbers.

Examples

			Triangle T(n, k) for 0 <= k <= n starts:
n\k :    0    1   2   3   4   5   6   7   8   9  10  11  12
===========================================================
 0  :    1
 1  :    5    2
 2  :    9    6   3
 3  :   13   10   7   4
 4  :   20   17  14  11   8
 5  :   27   24  21  18  15  12
 6  :   34   31  28  25  22  19  16
 7  :   44   41  38  35  32  29  26  23
 8  :   54   51  48  45  42  39  36  33  30
 9  :   64   61  58  55  52  49  46  43  40  37
10  :   77   74  71  68  65  62  59  56  53  50  47
11  :   90   87  84  81  78  75  72  69  66  63  60  57
12  :  103  100  97  94  91  88  85  82  79  76  73  70  67
etc.
		

Crossrefs

Programs

  • Maple
    gf := (t^2*x-t*x-t-2)/(3*(t^2+t+1)*(t^2*x^2+t*x+1))+(5*t^2-10*t+8)/(3*(t-1)^3* (t*x-1))+(3*t-2)/((t-1)^2*(t*x-1)^2)+1/((t-1)*(t*x-1)^3):
    sert := series(gf, t, 18): px := n -> simplify(coeff(sert, t, n)):
    row := n -> local k; seq(coeff(px(n), x, k), k = 0..n):
    for n from 0 to 12 do row(n) od;  # Peter Luschny, Dec 02 2023
  • Mathematica
    T[n_, k_]:=(n+5)*n/2+1+Mod [n^2 ,3]-3*k; Table[T[n,k],{n,0,11},{k,0,n}] //Flatten (* Stefano Spezia, Dec 03 2023 *)
  • PARI
    T(n,k) = (n+5)*n/2+1+(n^2%3)-3*k
    
  • Python
    def A367844Row(n):
        Tn0 = (n + 5) * n // 2 + n ** 2 % 3 + 1
        return [Tn0 - k * 3 for k in range(n + 1)]
    for n in range(9): print(A367844Row(n))  # Peter Luschny, Dec 03 2023
    
  • Python
    from math import isqrt, comb
    def A367844(n): return ((a:=(m:=isqrt(k:=n+1<<1))-(k<=m*(m+1)))*(a+5)>>1)+1+a**2%3-3*(n-comb(a+1,2)) # Chai Wah Wu, Nov 12 2024

Formula

T(n, 0) = (n+5)*n/2 + 1 + (n^2 mod 3) for n >= 0.
T(n, n) = (n-1)*n/2 + 1 + (n^2 mod 3) for n >= 0.
T(2*n, n) = 2*n*(n+1) + 1 + (n^2 mod 3) for n >= 0.
T(n, k) - T(n, k+1) = m = 3 for 0 <= k < n (compare with A109857 where m = 2 and with A038722, seen as a triangle, where m = 1).
G.f. of column k = 0: F(t, 0) = Sum_{n>=0} T(n, 0) * t^n = (1 + 3*t - t^3) / ((1 - t^3) * (1 - t)^2).
G.f.: F(t, x) = Sum_{n>=0, k=0..n} T(n, k) * x^k * t^n = (F(t, 0) - x * F(x*t, 0)) / (1 - x) - 3*x*t / ((1 - t) * (1 - x*t)^2).
Row sums are A006003(n+1) + (n^2 mod 3) * (n+1) for n >= 0.

A091265 Take sequence of prime numbers (A000040) and reverse successive subsequences of lengths 1,2,3,4,...

Original entry on oeis.org

2, 5, 3, 13, 11, 7, 29, 23, 19, 17, 47, 43, 41, 37, 31, 73, 71, 67, 61, 59, 53, 107, 103, 101, 97, 89, 83, 79, 151, 149, 139, 137, 131, 127, 113, 109, 197, 193, 191, 181, 179, 173, 167, 163, 157, 257, 251, 241, 239, 233, 229, 227, 223, 211, 199, 317, 313, 311, 307
Offset: 1

Author

Felix Tubiana, Feb 23 2004

Keywords

Crossrefs

Programs

  • Maple
    S:= ListTools:-PartialSums([$1..20]):
    P:= [seq(ithprime(i),i=1..S[-1])]:
    map(op, [[P[1]],seq(ListTools:-Reverse(P[S[i]+1..S[i+1]]),i=1..nops(S)-1)]); # Robert Israel, Sep 04 2017

Formula

a(n) = A000040(A038722(n)). - M. F. Hasler, Aug 24 2014

Extensions

Offset changed from 0 to 1 by M. F. Hasler, Aug 24 2014
Previous Showing 21-30 of 32 results. Next