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

A023443 a(n) = n - 1.

Original entry on oeis.org

-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Formula

From R. J. Mathar, Feb 11 2010: (Start)
a(n) = 2*a(n-1) -a(n-2).
G.f.: (-1+2*x)/(1-x)^2. (End)
E.g.f.: exp(x)*(x - 1). - Stefano Spezia, Feb 14 2025

A127080 Infinite square array read by antidiagonals: Q(m, 0) = 1, Q(m, 1) = 1; Q(m, 2k) = (m - 2k + 1)*Q(m+1, 2k-1) - (2k-1)*Q(m+2,2k-2), m*Q(m, 2k+1) = (m - 2k)*Q(m+1, 2k) - 2k(m+1)*Q(m+2, 2k-1).

Original entry on oeis.org

1, 1, 1, 1, 1, -2, 1, 1, -1, -5, 1, 1, 0, -4, 12, 1, 1, 1, -3, 3, 43, 1, 1, 2, -2, -4, 28, -120, 1, 1, 3, -1, -9, 15, -15, -531, 1, 1, 4, 0, -12, 4, 48, -288, 1680, 1, 1, 5, 1, -13, -5, 75, -105, 105, 8601, 1, 1, 6, 2, -12, -12, 72, 24, -624, 3984, -30240, 1, 1, 7, 3, -9, -17, 45, 105, -735, 945, -945, -172965
Offset: 0

Views

Author

N. J. A. Sloane, Mar 24 2007

Keywords

Comments

Comment from N. J. A. Sloane, Jan 29 2020: (Start)
It looks like there was a missing 2 in the definition, which I have now corrected. The old definition was:
(Wrong!) Infinite square array read by antidiagonals: Q(m, 0) = 1, Q(m, 1) = 1; Q(m, 2k) = (m - 2k + 1)*Q(m+1, 2k-1) - (2k-1)*Q(m+2, k-2), m*Q(m, 2k+1) = (m - 2k)*Q(m+1, 2k) - 2k(m+1)*Q(m+2, 2k-1). (Wrong!) (End)

Examples

			Array begins:
     1,    1,    1,    1,    1,   1,   1,    1,    1,    1, ... (A000012)
     1,    1,    1,    1,    1,   1,   1,    1,    1,    1, ... (A000012)
    -2,   -1,    0,    1,    2,   3,   4,    5,    6,    7, ... (A023444)
    -5,   -4,   -3,   -2,   -1,   0,   1,    2,    3,    4, ... (A023447)
    12,    3,   -4,   -9,  -12, -13, -12,   -9,   -4,    3, ... (A127146)
    43,   28,   15,    4,   -5, -12, -17,  -20,  -21,  -20, ... (A127147)
  -120,  -15,   48,   75,   72,  45,   0,  -57, -120, -183, ... (A127148)
  -531, -288, -105,   24,  105, 144, 147,  120,   69,    0, ...
  1680,  105, -624, -735, -432, 105, 720, 1281, 1680, 1833, ...
		

References

  • V. van der Noort and N. J. A. Sloane, Paper in preparation, 2007.

Crossrefs

See A105937 for another version.
Columns give A127137, A127138, A127144, A127145;
Rows give A127146, A127147, A127148.

