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 41-50 of 50 results.

A368083 Numbers k such that k^2 + k + 1 and k^2 + k + 2 are both squarefree numbers.

Original entry on oeis.org

0, 3, 4, 7, 8, 11, 12, 16, 19, 20, 23, 24, 27, 28, 31, 35, 36, 39, 40, 43, 44, 47, 48, 51, 52, 55, 56, 59, 60, 63, 64, 71, 72, 75, 76, 80, 83, 84, 87, 88, 91, 92, 95, 96, 99, 100, 103, 104, 107, 111, 112, 115, 119, 120, 123, 124, 127, 131, 132, 135, 139, 140, 143
Offset: 1

Views

Author

Amiram Eldar, Dec 11 2023

Keywords

Comments

Dimitrov (2023) proved that this sequence is infinite and gave the formula for its asymptotic density.

Examples

			0 is a term since 0^2 + 0 + 1 = 1 and 0^2 + 0 + 2 = 2 are both squarefree numbers.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 150], And @@ SquareFreeQ /@ (#^2 + # + {1, 2}) &]
  • PARI
    is(k) = {my(m = k^2 + k + 1); issquarefree(m) && issquarefree(m + 1);}

A097286 Rectangular array T by descending antidiagonals: T(n,k) = rank of k-th n in A097285.

Original entry on oeis.org

1, 3, 2, 7, 5, 4, 13, 9, 6, 8, 21, 15, 11, 10, 14, 31, 23, 17, 12, 16, 22, 43, 33, 25, 19, 18, 24, 32, 57, 45, 35, 27, 20, 26, 34, 44, 73, 59, 47, 37, 29, 28, 36, 46, 58, 91, 75, 61, 49, 39, 30, 38, 48, 60, 74, 111, 93, 77, 63, 51, 41, 40, 50, 62, 76, 92, 133, 113, 95, 79, 65, 53, 42, 52, 64, 78, 94, 112
Offset: 1

Views

Author

Clark Kimberling, Aug 05 2004

Keywords

Comments

As a sequence, this is a permutation of the natural numbers.

Examples

			Corner:
   1    3    7   13    21    31    43    57    73    91   111
   2    5    9   15    23    33    45    59    75    93   113
   4    6   11   17    25    35    47    61    77    95   115
   8   10   12   19    27    37    49    63    79    97   117
  14   16   18   20    29    39    51    65    81    99   119
  22   24   26   28    30    41    53    67    83   101   121
  32   34   36   38    40    42    55    69    85   103   123
  44   46   48   50    52    54    56    71    87   105   125
  58   60   62   64    66    68    70    72    89   107   127
  74   76   78   80    82    84    86    88    90   109   129
  92   94   96   98   100   102   104   106   108   110   131
		

Crossrefs

Cf. A002061 (row 1), A014206 (column 1), A097285.

Programs

  • Mathematica
    s = {1, 2}; Do[s = Join[s, Riffle[Range[n - 1], n], {n}], {n, 3, 12}];
    Grid[Table[Flatten[Position[s, n]], {n, 1, 12}]]  (* Clark Kimberling, May 09 2025 *)

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).

A241807 Numerators of c(n) = (n^2+n+2)/((n+1)*(n+2)*(n+3)) as defined in A241269.

Original entry on oeis.org

1, 1, 2, 7, 11, 2, 11, 29, 37, 23, 28, 67, 79, 23, 53, 121, 137, 77, 86, 191, 211, 29, 127, 277, 301, 163, 176, 379, 407, 109, 233, 497, 529, 281, 298, 631, 667, 88, 371, 781, 821, 431, 452, 947, 991, 259, 541, 1129, 1177, 613, 638
Offset: 0

Views

Author

Keywords

Comments

The subsequence 1, 23, 77, 163, 281, 431, 613, 827, ..., with indices congruent to 1 mod 8, is 16n^2+6n+1, that is, A000124(8n+1)/2 or A014206(8n+1)/4. Its second differences are constant: (16n^2+6n+1)'' = 32.
The sequence A014206/A241807 is integral and consists of the 16-periodic sequence (2, 4, 4, 2, 2, 16, 4, 2, 2, 4, 4, 2, 2, 8, 4, 2, ...).

