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-10 of 13 results. Next

A028876 Numbers k such that k^2 - 5 is prime.

Original entry on oeis.org

4, 6, 8, 12, 14, 16, 22, 24, 32, 34, 36, 38, 42, 44, 46, 52, 58, 64, 72, 74, 78, 82, 94, 102, 112, 116, 122, 132, 144, 152, 164, 166, 168, 174, 176, 182, 184, 186, 188, 198, 204, 212, 222, 226, 232, 234, 236, 252, 262, 264, 278, 284, 288, 292, 298, 302, 318, 324
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

A028877 Primes of form k^2 - 5.

Original entry on oeis.org

11, 31, 59, 139, 191, 251, 479, 571, 1019, 1151, 1291, 1439, 1759, 1931, 2111, 2699, 3359, 4091, 5179, 5471, 6079, 6719, 8831, 10399, 12539, 13451, 14879, 17419, 20731, 23099, 26891, 27551, 28219, 30271, 30971, 33119, 33851, 34591, 35339, 39199, 41611, 44939, 49279
Offset: 1

Views

Author

Keywords

Comments

These numbers are prime in Z but not in Z[sqrt(5)] nor in Z[phi] (where phi is the golden ratio), since (k - sqrt(5))(k + sqrt(5)) = ((k + 1) - 2*phi)((k - 1) + 2*phi) = k^2 - 5. - Alonso del Arte, Aug 27 2013

Examples

			31 is in the sequence as it is equal to 6^2 - 5.
59 is in the sequence since it is equal to 8^2 - 5.
95 is not in the sequence though it does equal 10^2 - 5.
		

Crossrefs

Cf. A028875 (superset), A028876.

Programs

  • Magma
    [a: n in [1..300] | IsPrime(a) where a is n^2-5]; // Vincenzo Librandi, Dec 01 2011
  • Mathematica
    Select[Table[n^2 - 5, {n, 200}], PrimeQ] (* Harvey P. Dale, Jan 17 2011 *)

Formula

a(n) = A028875(A028876(n)). - Elmo R. Oliveira, Feb 22 2025

A156140 Accumulation of Stern's diatomic series: a(0)=-1, a(1)=0, and a(n+1) = (2e(n)+1)*a(n) - a(n-1) for n > 1, where e(n) is the highest power of 2 dividing n.

Original entry on oeis.org

-1, 0, 1, 3, 2, 7, 5, 8, 3, 13, 10, 17, 7, 18, 11, 15, 4, 21, 17, 30, 13, 35, 22, 31, 9, 32, 23, 37, 14, 33, 19, 24, 5, 31, 26, 47, 21, 58, 37, 53, 16, 59, 43, 70, 27, 65, 38, 49, 11, 50, 39, 67, 28, 73, 45, 62, 17, 57, 40, 63, 23, 52, 29, 35, 6, 43, 37, 68, 31, 87, 56, 81, 25, 94, 69
Offset: 0

Views

Author

Arie Werksma (Werksma(AT)Tiscali.nl), Feb 04 2009

Keywords

Crossrefs

From Yosu Yurramendi, Mar 09 2018: (Start)
a(2^m + 0) = A000027(m), m >= 0.
a(2^m + 1) = A002061(m+2), m >= 1.
a(2^m + 2) = A002522(m), m >= 2.
a(2^m + 3) = A033816(m-1), m >= 2.
a(2^m + 4) = A002061(m), m >= 2.
a(2^m + 5) = A141631(m), m >= 3.
a(2^m + 6) = A084849(m-1), m >= 3.
a(2^m + 7) = A056108(m-1), m >= 3.
a(2^m + 8) = A000290(m-1), m >= 3.
a(2^m + 9) = A185950(m-1), m >= 4.
a(2^m + 10) = A144390(m-1), m >= 4.
a(2^m + 12) = A014106(m-2), m >= 4.
a(2^m + 16) = A028387(m-3), m >= 4.
a(2^m + 18) = A250657(m-4), m >= 5.
a(2^m + 20) = A140677(m-3), m >= 5.
a(2^m + 32) = A028872(m-2), m >= 5.
a(2^m - 1) = A005563(m-1), m >= 0.
a(2^m - 2) = A028387(m-2), m >= 2.
a(2^m - 3) = A033537(m-2), m >= 2.
a(2^m - 4) = A008865(m-1), m >= 3.
a(2^m - 7) = A140678(m-3), m >= 3.
a(2^m - 8) = A014209(m-3), m >= 4.
a(2^m - 16) = A028875(m-2), m >= 5.
a(2^m - 32) = A108195(m-5), m >= 6.
(End)