Programs

  • Maple
    f:= proc(k) option remember;
          if `mod`(k,2)=0 then k!/(k/2)!
        else 2^(k-1)*((k-1)/2)!*add(binomial(2*j, j)/8^j, j=0..((k-1)/2))
          fi; end;
    Q:= proc(n, k) option remember;
          if n=0 then (-1)^binomial(k, 2)*f(k)
        elif k<2 then 1
        elif `mod`(k,2)=0 then (n-k+1)*Q(n+1,k-1) - (k-1)*Q(n+2,k-2)
        else ( (n-k+1)*Q(n+1,k-1) - (k-1)*(n+1)*Q(n+2,k-2) )/n
          fi; end;
    seq(seq(Q(n-k, k), k=0..n), n=0..12); # G. C. Greubel, Jan 30 2020
  • Mathematica
    Q[0, k_]:= Q[0,k]= (-1)^Binomial[k, 2]*If[EvenQ[k], k!/(k/2)!, 2^(k-1)*((k-1)/2)!* Sum[Binomial[2*j, j]/8^j, {j, 0, (k-1)/2}] ];
    Q[n_, k_]:= Q[n,k]= If[k<2, 1, If[EvenQ[k], (n-k+1)*Q[n+1, k-1] - (k-1)*Q[n+2, k-2], ((n -k+1)*Q[n+1, k-1] - (k-1)*(n+1)*Q[n+2, k-2])/n]];
    Table[Q[n-k,k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Jan 30 2020 *)
  • Sage
    @CachedFunction
    def f(k):
        if (mod(k, 2)==0): return factorial(k)/factorial(k/2)
        else: return 2^(k-1)*factorial((k-1)/2)*sum(binomial(2*j, j)/8^j for j in (0..(k-1)/2))
    def Q(n,k):
        if (n==0): return (-1)^binomial(k, 2)*f(k)
        elif (k<2): return 1
        elif (mod(k,2)==0): return (n-k+1)*Q(n+1,k-1) - (k-1)*Q(n+2,k-2)
        else: return ( (n-k+1)*Q(n+1,k-1) - (k-1)*(n+1)*Q(n+2,k-2) )/n
    [[Q(n-k,k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jan 30 2020

Formula

E.g.f.: Sum_{k >= 0} Q(m,2k) x^k/k! = (1+4x)^((m-1)/2)/(1+2x)^(m/2), Sum_{k >= 0} Q(m,2k+1) x^k/k! = (1+4x)^((m-2)/2)/(1+2x)^((m+1)/2).

Extensions

More terms added by G. C. Greubel, Jan 30 2020

A154990 Triangle read by rows. Main diagonal is positive. The rest of the terms are negative.

Original entry on oeis.org

1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, -1
Offset: 1

Views

Author

Mats Granvik, Jan 18 2009

Keywords

Comments

Triangle can be used in matrix inverses. Signs in columns as in A153881.
Iff n is a triangular number, a(n)=1; otherwise, a(n)=-1. (This is explicitly implemented in the second Mathematica program below.) - Harvey P. Dale, Apr 27 2014

Examples

			Table begins:
   1;
  -1,  1;
  -1, -1,  1;
  -1, -1, -1,  1;
  -1, -1, -1, -1,  1;
  -1, -1, -1, -1, -1,  1;
  -1, -1, -1, -1, -1, -1, 1;
		

Crossrefs

Programs

  • Magma
    [k eq n select 1 else -1: k in [1..n], n in [1..12]]; // G. C. Greubel, Mar 06 2021
  • Maple
    A154990 := proc(n,k)
        option remember;
        if k = n then
            1;
        elif k > n then
            0;
        else
            -1 ;
        end if;
    end proc:
    seq(seq(A154990(n,k),k=1..n),n=1..12) ; # R. J. Mathar, Sep 16 2017
  • Mathematica
    Flatten[Table[PadLeft[{1},n,-1],{n,15}]] (* or *) With[{tr=Accumulate[ Range[ 15]]}, Table[If[MemberQ[tr,n],1,-1],{n,Last[tr]}]] (* Harvey P. Dale, Apr 27 2014 *)
  • Sage
    flatten([[1 if k==n else -1 for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Mar 06 2021
    

Formula

From G. C. Greubel, Mar 06 2021: (Start)
T(n, k) = -1 with T(n, n) = 1.
Sum_{k=1..n} T(n, k) = 2-n = -A023443(n-1) = -A023444(n). (End)

A253639 Lesser of twin primes of the form (k^2 + 2, k^2 + 4).

Original entry on oeis.org

3, 11, 227, 1091, 2027, 3251, 13691, 21611, 59051, 65027, 91811, 140627, 178931, 199811, 205211, 227531, 328331, 567011, 700571, 804611, 815411, 1071227, 2241011, 3629027, 4223027, 4347227, 4809251, 5212091, 5919491, 6185171, 6426227, 6671891, 7601051, 7969331, 8661251, 8732027, 9018011, 10323371
Offset: 1

Views

Author

M. F. Hasler, Jan 16 2015

Keywords

Comments

Companion sequence to A085554 (which yields the greater of the pair) and A086381 (which lists the x-values). Except for the first term, all values are a(n)=11 (mod 72). - M. F. Hasler, Jan 18 2015

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Table[x^2+{2,4},{x,5000}],AllTrue[#,PrimeQ]&]][[1]] (* The program uses the AllTrue function from Mathematica version 10 *)
  • PARI
    forstep(x=1,9999,2,is_A086381(x)&&print1(x^2+2,",")) \\ M. F. Hasler, Jan 16 2015

Formula

Equals A059100 o A086381 = A023444 o A085554, i.e., a(n) = A086381(n)^2+2 = A085554(n)-2. - M. F. Hasler, Jan 18 2015

A129936 a(n) = (n-2)*(n+3)*(n+2)/6.

Original entry on oeis.org

-2, -2, 0, 5, 14, 28, 48, 75, 110, 154, 208, 273, 350, 440, 544, 663, 798, 950, 1120, 1309, 1518, 1748, 2000, 2275, 2574, 2898, 3248, 3625, 4030, 4464, 4928, 5423, 5950, 6510, 7104, 7733, 8398, 9100, 9840, 10619, 11438, 12298, 13200, 14145, 15134, 16168, 17248
Offset: 0

Views

Author

Roger L. Bagula, Jun 09 2007

Keywords

Comments

Essentially the same as A005586.

Crossrefs

Programs

  • Maple
    seq(sum(i*(k-i+1), i=1..k+2), k=0..99); # Wesley Ivan Hurt, Sep 21 2013
  • Mathematica
    f[n_] = Binomial[n + 3, 3] - (n + 3)*(n + 2)/2; Table[f[n], {n, 0, 30}]
    LinearRecurrence[{4,-6,4,-1},{-2,-2,0,5},50] (* Harvey P. Dale, Jul 03 2020 *)
  • PARI
    a(n)=(n-2)*(n+3)*(n+2)/6 \\ Charles R Greathouse IV, Oct 07 2015

Formula

a(n) = binomial(n+3,3) - (n + 3)*(n + 2)/2.
a(n) = A214292(n+2,2). - Reinhard Zumkeller, Jul 12 2012
G.f.: (x^3-4*x^2+6*x-2)/(x-1)^4. - Colin Barker, Sep 05 2012
From Wesley Ivan Hurt, Sep 21 2013: (Start)
a(n) = Sum_{i=1..n+2} i*(n-i+1).
a(n+2) = A000292(n+1) + A034856(n), n>0. (End)
From Amiram Eldar, Sep 26 2022: (Start)
Sum_{n>=3} 1/a(n) = 77/200.
Sum_{n>=3} (-1)^(n+1)/a(n) = 363/200 - 12*log(2)/5. (End)
From Elmo R. Oliveira, Aug 04 2025: (Start)
E.g.f.: exp(x)*(x^3 + 6*x^2 - 12)/6.
a(n) = A023444(n)*A002378(n+2)/6.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). (End)

Extensions

More terms from Wesley Ivan Hurt, Sep 21 2013

A289207 a(n) = max(0, n-2).

Original entry on oeis.org

0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69
Offset: 0

Views

Author

Keywords

Comments

This simple sequence is such that there is one and only one array of differences D(n,k) where the first and the second upper subdiagonal is a(n).
The rows of this array are existing sequences of the OEIS, prepended with zeros:
row 0 is A118425,
row 1 is A006478,
row 2 is A001629,
row 3 is A010049,
row 4 is A006367,
row 5 is not in the OEIS.
It can be observed that a(n) is an autosequence of the first kind whose second kind mate is A199969. In addition, the structure of the array D(n,k) shows that the first row is an autosequence.
For n = 1 to 8, rows with only one leading zero are also autosequences.

Examples

			Array of differences begin:
   0,   0,   0,   0,  0,   0,  0,  1,  4, 12, 30, 68, ...
   0,   0,   0,   0,  0,   0,  1,  3,  8, 18, 38, 76, ...
   0,   0,   0,   0,  0,   1,  2,  5, 10, 20, 38, 71, ...
   0,   0,   0,   0,  1,   1,  3,  5, 10, 18, 33, 59, ...
   0,   0,   0,   1,  0,   2,  2,  5,  8, 15, 26, 46, ...
   0,   0,   1,  -1,  2,   0,  3,  3,  7, 11, 20, 34, ...
   0,   1,  -2,   3, -2,   3,  0,  4,  4,  9, 14, 24, ...
   1,  -3,   5,  -5,  5,  -3,  4,  0,  5,  5, 10, 16, ...
  -4,   8, -10,  10, -8,   7, -4,  5,  0,  6,  6, 17, ...
  12, -18,  20, -18, 15, -11,  9, -5,  6,  0,  7,  7, ...
  ...
		

Crossrefs

Essentially the same as A023444. Cf. A001477, A118425, A006478, A001629, A010049, A006367, A199969.

Programs

  • Mathematica
    a[n_] := Max[0, n - 2];
    D[n_, k_] /; k == n + 1 := a[n]; D[n_, k_] /; k == n + 2 := a[n]; D[n_, k_] /; k > n + 2 := D[n, k] = Sum[D[n + 1, j], {j, 0, k - 1}]; D[n_, k_] /; k <= n := D[n, k] = D[n - 1, k + 1] - D[n - 1, k];
    Table[D[n, k], {n, 0, 11}, {k, 0, 11}]

Formula

G.f.: x^3 / (1-x)^2.

A023445 n-3.

Original entry on oeis.org

-3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55
Offset: 0

Views

Author

Keywords

Comments

For n >= 0, let M(n) be the matrix with first row = (n n+1) and 2nd row = (n+3 n+5). Then a(n) = det(M(n)). [From K.V.Iyer, Apr 11 2009]

Crossrefs

Programs

  • Mathematica
    Range[0,60]-3 (* Harvey P. Dale, Dec 09 2017 *)
  • PARI
    a(n)=n-3

Formula

a(n) = 2 a(n-1) - a(n-2). a(n) = -A022959(n). G.f.: (-3 + 4*x)/(1 - x)^2. - M. F. Hasler, Apr 18 2015

A053565 a(n) = 2^(n-1)*(3*n-4).

Original entry on oeis.org

-2, -1, 4, 20, 64, 176, 448, 1088, 2560, 5888, 13312, 29696, 65536, 143360, 311296, 671744, 1441792, 3080192, 6553600, 13893632, 29360128, 61865984, 130023424, 272629760, 570425344, 1191182336, 2483027968, 5167382528, 10737418240
Offset: 0

Views

Author

Barry E. Williams, Jan 17 2000

Keywords

References

  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, N.Y., 1964, pp. 189, 194-196.

Crossrefs

Programs

  • GAP
    List([0..30], n-> 2^(n-1)*(3*n-4)) # G. C. Greubel, May 16 2019
  • Magma
    [2^(n-1)*(3*n-4): n in [0..30]]; // Vincenzo Librandi, Sep 26 2011
    
  • Mathematica
    Table[2^(n-1)*(3*n-4), {n,0,30}] (* G. C. Greubel, May 16 2019 *)
  • PARI
    vector(30, n, n--; 2^(n-1)*(3*n-4)) \\ G. C. Greubel, May 16 2019
    
  • Sage
    [2^(n-1)*(3*n-4) for n in (0..30)] # G. C. Greubel, May 16 2019
    

Formula

a(n) = 4*a(n-1) - 4*a(n-2), with a(0) = -2, a(1) = -1.
G.f.: -(2-7*x)/(1-2*x)^2. - Colin Barker, Apr 07 2012
E.g.f.: (3*x - 2)*exp(2*x). - G. C. Greubel, May 16 2019

A235774 Let b(k) = A164555(k)/A027642(k), the sequence of "original" Bernoulli numbers with -1 instead of A164555(0)=1; then a(n) = numerator of the n-th term of the binomial transform of the b(k) sequence.

Original entry on oeis.org

-1, -1, 1, 1, 59, 3, 169, 5, 179, 7, 533, 9, 26609, 11, 79, 13, 3523, 15, 56635, 17, -168671, 19, 857273, 21, -236304031, 23, 8553247, 25, -23749438409, 27, 8615841677021, 29, -7709321025917, 31, 2577687858559, 33, -26315271552988224913
Offset: 0

Views

Author

Paul Curtz, Jan 15 2014

Keywords

Comments

(a(n)/A027642(n)) = -1, -1/2, 1/6, 1, 59/30, 3, 169/42, 5, 179/30, 7, 533/66, 9,.. .
Difference table for a(n)/A027642(n):
-1, -1/2, 1/6, 1, 59/30, 3, 169/42, ...
1/2, 2/3, 5/6, 29/30, 31/30, 43/42, 41/42, ... = A165161(n)/A051717(n+1)
1/6, 1/6, 2/15, 1/15, -1/105, -1/21, -1/105, ... not in the OEIS
0, -1/30, -1/15, -8/105, -4/105, 4/105, 8/105, ... etc.
Compare with the array in A190339.

Crossrefs

Programs

  • Mathematica
    b[0] = -1; b[1] = 1/2; b[n_] := BernoulliB[n]; a[n_] := Sum[Binomial[n, k]*b[k], {k, 0, n}] // Numerator; Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Jan 30 2014 *)

Formula

(a(n+1) - a(n))/A027642(n) = A165161(n)/A051717(n+1).
(A164558(n) - a(n))/A027642(n) = 2's = A007395.
(a(n) - A164555(n))/A027642(n) = n - 2 = A023444(n).

A023446 n-4.

Original entry on oeis.org

-4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Range[0,60]-4 (* Harvey P. Dale, Sep 17 2022 *)
  • PARI
    a(n)=n-4

Formula

a(n) = 2 a(n-1) - a(n-2). a(n) = -A022960(n). G.f.: -(4-5*x)/(1-x)^2. - M. F. Hasler, Apr 18 2015
Showing 1-10 of 13 results. Next