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

A057059 Let R(i,j) be the rectangle with antidiagonals 1; 2,3; 4,5,6; ... Define i(m) and j(m) by R(i(m),j(m)) = m. Then a(n) = j(A057027(n)).

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jul 30 2000

Keywords

Comments

Since A057027 is a permutation of the natural numbers, every natural number occurs in this sequence infinitely many times.
Triangle of spiral permutations. In the Saclolo reference sigma_n(x) is called a spiral permutation. - Michael Somos, Apr 21 2011
Second inverse function (numbers of columns) for pairing function A194982. - Boris Putievskiy, Jan 10 2013
The triangle T(n, k) (see the formula by Michael Somos) has in row n a certain permutation of [1, 2, ..., n]. This permutation is useful for the proof of the identity Product_{k=1..n} f(sin(Pi*k/(2*n+1))) = Product_{m=1..n} f(sin(2*Pi*m/(2*n+1))) for any function f, n >= 1 (also for n = 0). The permutation of the arguments of f goes via m = T(n, k), and this is due to sin(Pi-x) = sin(x). Of course, one can replace the product by a sum in this identity. The product identity is used in a trivial variant of Eisenstein's proof of the quadratic reciprocity law. See the W. Lang Aug 28 2016 comment under A049310. - Wolfdieter Lang, Aug 28 2016
For the proof of the (slightly extended) conjecture stated in the formula section by L. Edson Jeffery see the W. Lang link. - Wolfdieter Lang, Sep 14 2016

