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

A220508 T(n,k) = n^2 + k if k <= n, otherwise T(n,k) = k*(k + 2) - n; square array T(n,k) read by ascending antidiagonals (n >= 0, k >= 0).

Original entry on oeis.org

0, 1, 3, 4, 2, 8, 9, 5, 7, 15, 16, 10, 6, 14, 24, 25, 17, 11, 13, 23, 35, 36, 26, 18, 12, 22, 34, 48, 49, 37, 27, 19, 21, 33, 47, 63, 64, 50, 38, 28, 20, 32, 46, 62, 80, 81, 65, 51, 39, 29, 31, 45, 61, 79, 99, 100, 82, 66, 52, 40, 30, 44, 60, 78, 98, 120
Offset: 0

Views

Author

Omar E. Pol, Feb 09 2013

Keywords

Comments

This sequence consists of 0 together with a permutation of the natural numbers. The nonnegative integers (A001477) are arranged in the successive layers from T(0,0) = 0. The n-th layer start with T(n,1) = n^2. The n-th layer is formed by the first n+1 elements of row n and the first n elements in increasing order of the column n.
The first antidiagonal is formed by odd numbers: 1, 3. The second antidiagonal is formed by even numbers: 4, 2, 8. The third antidiagonal is formed by odd numbers: 9, 5, 7, 15. And so on.
It appears that in the n-th layer there is at least a prime number <= g and also there is at least a prime number > g, where g is the number on the main diagonal, the n-th oblong number A002378(n), if n >= 1.

Examples

			The second layer is [4, 5, 6, 7, 8] which looks like this:
  .  .  8
  .  .  7,
  4, 5, 6,
Square array T(0,0)..T(10,10) begins:
    0,   3,   8,  15,  24,  35,  48,  63,  80,  99, 120,...
    1,   2,   7,  14,  23,  34,  47,  62,  79,  98, 119,...
    4,   5,   6,  13,  22,  33,  46,  61,  78,  97, 118,...
    9,  10,  11,  12,  21,  32,  45,  60,  77,  96, 117,...
   16,  17,  18,  19,  20,  31,  44,  59,  76,  95, 118,...
   25,  26,  27,  28,  29,  30,  43,  58,  75,  94, 117,...
   36,  37,  38,  39,  40,  41,  42,  57,  74,  93, 114,...
   49,  50,  51,  52,  53,  54,  55,  56,  73,  92, 113,...
   64,  65,  66,  67,  68,  69,  70,  71,  72,  91, 112,...
   81,  82,  83,  84,  85,  86,  87,  88,  89,  90, 111,...
  100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110,...
  ...
		

Crossrefs

Column 1 is A000290. Main diagonal is A002378. Column 2 is essentially A002522. Row 1 is A005563. Row 2 gives the absolute terms of A008865.

Formula

From Petros Hadjicostas, Mar 10 2021: (Start)
T(n,k) = (A342354(n,k) - 1)/2.
O.g.f.: (x^4*y^3 + 3*x^3*y^4 + x^4*y^2 - 10*x^3*y^3 - x^2*y^4 + 3*x^3*y^2 + x^2*y^3 - 4*x^3*y + 8*x^2*y^2 + 3*x^2*y + x*y^2 + x^2 - 10*x*y - y^2 + x + 3*y)/((1 - x)^3*(1 - y)^3*(1 - x*y)^2). (End)

Extensions

Name edited by Petros Hadjicostas, Mar 10 2021

A213928 Natural numbers placed in table T(n,k) layer by layer. The order of placement - at the beginning 2 layers counterclockwise, next 1 layer clockwise and so on. T(n,k) read by antidiagonals.

Original entry on oeis.org

1, 4, 2, 5, 3, 9, 16, 6, 8, 10, 25, 15, 7, 11, 17, 26, 24, 14, 12, 18, 36, 49, 27, 23, 13, 19, 35, 37, 64, 48, 28, 22, 20, 34, 38, 50, 65, 63, 47, 29, 21, 33, 39, 51, 81, 100, 66, 62, 46, 30, 32, 40, 52, 80, 82, 121, 99, 67, 61, 45, 31, 41, 53, 79, 83, 101
Offset: 1

Views

Author

Boris Putievskiy, Mar 06 2013

Keywords

Comments

Permutation of the natural numbers. a(n) is a pairing function: a function that reversibly maps Z^{+} x Z^{+} onto Z^{+}, where Z^{+} is the set of integer positive numbers.In general, let b(z) be a sequence of integer numbers. Layer is pair of sides of square from T(1,n) to T(n,n) and from T(n,n) to T(n,1). Natural numbers placed in table T(n,k) layer by layer. The order of placement - layer is counterclockwise, if b(z) is odd; layer is clockwise if b(z) is even. T(n,k) read by antidiagonals.For A219159 - the order of the placement - at the beginning m layers counterclockwise, next m layers clockwise and so on - b(z)=floor((z-1)/m)+1. For this sequence b(z)=z^2 mod 3.

