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 10 results.

A056222 Image of partition numbers (A000041) under "little Hankel" transform that sends [c_0, c_1, ...] to [d_0, d_1, ...] where d_n = c_n^2 - c_{n+1}*c_{n-1}.

Original entry on oeis.org

-1, 1, -1, 4, -6, 16, -17, 34, -24, 84, -98, 273, -194, 449, -209, 1089, -726, 2695, -1295, 5049, -990, 10044, -3125, 23335, -2936, 40516, 3052, 82874, 3553, 171086, 25168, 307395, 104259, 577831, 206819, 1149058, 488114, 2030380, 1156155, 3805389, 2233077, 7109113
Offset: 0

Views

Author

N. J. A. Sloane, Aug 06 2000

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_]:=PartitionsP[n+1]^2-PartitionsP[n]PartitionsP[n+2]; Array[a,40,0] (* Stefano Spezia, Jul 15 2024 *)

Extensions

a(40)-a(41) from Stefano Spezia, Jul 15 2024

A056141 a(n) = primefloor(n)*primeceiling(n) - previousprime(n)*nextprime(n).

Original entry on oeis.org

-1, 0, 4, 0, -6, 0, 0, 0, 30, 0, -18, 0, 0, 0, 42, 0, -30, 0, 0, 0, -22, 0, 0, 0, 0, 0, 128, 0, -112, 0, 0, 0, 0, 0, 98, 0, 0, 0, 90, 0, -78, 0, 0, 0, -70, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 248, 0, -232, 0, 0, 0, 0, 0, 158, 0, 0, 0, 150, 0, -280, 0, 0, 0, 0, 0, 182
Offset: 3

Views

Author

Henry Bottomley, Jun 15 2000

Keywords

Examples

			a(3)=3*3-2*5=-1, a(4)=3*5-3*5=0
		

Crossrefs

Cf. A056221 (nonzero terms).

Programs

  • PARI
    a(n) = if (isprime(n), n^2 - precprime(n-1)*nextprime(n+1), 0); \\ Michel Marcus, Mar 22 2020

Formula

a(n) = A007917(n)*A007918(n) - A007917(n-1)*A007918(n+1).
a(n) = A030664(n) - A013638(n).
a(n) = A056140(n) - A056139(n).
a(n) = A056140(n) if n is prime, a(n)=0 otherwise.

Extensions

More terms from Michel Marcus, Mar 22 2020

A324795 a(n) = 2*p(n)*p(n+2) - p(n+1)^2 where p(k) = k-th prime.

Original entry on oeis.org

11, 17, 61, 61, 205, 205, 421, 573, 585, 1185, 1173, 1501, 2005, 2349, 2737, 2985, 4185, 4173, 4741, 5889, 5877, 7173, 8181, 8569, 9781, 11005, 11005, 12301, 14917, 13477, 17637, 17649, 21505, 19777, 23985, 24577, 25869, 28509, 29857, 30585, 35617
Offset: 1

Views

Author

N. J. A. Sloane, Sep 10 2019

Keywords

Comments

Theorem: a(n) > 0. Proof: Use p(n+1) <= 2 p(n)^2 for n > 4. (See Sándor et al.) QED

References

  • József Sándor, Dragoslav S. Mitrinovic, and Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, Chapter VII, p. 247, section VII.18.b.

Crossrefs

Cf. A056221 (if leading coefficient 2 is changed to 1), A327447 or A309487 (if 2 is changed to 4).

Programs

  • Mathematica
    With[{p = Prime[Range[50]]}, 2 * p[[1;;-3]] * p[[3;;-1]] - p[[2;;-2]]^2] (* Amiram Eldar, Apr 25 2024 *)

A342567 a(n) = (prime(n)^2 - prime(n-1)*prime(n+1))/2, n >= 3.

Original entry on oeis.org

2, -3, 15, -9, 21, -15, -11, 64, -56, 49, 45, -39, -35, 18, 124, -116, 79, 75, -140, 91, -71, -65, 210, 105, -99, 111, -105, -537, 663, -119, 280, -546, 606, -296, 18, 175, -155, 18, 364, -714, 774, -189, 201, -983, 72, 916, 231, -225, -221, 484, -954, 532, 18, 18
Offset: 3

Views

Author

Hugo Pfoertner, Jun 20 2021

Keywords

Crossrefs

Cf. A056221.

