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 31-40 of 75 results. Next

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

A270109 a(n) = n^3 + (n+1)*(n+2).

Original entry on oeis.org

2, 7, 20, 47, 94, 167, 272, 415, 602, 839, 1132, 1487, 1910, 2407, 2984, 3647, 4402, 5255, 6212, 7279, 8462, 9767, 11200, 12767, 14474, 16327, 18332, 20495, 22822, 25319, 27992, 30847, 33890, 37127, 40564, 44207, 48062, 52135, 56432, 60959, 65722, 70727, 75980, 81487, 87254
Offset: 0

Views

Author

Bruno Berselli, Mar 11 2016, at the suggestion of Giuseppe Amoruso in BASE Cinque forum

Keywords

Comments

For n>1, many consecutive terms of the sequence are generated by floor(sqrt(n^2 + 2)^3) + n^2 + 2.
It appears that this is a subsequence of A000037 (the nonsquares).
The primes in the sequence belong to A045326.
Inverse binomial transform is 2, 5, 8, 6, 0, 0, 0, ... (0 continued).

Crossrefs

Subsequence of A001651, A047212.
Cf. A027444: numbers of the form n^3+n*(n+1); A085490: numbers of the form n^3+(n-1)*n.
Cf. A008865: numbers of the form n+(n+1)*(n+2); A130883: numbers of the form n^2+(n+1)*(n+2).

Programs

  • Magma
    [n^3+(n+1)*(n+2): n in [0..50]];
  • Mathematica
    Table[n^3 + (n + 1) (n + 2), {n, 0, 50}]
  • Maxima
    makelist(n^3+(n+1)*(n+2), n, 0, 50);
    
  • PARI
    vector(50, n, n--; n^3+(n+1)*(n+2))
    
  • Sage
    [n^3+(n+1)*(n+2) for n in (0..50)]
    

Formula

O.g.f.: (2 - x + 4*x^2 + x^3)/(1 - x)^4.
E.g.f.: (2 + x)*(1 + x)^2*exp(x).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4), n>3.
a(n+h) - a(n) + a(n-h) = n^3 + n^2 + (6*h^2+3)*n + (2*h^2+2) for any h. This identity becomes a(n) = n^3 + n^2 + 3*n + 2 if h=0.
a(h*a(n) + n) = (h*a(n))^3 + (3*n+1)*(h*a(n))^2 + (3*n^2+2*n+3)*(h*a(n)) + a(n) for any h, therefore a(h*a(n) + n) is always a multiple of a(n).
a(n) + a(-n) = 2*A059100(n) = A255843(n).
a(n) - a(-n) = 4*A229183(n).

A156798 a(n) = n^4 + 5*n^2 + 4.

Original entry on oeis.org

4, 10, 40, 130, 340, 754, 1480, 2650, 4420, 6970, 10504, 15250, 21460, 29410, 39400, 51754, 66820, 84970, 106600, 132130, 162004, 196690, 236680, 282490, 334660, 393754, 460360, 535090, 618580, 711490, 814504, 928330, 1053700, 1191370
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 16 2009

Keywords

Crossrefs

Programs

  • Magma
    [n^4+5*n^2+4: n in [0..50]];
    
  • Mathematica
    Table[n^4+5n^2+4, {n,0,40}]
  • PARI
    a(n)=n^4+5*n^2+4
    
  • Sage
    [(n^2 +1)*(n^2 +4) for n in (0..50)] # G. C. Greubel, Jun 10 2021

Formula

a(n) = A002522(n)*A087475(n) = A000290(n) + A000290(A059100(n)) = A028552(A002522(n)).
a(n) = (n^2 + 1)*(n^2 + 4) = n^2 + (n^2 + 2)^2.
G.f.: 2*(2 -5*x +15*x^2 -5*x^3 +5*x^4)/(1-x)^5. - Maksym Voznyy (voznyy(AT)mail.ru), Jul 26 2009; corrected by R. J. Mathar, Sep 16 2009
a(0)=4, a(1)=10, a(2)=40, a(3)=130, a(4)=340, a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). - Harvey P. Dale, May 04 2011
From Amiram Eldar, Jan 18 2021: (Start)
Sum_{n>=0} 1/a(n) = (1 + Pi*coth(Pi))/8 - Pi*tanh(Pi)/24.
Sum_{n>=0} (-1)^n/a(n) = 1/8 + Pi*csch(Pi)/6 - Pi*csch(Pi)*sech(Pi)/24. (End)
E.g.f.: (4 + 6*x + 12*x^2 + 6*x^3 + x^4)*exp(x). - G. C. Greubel, Jun 10 2021