Examples

			The start of the sequence as table.
The direction of the placement denotes by ">" and  "v".
  ..........v...........v...........v
  >1....4...5..16..25..26..49..64..65...
  >2....3...6..15..24..27..48..63..66...
  .9....8...7..14..23..28..47..62..67...
  >10..11..12..13..22..29..46..61..68...
  >17..18..19..20..21..30..45..60..69...
  .36..35..34..33..32..31..44..59..70...
  >37..38..39..40..41..42..43..58..71...
  >50..51..52..53..54..55..56..57..72...
  .81..80..79..78..77..76..75..74..73...
  . . .
The start of the sequence as triangle array read by rows:
  1;
  4,2;
  5,3,9;
  16,6,8,10;
  25,15,7,11,17;
  26,24,14,12,18,36;
  49,27,23,13,19,35,37;
  64,48,28,22,20,34,38,50;
  65,63,47,29,21,33,39,51,81;
  . . .
		

Crossrefs

Programs

  • Python
    t=int((math.sqrt(8*n-7) - 1)/ 2)
    i=n-t*(t+1)/2
    j=(t*t+3*t+4)/2-n
    if j>=i:
       result=((1+(-1)**(j**2%3-1))*(j**2-i+1)-(-1+(-1)**(j**2%3-1))*((j-1)**2 +i))/2
    else:
       result=((1+(-1)**(i**2%3))*(i**2-j+1)-(-1+(-1)**(i**2%3))*((i-1)**2 +j))/2

Formula

For general case.
As table
T(n,k) = ((1+(-1)^(b(k)-1))*(k^2-n+1)-(-1+(-1)^(b(k)-1))*((k-1)^2 +n))/2, if k >= n;
T(n,k) = ((1+(-1)^b(n))*(n^2-k+1)-(-1+(-1)^b(n))*((n-1)^2 +k))/2, if n >k.
As linear sequence
a(n) = ((1+(-1)^(b(j)-1))*(j^2-i+1)-(-1+(-1)^(b(j)-1))*((j-1)^2 +i))/2, if j >= i;
a(n) = ((1+(-1)^b(i))*(i^2-j+1)-(-1+(-1)^b(i))*((i-1)^2 +j))/2, if i >j;
where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2).
For this sequence b(z)=z^2 mod 3.
As table
T(n,k) = ((1+(-1)^(k^2 mod 3-1))*(k^2-n+1)-(-1+(-1)^(k^2 mod 3-1))*((k-1)^2 +n))/2, if k >= n;
T(n,k) = ((1+(-1)^(n^2 mod 3))*(n^2-k+1)-(-1+(-1)^(n^2 mod 3))*((n-1)^2 +k))/2, if n >k.
As linear sequence
a(n) = ((1+(-1)^(j^2 mod 3-1))*(j^2-i+1)-(-1+(-1)^(j^2 mod 3-1))*((j-1)^2 +i))/2, if j >= i;
a(n) = ((1+(-1)^(i^2 mod 3))*(i^2-j+1)-(-1+(-1)^(i^2 mod 3))*((i-1)^2 +j))/2, if i >j;
where i=n-t*(t+1)/2, j=(t*t+3*t+4)/2-n, t=floor((-1+sqrt(8*n-7))/2).

A222030 Primes and quarter-squares.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 12, 13, 16, 17, 19, 20, 23, 25, 29, 30, 31, 36, 37, 41, 42, 43, 47, 49, 53, 56, 59, 61, 64, 67, 71, 72, 73, 79, 81, 83, 89, 90, 97, 100, 101, 103, 107, 109, 110, 113, 121, 127, 131, 132, 137, 139, 144, 149, 151, 156, 157, 163, 167, 169
Offset: 0

Views

Author

Omar E. Pol, Feb 05 2013

Keywords

Comments

Union of A002620 and A000040.
It appears that there is always a prime between two consecutive quarter squares, if n >= 2. Therefore in a square spiral, or zig-zag, whose vertices are the quarter-squares, it appears that there is always a prime between two consecutive vertices, if n >= 2.
Apparently the above comment is equivalent to the Oppermann's conjecture. - Omar E. Pol, Oct 26 2013
Union of A000040 and A000290 and A002378. - Omar E. Pol, Oct 28 2013

Crossrefs

Programs

  • Mathematica
    mx = 13; Union[Prime[Range[PrimePi[mx^2]]], Floor[Range[2*mx]^2/4]] (* Alonso del Arte, Mar 03 2013 *)

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Mar 04 2013
Showing 1-3 of 3 results.