Examples

			1/3, 1/6, 2/15, 7/60, 11/105, 2/21, 11/126, 29/360, 37/495, 23/330, ...
		

Crossrefs

Programs

  • Mathematica
    Table[(n^2+n+2)/((n+1)*(n+2)*(n+3)) // Numerator, {n, 0, 50}]

Formula

a(n) = A014206(n)/period 16: repeat 2, 4, 4, 2, 2, 16, 4, 2, 2, 4, 4, 2, 2, 8, 4, 2 (conjectured).
a(4k) = 8*k^2 +2*k +1,
a(4k+2) = 4*k^2 +5*k +2,
a(4k+3) = 8*k^2 +14*k +7,
a(8k+1) = 16*k^2 +6*k +1,
a(16k+5) = 16*k^2 +11*k +2,
a(16k+13) = 32*k^2 + 54*k +23.

A247890 Number of digits in (R_n)^n.

Original entry on oeis.org

1, 3, 7, 13, 21, 31, 43, 57, 73, 91, 111, 133, 157, 183, 211, 241, 273, 307, 343, 381, 421, 464, 508, 554, 602, 652, 704, 758, 814, 872, 932, 994, 1058, 1124, 1192, 1262, 1334, 1408, 1484, 1562, 1642, 1724, 1808, 1895, 1983, 2073, 2165, 2259, 2355, 2453, 2553, 2655, 2759, 2865
Offset: 1

Views

Author

Derek Orr, Sep 25 2014

Keywords

Comments

R_n is the n-th repunit (i.e., R_n = 11...111 with n 1's).
From David A. Corneth, Jun 27 2016: (Start)
The number of digits of m is floor(log(m)/log(10)) + 1 for m > 0.
R_n = (10^n - 1) / 9 = (10 - 10^(1-n))/9 * 10^(n-1). Its number of digits is floor(n * log((10 - 10^(1-n))/9) / log(10)) + n * (n - 1) + 1. [corrected by Jason Yuen, Nov 11 2024] (End)

Crossrefs

Programs

  • Magma
    [#Intseq(Floor((10^n-1)/9)^n): n in [1..50]]; // Marius A. Burtea, May 20 2019
    
  • Mathematica
    Table[IntegerLength[((10^n - 1)/9)^n], {n, 54}] (* or *)
    Table[IntegerLength[FromDigits[Table[1, {n}]]^n], {n, 54}] (* Michael De Vlieger, Jun 27 2016 *)
  • PARI
    vector(100,n,#Str(((10^n-1)/9)^n))
    
  • PARI
    a(n) = logint(((10 - 10^(1-n))/9)^n\1,10)+n^2-n+1 \\ David A. Corneth, Jun 27 2016
    
  • Python
    def a(n): return len(str(int("1"*n)**n))
    print([a(n) for n in range(1, 55)]) # Michael S. Branicky, Apr 20 2022

Formula

a(n) = n^2 - n + 1 = A002061(n), for 1 <= n <= 21.
a(n) = n^2 - n + 2 = A014206(n-1), for 22 <= n <= 43.
a(n) = A055642(A245593(n)). - Michel Marcus, Apr 20 2022

Extensions

Incorrect conjectures removed by Georg Fischer, May 19 2019

A369292 Array read by downward antidiagonals: A(n,k) = -A(n-1,k) + (k+1)*A(n-1,k+1) + A(n-1,k+2) with A(0,k) = 1, n >= 0, k >= 0.

Original entry on oeis.org

1, 1, 1, 1, 2, 4, 1, 3, 8, 18, 1, 4, 14, 42, 108, 1, 5, 22, 84, 276, 780, 1, 6, 32, 150, 612, 2160, 6600, 1, 7, 44, 246, 1212, 5220, 19560, 63840, 1, 8, 58, 378, 2196, 11280, 50880, 200760, 693840, 1, 9, 74, 552, 3708, 22260, 118560, 556920, 2299920, 8361360
Offset: 0

Views

Author

Mikhail Kurkov, Jan 24 2024

Keywords

Examples

			Array begins:
=====================================================
n\k|    0     1     2      3      4      5      6 ...
---+-------------------------------------------------
0  |    1     1     1      1      1      1      1 ...
1  |    1     2     3      4      5      6      7 ...
2  |    4     8    14     22     32     44     58 ...
3  |   18    42    84    150    246    378    552 ...
4  |  108   276   612   1212   2196   3708   5916 ...
5  |  780  2160  5220  11280  22260  40800  70380 ...
6  | 6600 19560 50880 118560 252120 496920 919200 ...
  ...
		

Crossrefs

Column k=0 is A144085.
Rows n=0..2 are A000012, A000027(n+1), A014206(n+1).

Programs

  • PARI
    A(m,n=m)={my(r=vectorv(m+1), v=vector(n+2*m+1,k,1)); r[1] = v[1..n+1];
    for(i=1, m, v=vector(#v-2, k, -v[k] + k*v[k+1] + v[k+2]); r[1+i] = v[1..n+1]); Mat(r)}
    { A(6) } \\ Andrew Howroyd, Jan 24 2024

A373005 Array read by ascending antidiagonals: A(n,k) is the maximum possible cardinality of a set of points of diameter at most k-1 in {0,1}^n.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 0, 1, 2, 1, 0, 1, 2, 2, 0, 0, 1, 2, 3, 2, 1, 0, 1, 2, 4, 4, 2, 2, 0, 1, 2, 5, 6, 4, 2, 1, 0, 1, 2, 6, 8, 7, 4, 2, 0, 0, 1, 2, 7, 10, 11, 8, 4, 2, 1, 0, 1, 2, 8, 12, 16, 14, 8, 4, 2, 2, 0, 1, 2, 9, 14, 22, 22, 15, 8, 4, 2, 1, 0, 1, 2, 10, 16, 29, 32, 26, 16, 8, 4, 2, 0
Offset: 0

Views

Author

Stefano Spezia, May 19 2024

Keywords

Comments

A(n,k) is also the size of the Hamming ball in {0,1}^n of radius (k-1)/2 if k is odd and of the union of two Hamming balls in {0,1}^n of radius k/2-1 whose centers are of Hamming distance 1 if k is even.

Examples

			The array begins:
  1, 1, 2, 1,  0,  1,  2,  1, ...
  0, 1, 2, 2,  2,  2,  2,  2, ...
  0, 1, 2, 3,  4,  4,  4,  4, ...
  0, 1, 2, 4,  6,  7,  8,  8, ...
  0, 1, 2, 5,  8, 11, 14, 15, ...
  0, 1, 2, 6, 10, 16, 22, 26, ...
  0, 1, 2, 7, 12, 22, 32, 42, ...
  0, 1, 2, 8, 14, 29, 44, 64, ...
  ...
		

Crossrefs

Cf. A000007 (k=0), A000012 (k=1), A000124 (k=5), A000125 (k=7), A005843 (k=4), A006261 (k=11), A007395 (k=2), A008859 (k=13), A011782 (main diagonal), A014206, A046127 (k=8), A059173, A059174, A130130 (n=1), A158411 (n=2), A373006 (antidiagonal sums).

Programs

  • Mathematica
    A[n_,k_]:=If[OddQ[k],Sum[Binomial[n,i],{i,0,(k-1)/2}], Binomial[n-1,k/2-1]+Sum[Binomial[n,i],{i,0,k/2-1}]]; Table[A[n-k,k],{n,0,12},{k,0,n}]//Flatten

Formula

A(n,k) = Sum_{i=0..(k-1)/2} binomial(n,i) if k is odd;
A(n,k) = binomial(n-1,k/2-1) + Sum_{i=0..k/2-1} binomial(n,i) if k is even.
A(n,3) = n+1.
A(n,6) = A014206(n-1).
A(n,9) = A000127(n+1).
A(n,10) = A059173(n) for n > 0.
A(n,12) = A059174(n) for n > 0.
A(0,k) = A007877(k) for k > 0.

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

A144398 Coefficients of a symmetrical polynomial set:( Pascal's triangle with central zeros) p(x,n)=If[n <= 4, Sum[Binomial[n, i]*x^i, {i, 0, n}], x^n + n*x^(n - 1) + Binomial[n, 2]*x^(n - 2) + n*x + Binomial[n, 2]*x^2 + 1].

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 6, 4, 1, 1, 5, 10, 10, 5, 1, 1, 6, 15, 0, 15, 6, 1, 1, 7, 21, 0, 0, 21, 7, 1, 1, 8, 28, 0, 0, 0, 28, 8, 1, 1, 9, 36, 0, 0, 0, 0, 36, 9, 1, 1, 10, 45, 0, 0, 0, 0, 0, 45, 10, 1
Offset: 1

Views

Author

Roger L. Bagula and Gary W. Adamson, Oct 03 2008

Keywords

Comments

Row sums are: (related to A014206)
{1, 2, 4, 8, 16, 32, 44, 58, 74, 92, 112}

Examples

			{1},
{1, 1},
{1, 2, 1},
{1, 3, 3, 1},
{1, 4, 6, 4, 1},
{1, 5, 10, 10, 5, 1},
{1, 6, 15, 0, 15, 6, 1},
{1, 7, 21, 0, 0, 21, 7, 1},
{1, 8, 28, 0, 0, 0, 28, 8, 1},
{1, 9, 36, 0, 0, 0, 0, 36, 9, 1},
{1, 10, 45, 0, 0, 0, 0, 0, 45, 10, 1}
		

Programs

  • Mathematica
    Clear[p, n]; p[x_, n_] = If[n <= 4, Sum[Binomial[n, i]*x^i, {i, 0, n}], x^n + n*x^(n - 1) + Binomial[n, 2]*x^(n - 2) + n*x + Binomial[n, 2]*x^2 + 1]; Table[CoefficientList[p[x, n], x], {n, 0, 10}]; Flatten[%]

Formula

p(x,n)=If[n <= 4, Sum[Binomial[n, i]*x^i, {i, 0, n}], x^n + n*x^(n - 1) + Binomial[n, 2]*x^(n - 2) + n*x + Binomial[n, 2]*x^2 + 1]; t(n,m)=coefficients(p(x,n)).

A308981 Nonnegative integers k such that k^3 - 2*k^2 + k - 1 is not composite.

Original entry on oeis.org

0, 1, 2, 3, 5, 6, 7, 10, 12, 13, 15, 20, 23, 26, 27, 28, 30, 33, 35, 37, 38, 41, 45, 48, 50, 56, 61, 63, 65, 66, 70, 71, 72, 82, 83, 85, 90, 96, 98, 107, 108, 115, 120, 122, 126, 128, 133, 140, 141, 142, 145, 148, 156, 160, 162, 166, 173, 175, 180, 185, 191, 202, 205, 208, 213, 217, 220
Offset: 1

Views

Author

M. F. Hasler, Jul 04 2019

Keywords

Comments

Apart the three initial terms which lead to +/-1, all other terms lead to prime P(k) = k^3 - 2*k^2 + k - 1.
The polynomial Q = (((x^2-k)^2-k)^2-x-k)/(x^2 - x - k) of degree 6 has two factors of degree <= 3 when k is in A014206. This can only happen when the constant term of Q, which equals -P(k), is not prime. Therefore, A014206 is a subsequence of the complement of this sequence.

Crossrefs

Cf. A014206.

Programs

  • Magma
    [0,1,2] cat  [n: n in [0..220] | IsPrime((n^2*(n-2)+n-1))]; // Vincenzo Librandi, Jul 19 2019
  • Mathematica
    Join[{0, 1, 2}, Select[Range[230], PrimeQ[((#^2 (# - 2) + # - 1))] &]] (* Vincenzo Librandi, Jul 19 2019 *)
  • PARI
    select( is(k)={k<3||isprime(k^2*(k-2)+k-1)}, [0..200])
    
Previous Showing 41-50 of 50 results.