Programs

  • Mathematica
    a[n_]:=(Prime[n]^2 - Prime[n-1]*Prime[n+1])/2; Array[a,54,3] (* Stefano Spezia, Jul 15 2024 *)
  • PARI
    forprime(p=5,265,my(pp=precprime(p-1),pn=nextprime(p+1));print1((p^2-pp*pn)/2,", "))
    
  • Python
    from primesieve.numpy import n_primes
    primesarray = numpy.array(n_primes(10005,1))
    for i in range (2, 10003):
         print(((primesarray[i]**2)-(primesarray[i-1]*primesarray[i+1]))//2)
         # Karl-Heinz Hofmann, Jun 20 2021

Formula

a(n) = A056221(n-1)/2 for n >= 3.

A350200 Array read by antidiagonals: T(n,k) is the determinant of the Hankel matrix of the 2*n-1 consecutive primes starting at the k-th prime, n >= 0, k >= 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 1, 5, -4, -2, 1, 7, 6, 12, 0, 1, 11, -30, -72, 144, 288, 1, 13, 18, 72, 0, 576, -1728, 1, 17, -42, -72, 288, 1152, -7104, -26240, 1, 19, 30, -96, 144, -1248, -11712, 45248, 222272, 1, 23, 22, -188, 488, -112, -11360, 21184, 450432, 1636864
Offset: 0

Views

Author

Pontus von Brömssen, Dec 19 2021

Keywords

Examples

			Array begins:
  n\k|      1      2       3       4       5       6       7       8
  ---+--------------------------------------------------------------
   0 |      1      1       1       1       1       1       1       1
   1 |      2      3       5       7      11      13      17      19
   2 |      1     -4       6     -30      18     -42      30      22
   3 |     -2     12     -72      72     -72     -96    -188    -480
   4 |      0    144       0     288     144     488    1800    2280
   5 |    288    576    1152   -1248    -112    4432   -1552   15952
   6 |  -1728  -7104  -11712  -11360  -10816   29952  -89152  -57088
   7 | -26240  45248   21184 -103168  -43264 -605440 -379264  271552
   8 | 222272 450432 1068800 2022912 3927552 5399552 6315904 6861312
T(3,2) = 12, the determinant of the Hankel matrix
  [3  5  7]
  [5  7 11]
  [7 11 13].
		

Crossrefs

Cf. A350201.
Cf. A000012 (row n = 0), A000040 (row n = 1), A056221 (row n = 2 with opposite sign), A024356 (column k = 1), A071543 (column k = 2).

Programs

  • Python
    from sympy import Matrix,prime,nextprime
    def A350200(n,k):
        p = [prime(k)] if n > 0 else []
        for i in range(2*n-2): p.append(nextprime(p[-1]))
        return Matrix(n,n,lambda i,j:p[i+j]).det()

Extensions

Offset corrected by Pontus von Brömssen, Aug 25 2022

A092386 Let p(n) = n-th prime; a(n) = largest prime factor of (p(n+1)^2 - p(n)*p(n+2)).

Original entry on oeis.org

1, 2, 3, 5, 3, 7, 5, 11, 2, 7, 7, 5, 13, 7, 3, 31, 29, 79, 5, 7, 13, 71, 13, 7, 7, 11, 37, 7, 179, 17, 17, 7, 13, 101, 37, 3, 7, 31, 3, 13, 17, 43, 7, 67, 983, 3, 229, 11, 5, 17, 11, 53, 19, 3, 3, 17, 67, 17, 19, 17, 43, 521, 7, 103, 173, 683, 23, 233, 23, 31, 67, 23, 3, 23, 53, 73, 5
Offset: 0

Views

Author

Frank Schwellinger (nummer_eins(AT)web.de), Mar 20 2004

Keywords

Crossrefs

Programs

  • Mathematica
    Table[ FactorInteger[Prime[n + 1]^2 - Prime[n]Prime[n + 2]][[ -1, 1]], {n, 80}] (* Robert G. Wilson v, Mar 24 2004 *)

Formula

a(n) = A006530(A056221(n)).

Extensions

More terms from Robert G. Wilson v, Mar 24 2004

A106671 a(n) = ( prime(n + 2) * prime(n) - prime(n + 1)^2 ) modulo 3.

Original entry on oeis.org

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

Views

Author

Roger L. Bagula, May 13 2005

Keywords

Crossrefs

Programs

  • Mathematica
    a = Table[Mod[Prime[n + 2]*Prime[n] - Prime[n + 1]^2, 3], {n, 1, 200}]
    Mod[#[[3]]#[[1]]-#[[2]]^2,3]&/@Partition[Prime[Range[110]],3,1] (* Harvey P. Dale, Oct 03 2015 *)
  • PARI
    a(n) = (prime(n + 2)*prime(n) - prime(n + 1)^2) % 3; \\ Michel Marcus, Apr 21 2017

Formula

a(n) = A056221(n) mod 3 = A010872(A056221(n)). - Michel Marcus, Apr 21 2017

A327434 Prime(n)^2 - prime(n-1)*prime(n+1) for n in A046868.

Original entry on oeis.org

4, 30, 42, 128, 98, 90, 36, 248, 158, 150, 182, 420, 210, 222, 1326, 560, 1212, 36, 350, 36, 728, 1548, 402, 144, 1832, 462, 968, 1064, 36, 36, 1088, 578, 570, 3126, 630, 2732, 2796, 782, 36, 782, 1620, 3372, 3468, 902, 1860, 930, 2012, 1980, 2028, 5234, 6600
Offset: 1

Views

Author

Chai Wah Wu, Sep 10 2019

Keywords

Comments

Positive terms in A056221.

Crossrefs

A139312 Characteristic function of the good primes (version 1).

Original entry on oeis.org

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

Views

Author

Roger L. Bagula, Jun 07 2008

Keywords

Comments

a(n)=1 if prime(n)^2 - prime(n-1)*prime(n+1) >=0, else a(n)=0.

Crossrefs

Programs

  • Mathematica
    f[n_] := If[ Prime[n]^2 - Prime[n - 1]*Prime[n + 1] > 0, 1, 0]; Array[f, 105, 2] (*alternative formula: derived*) Solve[x^2 - (x - a)*(x + b) == 0, x]; a = -Prime[n - 1] + Prime[n]; b = -Prime[n] + Prime[n + 1]; f[n_] = If[-Prime[-1 + n] + 2 Prime[n] - Prime[1 + n] == 0, 0, a*b/(b - a)]; Table[ If[ f[n] > 0, 0, 1], {n, 2, 106}]
    If[#[[2]]^2-(#[[1]]#[[3]])>=0,1,0]&/@Partition[Prime[Range[110]],3,1] (* Harvey P. Dale, Jan 25 2015 *)
  • PARI
    a(n)=my(p=prime(n));p^2>=precprime(p-1)*nextprime(p+1) \\ Charles R Greathouse IV, Jun 24 2011

Formula

a(n) = 1 if A056221(n-1)<=0, else a(n)=0.

Extensions

All entries corrected. - R. J. Mathar, Charles R Greathouse IV Robert G. Wilson v, Jun 16 2011

A381374 Little Hankel transform of A317614: a(n) = A317614(n+1)^2 - A317614(n)*A317614(n+2).

Original entry on oeis.org

1, 1, 97, 49, 769, 289, 2977, 961, 8161, 2401, 18241, 5041, 35617, 9409, 63169, 16129, 104257, 25921, 162721, 39601, 242881, 58081, 349537, 82369, 487969, 113569, 663937, 152881, 883681, 201601, 1153921, 261121, 1481857, 332929, 1875169, 418609, 2342017, 519841, 2891041
Offset: 1

Views

Author

Stefano Spezia, Feb 21 2025

Keywords

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{0,5,0,-10,0,10,0,-5,0,1},{1,97,49,769,289,2977,961,8161,2401,18241},38]

Formula

a(n) = (10 + 6*(-1)^n + 4*n*(n + 2)*(3*(n + 1)^2 + (-1)^n*(2*n^2 + 4*n + 5)))/16.
a(n) = 5*a(n-2) - 10*a(n-4) + 10*a(n-6) - 5*a(n-8) + a(n-10) for n > 10.
G.f.: (1 + x + 92*x^2 + 44*x^3 + 294*x^4 + 54*x^5 + 92*x^6 - 4*x^7 + x^8 + x^9)/(1 - x^2)^5.
E.g.f.: ((4 + 3*x + 123*x^2 + 10*x^3 + 5*x^4)*cosh(x) + (1 + 69*x + 21*x^2 + 50*x^3 + x^4)*sinh(x))/4.
a(2*n) = A239607(n).
Showing 1-10 of 10 results.