A160842 Number of lines through at least 2 points of a 2 X n grid of points.

Original entry on oeis.org

0, 1, 6, 11, 18, 27, 38, 51, 66, 83, 102, 123, 146, 171, 198, 227, 258, 291, 326, 363, 402, 443, 486, 531, 578, 627, 678, 731, 786, 843, 902, 963, 1026, 1091, 1158, 1227, 1298, 1371, 1446, 1523, 1602, 1683, 1766, 1851, 1938, 2027, 2118, 2211, 2306, 2403, 2502
Offset: 0

Views

Author

Seppo Mustonen, May 28 2009

Keywords

Crossrefs

Programs

  • Magma
    [0,1] cat [n^2 + 2: n in [2..100]]; // G. C. Greubel, Apr 30 2018
  • Mathematica
    a[n_]:=If[n<2,n,n^2+2] Table[a[n],{n,0,50}]
    Join[{0,1},Range[2,50]^2+2] (* Harvey P. Dale, Feb 06 2015 *)
  • PARI
    Vec(-x*(2*x^3-4*x^2+3*x+1) / (x-1)^3 + O(x^100)) \\ Colin Barker, May 24 2015
    

Formula

a(n) = n^2 + 2 = A059100(n) = A010000(n) for n > 1.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 4. - Colin Barker, May 24 2015
G.f.: -x*(2*x^3 - 4*x^2 + 3*x + 1) / (x-1)^3. - Colin Barker, May 24 2015
Sum_{n>=1} 1/a(n) = Pi * coth(sqrt(2)*Pi) / 2^(3/2) - 1/4. - Vaclav Kotesovec, May 01 2018

A163253 An interspersion: the order array of the odd-numbered columns of the double interspersion at A161179.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jul 23 2009

Keywords

Comments

A permutation of the natural numbers.
Row 1 consists of the squares.
Beginning with row 5, the columns obey a 3rd-order recurrence:
c(n)=c(n-1)+c(n-2)-c(n-3)+1; thus disregarding row 1, the nonsquares are partitioned by this recurrence.
Except for initial terms, the first ten rows match A000290, A002522, A002061, A059100, A014209, A117950, A027688, A087475, A027689, A117951, and the first column, A035106.

Examples

			Corner:
1....4....9...16...25
2....5...10...17...26
3....7...13...21...31
6...11...18...27...38
The double interspersion A161179 begins thus:
1....4....7...12...17...24
2....3....8...11...18...23
5....6...13...16...25...30
9...10...19...22...33...38
Expel the even-numbered columns, leaving
1....7...17...
2....8...18...
5...13...25...
9...19...33...
Then replace each of those numbers by its rank when all the numbers are jointly ranked.
		

Crossrefs

Formula

Let S(n,k) denote the k-th term in the n-th row. Three cases:
S(1,k)=k^2;
if n is even, then S(n,k)=k^2+(n-2)k+(n^2-2*n+4)/4;
if n>=3 is odd, then S(n,k)=k^2+(n-2)k+(n^2-2*n+1)/4.

Extensions

Edited and augmented by Clark Kimberling, Jul 24 2009

A189836 a(n) = n^2 + 11.

Original entry on oeis.org

11, 12, 15, 20, 27, 36, 47, 60, 75, 92, 111, 132, 155, 180, 207, 236, 267, 300, 335, 372, 411, 452, 495, 540, 587, 636, 687, 740, 795, 852, 911, 972, 1035, 1100, 1167, 1236, 1307, 1380, 1455, 1532, 1611, 1692, 1775, 1860, 1947
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Formula