Programs

  • Maple
    A156140 := proc(n)
        option remember ;
        if n <= 1 then
            n-1 ;
        else
            (2*A007814(n-1)+1)*procname(n-1)-procname(n-2) ;
        end if;
    end proc:
    seq(A156140(n),n=0..80) ; # R. J. Mathar, Mar 14 2009
  • Mathematica
    Fold[Append[#1, (2 IntegerExponent[#2, 2] + 1) #1[[-1]] - #1[[-2]] ] &, {-1, 0}, Range[73]] (* Michael De Vlieger, Mar 09 2018 *)
  • PARI
    first(n)=my(v=vector(n+1)); v[1]=-1; v[2]=0; for(k=1,n-1,v[k+2]=(2*valuation(k,2)+1)*v[k+1] - v[k]); v \\ Charles R Greathouse IV, Apr 05 2016
    
  • PARI
    fusc(n)=my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); b
    a(n)=my(m=1,s,t); if(n==0, return(-1)); while(n%2==0, s+=fusc(n>>=1)); while(n>1, t=logint(n,2); n-=2^t; s+=m*fusc(n)*(t^2+t+1); m*=-t); m*(n-1) + s \\ Charles R Greathouse IV, Dec 13 2016
    
  • R
    a <- c(0,1)
    maxlevel <- 6 # by choice
    for(m in 1:maxlevel) {
      a[2^(m+1)] <- m + 1
      for(k in 1:(2^m-1)) {
        r <- m - floor(log2(k)) - 1
        a[2^r*(2*k+1)] <- a[2^r*(2*k)] + a[2^r*(2*k+2)]
    }}
    a
    # Yosu Yurramendi, May 08 2018

Formula

Let b(n) = A002487(n), Stern's diatomic series.
a(n+1)*b(n) - a(n)*b(n+1) = 1 for n >= 0.
a(2n+1) = a(n) + a(n+1) + b(n) + b(n+1) for n >= 0.
a(2n) = a(n) + b(n) for n >= 0.
a(2^n + k) = -n*a(k) + (n^2 + n + 1)*b(k) for 0 <= k <= 2^n.
b(2^n + k) = -a(k) + (n + 1)*b(k) for 0 <= k <= 2^n.
a(2^m + k) = b(2^m+k)*m + b(k), m >= 0, 0 <= k < 2^m. - Yosu Yurramendi, Mar 09 2018
a(2^(m+1)+2^m+1) = 2*m+1, m >= 0. - Yosu Yurramendi, Mar 09 2018
From Yosu Yurramendi, May 08 2018: (Start)
a(2^m) = m, m >= 0.
a(2^r*(2*k+1)) = a(2^r*(2*k)) + a(2^r*(2*k+2)), r = m - floor(log_2(k)) - 1, m > 0, 1 <= k < 2^m.
(End)

A179770 The fourth central column of triangle A122242, i.e., A179761(4), A179761(11), A179761(20), A179761(31), ...

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0
Offset: 1

Views

Author

Antti Karttunen, Aug 03 2010

Keywords

Crossrefs

Cf. A179771-A179774, and also A179775, A179830.

Formula

a(n) = A179761(A028875(n+2)).

A179775 The fourth central column of triangle A122245, i.e., A179762(4), A179762(11), A179762(20), A179762(31), ...

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0
Offset: 1

Views

Author

Antti Karttunen, Aug 03 2010

Keywords

Crossrefs

Cf. A179776-A179779, and also A179770, A179830.

Formula

a(n) = A179762(A028875(n+2)).

A213921 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 clockwise. Table T(n,k) read by antidiagonals.

Original entry on oeis.org

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

Views

Author

Boris Putievskiy, Mar 05 2013

Keywords

Comments

A 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) is 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(2,n), T(4,n), ... T(n,4), T(n,2);
...

Examples

			The start of the sequence as table:
   1   2   5  10  17  26 ...
   3   4   8  14  22  32 ...
   7   9   6  11  18  27 ...
  13  16  12  15  23  33 ...
  21  25  20  24  19  28 ...
  31  36  30  35  29  34 ...
  ...
The start of the sequence as triangle array read by rows:
   1;
   2,  3;
   5,  4,  7;
  10,  8,  9, 13;
  17, 14,  6, 16, 21;
  26, 22, 11, 12, 25, 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-(j%2)*i+2-int((j+2)/2)
    else:
       result=j*j-((i%2)+1)*j + int((i+3)/2)

Formula

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

