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

A176271 The odd numbers as a triangle read by rows.

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 13 2010

Keywords

Comments

A108309(n) = number of primes in n-th row.

Examples

			From _Philippe Deléham_, Oct 03 2011: (Start)
Triangle begins:
   1;
   3,  5;
   7,  9, 11;
  13, 15, 17, 19;
  21, 23, 25, 27, 29;
  31, 33, 35, 37, 39, 41;
  43, 45, 47, 49, 51, 53, 55;
  57, 59, 61, 63, 65, 67, 69, 71;
  73, 75, 77, 79, 81, 83, 85, 87, 89; (End)
		

Crossrefs

Programs

  • Haskell
    a176271 n k = a176271_tabl !! (n-1) !! (k-1)
    a176271_row n = a176271_tabl !! (n-1)
    a176271_tabl = f 1 a005408_list where
       f x ws = us : f (x + 1) vs where (us, vs) = splitAt x ws
    -- Reinhard Zumkeller, May 24 2012
    
  • Magma
    [n^2-n+2*k-1: k in [1..n], n in [1..15]]; // G. C. Greubel, Mar 10 2024
    
  • Maple
    A176271 := proc(n,k)
        n^2-n+2*k-1 ;
    end proc: # R. J. Mathar, Jun 28 2013
  • Mathematica
    Table[n^2-n+2*k-1, {n,15}, {k,n}]//Flatten (* G. C. Greubel, Mar 10 2024 *)
  • SageMath
    flatten([[n^2-n+2*k-1 for k in range(1,n+1)] for n in range(1,16)]) # G. C. Greubel, Mar 10 2024

Formula