From G. C. Greubel, Jan 13 2018: (Start)
G.f.: (11 - 21*x + 12*x^2)/(1 - x)^3.
E.g.f.: (11 + x + x^2)*exp(x). (End)
From Amiram Eldar, Nov 02 2020: (Start)
Sum_{n>=0} 1/a(n) = (1 + sqrt(11)*Pi*coth(sqrt(11)*Pi))/22.
Sum_{n>=0} (-1)^n/a(n) = (1 + sqrt(11)*Pi*cosech(sqrt(11)*Pi))/22. (End)
From Amiram Eldar, Feb 12 2024: (Start)
Product_{n>=0} (1 - 1/a(n)) = sqrt(10/11)*sinh(sqrt(10)*Pi)/sinh(sqrt(11)*Pi).
Product_{n>=0} (1 + 1/a(n)) = 2*sqrt(3/11)*sinh(2*sqrt(3)*Pi)/sinh(sqrt(11)*Pi). (End)

A132282 Near-cube primes: primes of the form p^3 + 2, where p is noncomposite.

Original entry on oeis.org

2, 3, 29, 127, 24391, 357913, 571789, 1442899, 5177719, 18191449, 30080233, 73560061, 80062993, 118370773, 127263529, 131872231, 318611989, 344472103, 440711083, 461889919, 590589721, 756058033, 865523179, 1095912793
Offset: 1

Views

Author

Jonathan Vos Post, Aug 16 2007

Keywords

Comments

The corresponding near-cube prime indices q are A132281. Analog of near-square primes. After a(1) = 2, all values must be odd. Numbers of the form n^2+2 for n=1, 2, ... are 3, 6, 11, 18, 27, 38, 51, 66, 83, 102, ... (A059100). These are prime for indices n = 1, 3, 9, 15, 21, 33, 39, 45, 57, 81, 99, ... (A067201), corresponding to the near-square primes 3, 11, 83, 227, 443, 1091, 1523, 2027, ... (A056899). Helfgott proves with minor conditions that: "Let f be a cubic polynomial. Then there are infinitely many primes p such that f(p) is squarefree." Note that 47^3 + 2 = 103825 = 5^2 * 4153 and similarly 97^3 + 2 is divisible by 5^2, but otherwise an infinite number of p^3+2 are squarefree.

Examples

			a(1) = 0^3 + 2 = 2 is prime and 0 is noncomposite.
a(2) = 1^3 + 2 = 3 is prime and 1 is noncomposite.
a(3) = 3^3 + 2 = 29 is prime and 3 is prime.
a(4) = 5^3 + 2 = 127 is prime and 5 is prime.
a(5) = 29^3 + 2 = 24391 is prime and 29 is prime.
45^3 + 2 = 91127 is prime, but not in this sequence because 45 is not prime.
63^3 + 2 = 250049 is prime, but not in this sequence because 63 is not prime.
a(6) = 71^3 + 2 = 357913 is prime.
a(7) = 83^3 + 2 = 571789 is prime.
a(8) = 113^3 + 2 = 1442899 is prime.
		

Crossrefs