A213922 Natural numbers placed in table T(n,k) layer by layer. The order of placement: T(n,n), T(n-1,n), T(n,n-1), ... T(1,n), T(n,1). Table T(n,k) read by antidiagonals.

Original entry on oeis.org

1, 3, 4, 8, 2, 9, 15, 6, 7, 16, 24, 13, 5, 14, 25, 35, 22, 11, 12, 23, 36, 48, 33, 20, 10, 21, 34, 49, 63, 46, 31, 18, 19, 32, 47, 64, 80, 61, 44, 29, 17, 30, 45, 62, 81, 99, 78, 59, 42, 27, 28, 43, 60, 79, 100, 120, 97, 76, 57, 40, 26, 41, 58, 77, 98, 121
Offset: 1

Views

Author

Boris Putievskiy, Mar 05 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) is layer by layer. The order of the list:
T(1,1)=1;
T(2,2), T(1,2), T(2,1);
...
T(n,n), T(n-1,n), T(n,n-1), ... T(1,n), T(n,1);
...

Examples

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

Crossrefs

Cf. A060734, A060736; table T(n,k) contains: in rows A005563, A028872, A028875, A028881, A028560, A116711; in columns A000290, A008865, A028347, A028878, A028884.

Programs

  • Mathematica
    f[n_, k_] := n^2 - 2*k + 2 /; n >= k; f[n_, k_] := k^2 - 2*n + 1 /; n < k; TableForm[Table[f[n, k], {n, 1, 5}, {k, 1, 10}]]; Table[f[n - k + 1, k], {n, 5}, {k, n, 1, -1}] // Flatten (* G. C. Greubel, Aug 19 2017 *)
  • 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-2*j+2
    else:
       result=j*j-2*i+1

Formula

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

A281442 Triangle read by rows: T(n,r), 0 <= r <= n, is the number of idempotents of rank r in the Kauffman monoid K_n.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 2, 0, 1, 0, 0, 4, 0, 1, 0, 8, 0, 6, 0, 1, 0, 0, 22, 0, 8, 0, 1, 0, 42, 0, 40, 0, 10, 0, 1, 0, 0, 140, 0, 62, 0, 12, 0, 1, 0, 262, 0, 288, 0, 88, 0, 14, 0, 1, 0, 0, 992, 0, 492, 0, 118, 0, 16, 0, 1
Offset: 0

Views

Author

James East, Oct 05 2017

Keywords

Comments

Values were computed using the Semigroups package for GAP.
T(n,r) is also the number of idempotent basis elements of rank r in the Temperley-Lieb algebra of degree n in the generic case (when the twisting parameter is not an m-th root of unity for any m <= n).

Crossrefs

Cf. A281438 (row sums), A281441, A289620.

Formula

T(2n-1,1) = A005315(n). Empirical: T(2n,2) = A077056(n); T(n+2,n-2) = 2*A028875(n) for n>2. - Andrey Zabolotskiy, Oct 19 2017

A358519 Decimal expansion of Sum_{k >= 1} (-1)^(k+1)/(k^2 + 4*k - 1).

Original entry on oeis.org

1, 8, 9, 9, 5, 7, 9, 0, 7, 7, 1, 8, 0, 6, 2, 7, 2, 5, 2, 7, 1, 9, 0, 8, 4, 0, 9, 0, 6, 3, 6, 3, 6, 6, 5, 5, 2, 7, 9, 5, 6, 6, 4, 9, 1, 4, 5, 4, 0, 6, 7, 9, 5, 6, 3, 1, 3, 2, 8, 9, 3, 1, 3, 6, 2, 2, 1, 3, 1, 4, 6, 7, 1, 4, 9, 3, 6, 1, 9, 8, 5, 9, 8, 5, 3, 2, 5, 6, 4, 7, 7, 5, 6, 1, 3
Offset: 0

Views

Author

Claude H. R. Dequatre, Nov 20 2022

Keywords

Examples

			0.189957907718062725271908409063636655279566491...
		

Crossrefs

Programs

  • Mathematica
    RealDigits[(2*Sqrt[5]*Pi*Csc[Sqrt[5]*Pi] - 17)/20, 10, 120][[1]] (* Amiram Eldar, Nov 21 2022 *)
  • PARI
    (Pi/(2*sqrt(5)))*1/sin(Pi*sqrt(5)) - 17/20

Formula

Equals Sum_{k >=1} (-1)^(k+1)/(k^2 + 4*k - 1).
Equals (Pi/(2*sqrt(5)))*csc(Pi*sqrt(5)) - 17/20 = Sum_{k>=3} (-1)^(k+1)/(k^2-5). [from the Shamos reference]
Equals Sum_{k>=3} (-1)^(k+1)/A028875(k). - Amiram Eldar, Nov 21 2022