T(n, k) = n^2 - n + 2*k - 1 for 1 <= k <= n.
T(n, k) = A005408(n*(n-1)/2 + k - 1).
T(2*n-1, n) = A016754(n-1) (main diagonal).
T(2*n, n) = A000466(n).
T(2*n, n+1) = A053755(n).
T(n, k) + T(n, n-k+1) = A001105(n), 1 <= k <= n.
T(n, 1) = A002061(n), central polygonal numbers.
T(n, 2) = A027688(n-1) for n > 1.
T(n, 3) = A027690(n-1) for n > 2.
T(n, 4) = A027692(n-1) for n > 3.
T(n, 5) = A027694(n-1) for n > 4.
T(n, 6) = A048058(n-1) for n > 5.
T(n, n-3) = A108195(n-2) for n > 3.
T(n, n-2) = A082111(n-2) for n > 2.
T(n, n-1) = A014209(n-1) for n > 1.
T(n, n) = A028387(n-1).
Sum_{k=1..n} T(n, k) = A000578(n) (Nicomachus's theorem).
Sum_{k=1..n} (-1)^(k-1)*T(n, k) = (-1)^(n-1)*A065599(n) (alternating sign row sums).
Sum_{j=1..n} (Sum_{k=1..n} T(j, k)) = A000537(n) (sum of first n rows).

A027726 Numbers k such that k^2+k+9 is a palindrome.

Original entry on oeis.org

0, 1, 9, 11, 13, 22, 30, 31, 138, 300, 304, 305, 331, 438, 969, 1141, 1413, 2367, 3000, 3144, 3881, 9854, 30000, 30605, 72062, 106801, 114141, 125206, 128348, 300000, 315165, 963304, 980560, 989154, 2378507, 3000000, 3040604, 3045679, 3152290, 3932806
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    palQ[n_] := Block[{d = IntegerDigits[n]}, d == Reverse[d]]; f[n_] := n^2 + n + 9; Select[Range[0, 3*10^5], palQ@ f@ # &]

Extensions

More terms from Giovanni Resta, Aug 29 2018

A027727 Palindromes of form k^2 + k + 9.

Original entry on oeis.org

9, 11, 99, 141, 191, 515, 939, 1001, 19191, 90309, 92729, 93339, 109901, 192291, 939939, 1303031, 1997991, 5605065, 9003009, 9887889, 15066051, 97111179, 900030009, 936696639, 5193003915, 11406560411, 13028282031, 15676667651, 16473337461, 90000300009
Offset: 1

Views

Author

Keywords

Comments

Palindromes h such that 4*h - 35 is a square. - Bruno Berselli, Aug 29 2018

Crossrefs

Programs

  • Mathematica
    palQ[n_] := Block[{d = IntegerDigits[n]}, d == Reverse[d]]; f[n_] := n^2 + n + 9; Select[f@ Range[0, 10^5], palQ] (* Giovanni Resta, Aug 29 2018 *)
    Select[Table[k^2+k+9,{k,0,300000}],PalindromeQ] (* Harvey P. Dale, Nov 21 2024 *)

Extensions

More terms from Giovanni Resta, Aug 29 2018

A214870 Natural numbers placed in table T(n,k) layer by layer. The order of placement: at the beginning filled odd places of layer clockwise, next - even places counterclockwise. T(n,k) read by antidiagonals.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 10, 9, 8, 13, 17, 16, 6, 14, 21, 26, 25, 11, 12, 22, 31, 37, 36, 18, 15, 20, 32, 43, 50, 49, 27, 24, 23, 30, 44, 57, 65, 64, 38, 35, 19, 33, 42, 58, 73, 82, 81, 51, 48, 28, 29, 45, 56, 74, 91, 101, 100, 66, 63, 39, 34, 41, 59, 72, 92, 111
Offset: 1

Views

Author

Boris Putievskiy, Mar 11 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.
Layer is pair of sides of square from T(1,n) to T(n,n) and from T(n,n) to T(n,1).
Enumeration table T(n,k) layer by layer. The order of the list:
T(1,1)=1;
T(1,2), T(2,1), T(2,2);
. . .
T(1,n), T(3,n), ... T(n,3), T(n,1); T(n,2), T(n,4), ... T(4,n), T(2,n);
. . .

Examples

			The start of the sequence as table:
   1   2   5  10  17  26 ...
   3   4   9  16  25  36 ...
   7   8   6  11  18  27 ...
  13  14  12  15  24  35 ...
  21  22  20  23  19  28 ...
  31  32  30  33  29  34 ...
  ...
The start of the sequence as triangle array read by rows:
   1;
   2,  3;
   5,  4,  7;
  10,  9,  8, 13;
  17, 16,  6, 14, 21;
  26, 25, 11, 12, 22, 31;
  ...
		

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 i > j:
       result=i*i-i+(j%2)*(2-(j+1)/2)+((j+1)%2)*(j/2+1)
    else:
       result=j*j-2*(i%2)*j + (i%2)*((i+1)/2+1) + ((i+1)%2)*(-i/2+1)

Formula

As table
T(n,k) = k*k-2*(n mod 2)*k+(n mod 2)*((n+1)/2+1)+((n+1) mod 2)*(-n/2+1), if n<=k;
T(n,k) = n*n-n+(k mod 2)*(2-(k+1)/2)+((k+1) mod 2)*(k/2+1), if n>k.
As linear sequence
a(n) = j*j-2*(i mod 2)*j+(i mod 2)*((i+1)/2+1)+((i+1) mod 2)*(-i/2+1), if i<=j;
a(n) = i*i-i+(j mod 2)*(2-(j+1)/2)+((j+1) mod 2)*(j/2+1), 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).

A055630 Table T(k,m) = k^2 + m read by antidiagonals.

Original entry on oeis.org

0, 1, 1, 4, 2, 2, 9, 5, 3, 3, 16, 10, 6, 4, 4, 25, 17, 11, 7, 5, 5, 36, 26, 18, 12, 8, 6, 6, 49, 37, 27, 19, 13, 9, 7, 7, 64, 50, 38, 28, 20, 14, 10, 8, 8, 81, 65, 51, 39, 29, 21, 15, 11, 9, 9, 100, 82, 66, 52, 40, 30, 22, 16, 12, 10, 10, 121, 101, 83, 67, 53, 41, 31, 23, 17, 13
Offset: 0

Views

Author

Henry Bottomley, Jun 05 2000

Keywords

Examples

			Table begins:
..0...1...4...9..16..25..36..49..64..81.100.121.144...
..1...2...5..10..17..26..37..50..65..82.101.122.145...
..2...3...6..11..18..27..38..51..66..83.102.123.146...
..3...4...7..12..19..28..39..52..67..84.103.124.147...
..4...5...8..13..20..29..40..53..68..85.104.125.148...
..5...6...9..14..21..30..41..54..69..86.105.126.149...
..6...7..10..15..22..31..42..55..70..87.106.127.150...
..7...8..11..16..23..32..43..56..71..88.107.128.151...
..8...9..12..17..24..33..44..57..72..89.108.129.152...
..9..10..13..18..25..34..45..58..73..90.109.130.153...
.10..11..14..19..26..35..46..59..74..91.110.131.154...
... - _Philippe Deléham_, Mar 31 2013
		

Crossrefs

First column is A001477, second column is A000027, first row is A000290, second row is A002522, third row (apart from first term) is A010000, main diagonal is A002378, other diagonals include A028387, A028552, A014209, A002061, A014206, A027688-A027694, each row of A055096 (as upper right triangle) is right hand part of some row of this table
Showing 1-5 of 5 results.