Programs

  • Mathematica
    Join[{2, 5}, Select[Prime[Range[200]]^3 + 2, PrimeQ[ # ] &]] (* Stefan Steinerberger, Aug 17 2007 *)
  • PARI
    v=[2,3]; forprime(p=3, 1e4, if(isprime(t=p^3+2), v=concat(v, t))); t \\ Charles R Greathouse IV, Feb 14 2011

Formula

a(n) = A132281(n)^3 + 2. {p in A000040 such that for some q = 0, 1, or q in A000040, we have p = A067200(q) = A084380(q) = q^3 + 2 is in A000040}.
a(n) = A048636(n-2) for n >= 3. - Georg Fischer, Nov 03 2018

Extensions

More terms from Stefan Steinerberger, Aug 17 2007
a(2) corrected by Charles R Greathouse IV, Feb 14 2011

A230584 Either two less than a square or two more than a square.

Original entry on oeis.org

2, 3, 6, 7, 11, 14, 18, 23, 27, 34, 38, 47, 51, 62, 66, 79, 83, 98, 102, 119, 123, 142, 146, 167, 171, 194, 198, 223, 227, 254, 258, 287, 291, 322, 326, 359, 363, 398, 402, 439, 443, 482, 486, 527, 531, 574, 578, 623, 627, 674, 678, 727, 731, 782, 786, 839, 843, 898, 902, 959, 963
Offset: 1

Views

Author

Ralf Stephan, Oct 24 2013

Keywords

Comments

Numbers n such that the polynomial x^4 - n*x^2 + 1 is reducible.
The corresponding factorizations are (x^2 + k*x - 1)*(x^2 - k*x - 1) == x^4 - (k^2 + 2)*x^2 + 1 and (x^2 + k*x + 1)*(x^2 - k*x + 1) == x^4 - (k^2 - 2)*x^2 + 1. - Joerg Arndt, Feb 07 2015
Union of A008865 and A059100.
For k > 1: a(2*k+1) - a(2*k) = 4 and a(2*k) - a(2*k-1) = k - 1; for n > 4: a(n) - a(n-2) = 2*floor(n/2) + 1 = A109613(n). - Reinhard Zumkeller, Feb 10 2015

Crossrefs

Programs

  • Haskell
    import Data.List (transpose)
    a230584 n = a230584_list !! (n-1)
    a230584_list = 2 : 3 : concat
                   (transpose [drop 2 a059100_list, drop 2 a008865_list])
    -- Reinhard Zumkeller, Feb 10 2015
  • PARI
    is(n)=issquare(n-2)||issquare(n+2)
    
  • PARI
    A230584_vec(N)=Vec((2+x-x^2-x^3+2*x^5-x^6)/((1-x)^3*(1+x)^2)+O(x^N)) \\ M. F. Hasler, Oct 26 2013
    

Formula

From Colin Barker, Oct 24 2013: (Start)
a(n) = (5-13*(-1)^n+2*(3+(-1)^n)*n+2*n^2)/8 for n>2.
a(n) = (n^2+4*n-4)/4 for n>2 and even.
a(n) = (n^2+2*n+9)/4 for n>2 and odd.
a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5) for n>7.
G.f.: x*(x^6-2*x^5+x^3+x^2-x-2) / ((x-1)^3*(x+1)^2). (End)
After the first two terms 0^2+2 = 2^2-2, 1^2+2, the squares are sufficiently spaced to ensure that the sequence continues 2^2+2, 3^2-2, 3^2+2, 4^2-2, 4^2+2,..., i.e., a(2n-1) = n^2+2, a(2n)=(n+1)^2-2. - M. F. Hasler, Oct 26 2013

A352362 Array read by ascending antidiagonals. T(n, k) = L(k, n) where L are the Lucas polynomials.

Original entry on oeis.org

2, 2, 0, 2, 1, 2, 2, 2, 3, 0, 2, 3, 6, 4, 2, 2, 4, 11, 14, 7, 0, 2, 5, 18, 36, 34, 11, 2, 2, 6, 27, 76, 119, 82, 18, 0, 2, 7, 38, 140, 322, 393, 198, 29, 2, 2, 8, 51, 234, 727, 1364, 1298, 478, 47, 0, 2, 9, 66, 364, 1442, 3775, 5778, 4287, 1154, 76, 2
Offset: 0

Views

Author

Peter Luschny, Mar 18 2022

Keywords

Examples

			Array starts:
n\k 0, 1,  2,   3,    4,     5,      6,       7,        8, ...
--------------------------------------------------------------
[0] 2, 0,  2,   0,    2,     0,      2,       0,        2, ... A010673
[1] 2, 1,  3,   4,    7,    11,     18,      29,       47, ... A000032
[2] 2, 2,  6,  14,   34,    82,    198,     478,     1154, ... A002203
[3] 2, 3, 11,  36,  119,   393,   1298,    4287,    14159, ... A006497
[4] 2, 4, 18,  76,  322,  1364,   5778,   24476,   103682, ... A014448
[5] 2, 5, 27, 140,  727,  3775,  19602,  101785,   528527, ... A087130
[6] 2, 6, 38, 234, 1442,  8886,  54758,  337434,  2079362, ... A085447
[7] 2, 7, 51, 364, 2599, 18557, 132498,  946043,  6754799, ... A086902
[8] 2, 8, 66, 536, 4354, 35368, 287298, 2333752, 18957314, ... A086594
[9] 2, 9, 83, 756, 6887, 62739, 571538, 5206581, 47430767, ... A087798
A007395|A059100|
    A001477 A079908
		

Crossrefs

Cf. A320570 (main diagonal), A114525, A309220 (variant), A117938 (variant), A352361 (Fibonacci polynomials), A350470 (Jacobsthal polynomials).

Programs

  • Maple
    T := (n, k) -> (n/2 + sqrt((n/2)^2 + 1))^k + (n/2 - sqrt((n/2)^2 + 1))^k:
    seq(seq(simplify(T(n - k, k)), k = 0..n), n = 0..10);
  • Mathematica
    Table[LucasL[k, n], {n, 0, 9}, {k, 0, 9}] // TableForm
    (* or *)
    T[ 0, k_] := 2 Mod[k+1, 2]; T[n_, 0] := 2;
    T[n_, k_] := n^k Hypergeometric2F1[1/2 - k/2, -k/2, 1 - k, -4/n^2];
    Table[T[n, k], {n, 0, 9}, {k, 0, 8}] // TableForm
  • PARI
    T(n, k) = ([0, 1; 1, k]^n*[2; k])[1, 1] ;
    export(T)
    for(k = 0, 9, print(parvector(10, n, T(n - 1, k))))

Formula

T(n, k) = Sum_{j=0..floor(k/2)} binomial(k-j, j)*(k/(k-j))*n^(k-2*j) for k >= 1.
T(n, k) = (n/2 + sqrt((n/2)^2 + 1))^k + (n/2 - sqrt((n/2)^2 + 1))^k.
T(n, k) = [x^k] ((2 - n*x)/(1 - n*x - x^2)).
T(n, k) = n^k*hypergeom([1/2 - k/2, -k/2], [1 - k], -4/n^2) for n,k >= 1.

A132281 Noncomposites in A067200. Noncomposites (0, 1) and primes p such that A084380(p) = p^3 + 2 is prime.

Original entry on oeis.org

0, 1, 3, 5, 29, 71, 83, 113, 173, 263, 311, 419, 431, 491, 503, 509, 683, 701, 761, 773, 839, 911, 953, 1031, 1091, 1103, 1151, 1193, 1259, 1283, 1373, 1451, 1523, 1583, 1601, 1733, 1823, 1889, 1931, 2099, 2153, 2213, 2273, 2339, 2351, 2441, 2531, 2543
Offset: 1

Views

Author

Jonathan Vos Post, Aug 16 2007

Keywords

Comments

The corresponding near-cube primes are A132282. Analog of near-square primes. After a(1) = 0, all values must be odd. Numbers of the form n^2+2 for n=1, 2, ... are 3, 6, 11, 18, 27, 38, 51, 66, 83, 102, ... (A059100). These are prime for indices n = 1, 3, 9, 15, 21, 33, 39, 45, 57, 81, 99, ... (A067201), corresponding to the near-square primes 3, 11, 83, 227, 443, 1091, 1523, 2027, ... (A056899). Helfgott proves with minor conditions that: "Let f be a cubic polynomial. Then there are infinitely many primes p such that f(p) is squarefree." Note that 47^3 + 2 = 103825 = 5^2 * 4153 and similarly 97^3 + 2 is divisible by 5^2, but otherwise an infinite number of p^3+2 are squarefree.

Examples

			a(1) = 0 because 0^3 + 2 = 2 is prime and 0 is noncomposite.
a(2) = 1 because 1^3 + 2 = 5 is prime and 1 is noncomposite.
a(3) = 3 because 3^3 + 2 = 29 is prime and 3 is prime.
a(4) = 5 because 5^3 + 2 = 127 is prime and 5 is prime.
a(5) = 29 because 29^3 + 2 = 24391 is prime.
45 is not in the sequence because, although 45^3 + 2 = 91127 is prime, 45 is not prime.
63 is not in the sequence because, although 63^3 + 2 = 250049 is prime, 63 is not prime.
65 is not in the sequence because, although 65^3 + 2 = 274627 is prime, 65 is not prime.
a(6) = 71 because 71^3 + 2 = 357913 is prime.
a(7) = 83 because 83^3 + 2 = 571789 is prime.
a(8) = 113 because 113^3 + 2 = 1442899 is prime.
123 is not in the sequence because, although 123^3 + 2 = 1860869 is prime, 123 is not prime.
		

Crossrefs

Formula

{p in A000040 such that A067200(p) = A084380(p) = p^3 + 2 is in A000040}.
Union of {0,1} and A048637. - R. J. Mathar, Oct 18 2007

Extensions

More terms from R. J. Mathar, Oct 18 2007
Previous Showing 31-40 of 75 results. Next