Examples

			Formatted as a triangle T(n, k) (see Michael Somos' formula):
n, 2n+1\k 1 2  3 4  5 6  7 8  9 10 11 12 ..
1,   3:   1
2,   5:   2 1
3,   7:   3 1  2
4,   9:   4 1  3 2
5,  11:   5 1  4 2  3
6,  13:   6 1  5 2  4 3
7,  15:   7 1  6 2  5 3  4
8,  17:   8 1  7 2  6 3  5 4
9,  19:   9 1  8 2  7 3  6 4  5
10, 21:  10 1  9 2  8 3  7 4  6  5
11, 23:  11 1 10 2  9 3  8 4  7  5  6
12, 25:  12 1 11 2 10 3  9 4  8  5  7  6
... formatted by _Wolfdieter Lang_, Aug 28 2016
n=4: sin identity: sin(Pi*k/9) = sin(2*Pi*T(4, k)/9), for k = 1, ..., n. That is: sin(Pi*1/9) = sin(2*Pi*4/9) = sin(Pi*(1 - 8/9)), sin(Pi*3/9) = sin(2*Pi*3/9) = sin(Pi*(1 - 6/9)). For even k this is trivial. - _Wolfdieter Lang_, Aug 28 2016
		

Crossrefs

Cf. A057058, A194982; related to A141419.

Programs

  • Mathematica
    Table[If[OddQ@ k, n - (k - 1)/2, k/2], {n, 12}, {k, n}] // Flatten (* Michael De Vlieger, Aug 28 2016 *)
  • PARI
    {T(n, k) = if( k<1 || k>n, 0, if( k%2, n - (k - 1) / 2, k / 2))} /* Michael Somos, Apr 21 2011 */

Formula

T(n, k) = k / 2 if k is even, n - (k - 1) / 2 if k is odd where 0 < k <= n are integers. - Michael Somos, Apr 21 2011
(Conjecture) Define the Chebyshev polynomials of the second kind by U_0(t) = 1, U_1(t) = 2*t, and U_r(t) = 2*t*U_(r-1)(t) - U_(r-2)(t) (r>1). Then T(n,k) = Sum_{j=1..n} U_(k-1)(cos((2*j-1)*Pi/(2*n+1))), 1<=k<=n. - L. Edson Jeffery, Jan 09 2012 (See the Sep 14 2016 comment above.)
From Boris Putievskiy, Jan 10 2013: (Start)
a(n) = -(A004736(n)+(A002260(n)-1)/2)*((-1)^A002260(n)-1)/2+(A002260(n)/2)*((-1)^A002260(n)+1)/2.
a(n) = -(j+(i-1)/2)*((-1)^i-1)/2+(i/2)*((-1)^i+1)/2, where i = n-t*(t+1)/2, j = (t*t+3*t+4)/2-n, t = floor((-1+sqrt(8*n-7))/2). (End)

A177731 Numbers which can be written as a sum of consecutive numbers, where the largest term in the sum is an odd number >= 3.

Original entry on oeis.org

5, 6, 9, 12, 13, 14, 15, 17, 18, 21, 22, 24, 25, 27, 28, 29, 30, 33, 35, 36, 37, 38, 39, 41, 42, 44, 45, 46, 48, 49, 51, 53, 54, 55, 56, 57, 60, 61, 62, 63, 65, 66, 69, 70, 72, 73, 75, 76, 77, 78, 81, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102
Offset: 1

Views

Author

Keywords

Comments

Numbers of the form sum_{i=j..2k+1} i where j>=1 and 2k+1>j and k>=1. Numbers of the form (2k+1+j)*(2k+2-j)/2, j>=1, k>=1, 2k+1>j. - R. J. Mathar, Dec 04 2011
Subsequences include the A000384 where >=6, the A014106 where >=5, A071355 where >=12, A130861 where >=9, A139577 where >=13, A139579 where >=17 etc. The sequence is the union of all odd-indexed rows of A141419, except its first column and numbers <=3: {5,6}, {9,12,14,15}, {13,18,22,25,27,28}, ... - R. J. Mathar, Dec 04 2011
Does this sequence have asymptotic density 1? - Robert Israel, Nov 27 2018

Examples

			5=2+3, 6=1+2+3, 9=4+5, 12=3+4+5,...
		

Crossrefs

Contains A004766, A017137 and nonzero terms of A008588.
Disjoint from A002145.
Subsequence of A138591.

Programs

  • Maple
    f:= proc(n) local r,k;
      for r in select(t -> (2*t-1)^2 >= 1+8*n, numtheory:-divisors(2*n) minus {2*n}) do
        k:= (r + 2*n/r - 3)/4;
        if k::posint and r >= 2*k+2 then return true fi
      od:
      false
    end proc:
    select(f, [$1..1000]); # Robert Israel, Nov 27 2018
  • Mathematica
    z=200;lst1={};Do[c=a;Do[c+=b;If[c<=2*z,AppendTo[lst1,c]],{b,a-1,1,-1}],{a,1,z,2}];Union@lst1

A070543 Triangular array read by rows: T(n,k) = number of k-dimensional isotropic subspaces of Spin(2n+1,C), n >= 1, 1 <= k <= n.

Original entry on oeis.org

1, 3, 3, 5, 7, 6, 7, 11, 12, 10, 9, 15, 18, 18, 15, 11, 19, 24, 26, 25, 21, 13, 23, 30, 34, 35, 33, 28, 15, 27, 36, 42, 45, 45, 42, 36, 17, 31, 42, 50, 55, 57, 56, 52, 45, 19, 35, 48, 58, 65, 69, 70, 68, 63, 55, 21, 39, 54, 66, 75, 81, 84, 84, 81, 75, 66, 23, 43, 60, 74, 85, 93
Offset: 1

Views

Author

Michael Somos, Apr 28 2002

Keywords

Examples

			Rows:
   1;
   3,  3;
   5,  7,  6;
   7, 11, 12, 10;
   9, 15, 18, 18, 15;
  11, 19, 24, 26, 25, 21;
  ...
		

Crossrefs

Cf. A141419.

Programs

  • GAP
    Flat(List([1..12], n-> List([1..n], k-> k*(k+1 + 4*(n-k))/2 ))); # G. C. Greubel, Sep 05 2019
  • Magma
    [k*(k+1 + 4*(n-k))/2: k in [1..n], n in [1..12]]; // G. C. Greubel, Sep 05 2019
    
  • Maple
    T:=(n,k) -> k*(k+1)/2+2*k*(n-k); r:=n->[seq(T(n,k),k=1..n)]; for r from 1 to 12 do lprint(r(n)); od: # N. J. A. Sloane, Aug 21 2019
  • Mathematica
    nmax = 12; t[n_, k_] := If[k < 1 || k > n, 0, k*(k+1)/2 + 2*k*(n-k)]; Flatten[ Table[t[n , k], {n, 1, nmax}, {k, 1, n}]] (* Jean-François Alcover, Oct 19 2011, after PARI *)
  • PARI
    {T(n, k) = if( k<1 || k>n, 0, k * (k + 1) / 2 + 2 * k * (n - k))}
    
  • Sage
    [[k*(k+1 + 4*(n-k))/2 for k in (1..n)] for n in (1..12)] # G. C. Greubel, Sep 05 2019
    

Formula

T(n, k) = k*(k+1)/2 + 2*k*(n-k) if 0 < k <= n.
G.f.: (1+x-2*x^2*y)/((1-x)^2*(1-x*y)^3). - Vladeta Jovovic, Mar 05 2004
T(n, k) = A141419(2*n-k, k). - Peter Munn, Aug 21 2019

Extensions

Offset changed to 1 by N. J. A. Sloane, Aug 21 2019

A218621 a(n) = unique divisor d of n such that d + (n/d - 1)/2 is minimal and integral.

Original entry on oeis.org

1, 2, 1, 4, 1, 2, 1, 8, 3, 2, 1, 4, 1, 2, 3, 16, 1, 2, 1, 4, 3, 2, 1, 8, 5, 2, 3, 4, 1, 6, 1, 32, 3, 2, 5, 4, 1, 2, 3, 8, 1, 6, 1, 4, 5, 2, 1, 16, 7, 10, 3, 4, 1, 6, 5, 8, 3, 2, 1, 4, 1, 2, 7, 64, 5, 6, 1, 4, 3, 10, 1, 8, 1, 2, 5, 4, 7, 6, 1, 16, 9, 2, 1, 4, 5
Offset: 1

Views

Author

L. Edson Jeffery, Feb 18 2013

Keywords

Comments

Differs from A079891 starting at a(18).
For integers M, k, with 0<=k<=M, consider a representation of n as n = T(M) - T(M-k) = M + (M-1) + ... + (M-k+1), in which k is maximal, where T(r) = r*(r+1)/2 is the r-th triangular number. Then k = A109814(n), and M = A212652(n) = a(n) + (n/a(n) - 1)/2 is minimal.
Conjecture. For n, p, v, j natural numbers, the conditions on a(n) seem to be the following:
1. If n is an odd prime, then a(n) = 1.
2. If n is odd and composite, then
a(n) = max(p : p | n, p <= sqrt(n), p is a prime).
3. If n is equal to a power of 2, then a(n) = n.
4. If n = 2^j*v, with v odd, v>1 and j>1, then a(n) = 2^j.
5. If n = 2*v, with v odd and composite, then
a(n) = 2*p, where p is the least prime such that p | v.
6. If n = 2*p, for p an odd prime, then a(n) = 2.

Crossrefs

Programs

  • Mathematica
    Table[d = Divisors[n]; mn = Infinity; best = 0; Do[q = i + (n/i - 1)/2; If[IntegerQ[q] && q < mn, mn = q; best = i], {i, d}]; best, {n, 100}] (* T. D. Noe, Feb 21 2013 *)

A221975 Triangle read by rows of the numbers that are the sum of some consecutive Mersenne numbers A000225.

Original entry on oeis.org

1, 3, 4, 7, 10, 11, 15, 22, 25, 26, 31, 46, 53, 56, 57, 63, 94, 109, 116, 119, 120, 127, 190, 221, 236, 243, 246, 247, 255, 382, 445, 476, 491, 498, 501, 502, 511, 766, 893, 956, 987, 1002, 1009, 1012, 1013, 1023, 1534, 1789, 1916, 1979, 2010, 2025, 2032, 2035, 2036
Offset: 1

Views

Author

Omar E. Pol, Feb 12 2013

Keywords

Examples

			Triangle begins:
1;
3,     4;
7,    10,  11;
15,   22,  25,  26;
31,   46,  53,  56,  57;
63,   94, 109, 116, 119, 120;
127, 190, 221, 236, 243, 246, 247;
255, 382, 445, 476, 491, 498, 501, 502;
...
		

Crossrefs

Column 1 is A000225. Right border gives the positive terms of A000295.

Formula

T(n,k) = sum_{j = n-k+1..n} 2^j - 1, n>=1, k>=1.
T(n,n) = A000295(n+1).

A386319 Triangle read by rows where row n is the start, corner and end vertex numbers of a triangular spiral with n sides on a triangular grid, starting from 1 and working inwards (0 <= k <= n).

Original entry on oeis.org

1, 1, 1, 1, 2, 3, 1, 3, 5, 6, 1, 4, 7, 9, 10, 1, 5, 9, 12, 14, 15, 1, 6, 11, 15, 18, 20, 21, 1, 7, 13, 18, 22, 25, 27, 28, 1, 8, 15, 21, 26, 30, 33, 35, 36, 1, 9, 17, 24, 30, 35, 39, 42, 44, 45, 1, 10, 19, 27, 34, 40, 45, 49, 52, 54, 55, 1, 11, 21, 30, 38, 45, 51, 56, 60, 63, 65, 66, 1, 12, 23, 33, 42, 50, 57, 63, 68, 72, 75, 77, 78
Offset: 0

Views

Author

Binay Krishna Maity, Jul 18 2025

Keywords

Comments

The first 2 sides are length n-1 so that T(n,1) = 1 + (n-1) and T(n,2) = 1 + 2*(n-1) and then the side lengths decrease by 1 each time as it spirals in (ending at triangular number A000217(n) when n>=1).
These sides mesh to fill the triangle as they go inwards, and can also be thought of going outwards tracing out the sides of the triangle.
The resulting vertex numbers are 1 together with row n of A141419.
Row n=1 is taken as a side of length 0 so the start and end numbers are both 1 (which is not really a spiral but is consistent with the formula and two points 1,2 would be even less like a triangle filled by a spiral).

Examples

			Triangle begins:
--------------------------------------
   n\k  0   1   2   3   4   5   6   7
--------------------------------------
   0|   1;
   1|   1,  1;
   2|   1,  2,  3;
   3|   1,  3,  5,  6;
   4|   1,  4,  7,  9, 10;
   5|   1,  5,  9, 12, 14, 15;
   6|   1,  6, 11, 15, 18, 20, 21;
   7|   1,  7, 13, 18, 22, 25, 27, 28;
  ...
For n = 2 the spiral is 2 sides of length 1 so row [1, 2, 3],
   1 --- 2
       /
     3
For n = 4 the spiral is:
   1  2  3  4
    9  10  5
      8  6
        7
The start, corner and end vertices are [1, 4, 7, 9, 10].
		

Crossrefs

Columns: A000012 (k=0), A000027 (k=1), A144396 (k=3).
Cf. A179865(n+1) (main diagonal), A056520 (row sums).

Programs

  • Mathematica
    T[n_,k_]:=If[k==0,1,k(2n-k+1)/2];Table[T[n,k],{n,0,12},{k,0,n}]//Flatten (* James C. McMahon, Jul 31 2025 *)

Formula

T(n,0) = 1.
T(n,k) = k*(2*n - k + 1)/2 for k >= 1.
Previous Showing 11-16 of 16 results.