A144204 Array A(k,n) = (n+k-2)*(n-1) - 1 (k >= 1, n >= 1) read by antidiagonals.

Original entry on oeis.org

-1, -1, 0, -1, 1, 3, -1, 2, 5, 8, -1, 3, 7, 11, 15, -1, 4, 9, 14, 19, 24, -1, 5, 11, 17, 23, 29, 35, -1, 6, 13, 20, 27, 34, 41, 48, -1, 7, 15, 23, 31, 39, 47, 55, 63, -1, 8, 17, 26, 35, 44, 53, 62, 71, 80, -1, 9, 19, 29, 39, 49, 59, 69, 79, 89, 99, -1, 10, 21, 32, 43, 54, 65, 76, 87
Offset: 1

Views

Author

Jonathan Vos Post, Sep 13 2008

Keywords

Comments

Arises in complete intersection threefolds,
Also can be produced as a triangle read by rows: a(n, k) = nk - (n + k). - Alonso del Arte, Jul 09 2009
Kosta: Let X be a complete intersection of two hypersurfaces F_n and F_k in the projective space P^5 of degree n and k respectively. with n=>k, such that the singularities of X are nodal and F_k is smooth. We prove that if the threefold X has at most (n+k-2)*(n-1) - 1 singular points, then it is factorial.

Examples

			From _R. J. Mathar_, Jul 10 2009: (Start)
The rows A(n,1), A(n,2), A(n,3), etc., are :
.-1...0...3...8..15..24..35..48..63..80..99.120.143.168 A067998
.-1...1...5..11..19..29..41..55..71..89.109.131.155.181 A028387
.-1...2...7..14..23..34..47..62..79..98.119.142.167.194 A008865
.-1...3...9..17..27..39..53..69..87.107.129.153.179.207 A014209
.-1...4..11..20..31..44..59..76..95.116.139.164.191.220 A028875
.-1...5..13..23..35..49..65..83.103.125.149.175.203.233 A108195
.-1...6..15..26..39..54..71..90.111.134.159.186.215.246
.-1...7..17..29..43..59..77..97.119.143.169.197.227.259
.-1...8..19..32..47..64..83.104.127.152.179.208.239.272
.-1...9..21..35..51..69..89.111.135.161.189.219.251.285
.-1..10..23..38..55..74..95.118.143.170.199.230.263.298
.-1..11..25..41..59..79.101.125.151.179.209.241.275.311
.-1..12..27..44..63..84.107.132.159.188.219.252.287.324
.-1..13..29..47..67..89.113.139.167.197.229.263.299.337 Cf. A126719.
(End)
As a triangle:
. 0
. 1, 3
. 2, 5, 8
. 3, 7, 11, 15
. 4, 9, 14, 19, 24
. 5, 11, 17, 23, 29, 35
. 6, 13, 20, 27, 34, 41, 48
. 7, 15, 23, 31, 39, 47, 55, 63
. 8, 17, 26, 35, 44, 53, 62, 71, 80
		

Crossrefs

Row 1 = A067998(n) for n>0. Row 2 = A028387(n) for n>0.Column 1 = -A000012(n). Column 2 = A001477. Column 3 = A005408(k). Column 4 = A016789(k+1). Column 5 = A004767(k+2). Column 6 = A016897(k+3). Column 7 = A016969(k+4). Column 8 = A017053(k+5). Column 9 = A004771(k+6). Column 10 = A017257(k+7).

Programs

  • Maple
    A := proc(k,n) (n+k-2)*(n-1)-1 ; end: for d from 1 to 13 do for n from 1 to d do printf("%d,",A(d-n+1,n)) ; od: od: # R. J. Mathar, Jul 10 2009
  • Mathematica
    a[n_, k_] := a[n, k] = n*k - (n + k); ColumnForm[Table[a[n, k], {n, 10}, {k, n}], Center] (* Alonso del Arte, Jul 09 2009 *)

Formula

A[k,n] = (n+k-2)*(n-1) - 1.
Antidiagonal sum: Sum_{n=1..d} A(d-n+1,n) = d*(d^2-2d-1)/2 = -A110427(d). - R. J. Mathar, Jul 10 2009

Extensions

Duplicate of 6th antidiagonal removed by R. J. Mathar, Jul 10 2009
Keyword:tabl added by R. J. Mathar, Jul 23 2009
Edited by N. J. A. Sloane, Sep 14 2009. There was a comment that the defining formula was wrong, but it is perfectly correct.
Showing 1-10 of 13 results. Next