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-6 of 6 results.

A024447 Sum of the products of the primes taken 2 at a time from the first n primes.

Original entry on oeis.org

0, 6, 31, 101, 288, 652, 1349, 2451, 4222, 7122, 11121, 17041, 25118, 35352, 48559, 65943, 88422, 115262, 148829, 189157, 235804, 292052, 357705, 435491, 528902, 635962, 755545, 890793, 1040232, 1207472, 1409783, 1635103, 1888690, 2165022, 2481945
Offset: 1

Views

Author

Keywords

Comments

a(n) is the 2nd elementary symmetric function of the first n+1 primes.
Using the identity that (x_1 + x_2 + ... + x_n)^2 - (x_1^2 + x_2^2 + ... + x_n^2) is the sum of the products taken two at a time, a(n) can be expressed with the sum of the primes and the sum of the prime squared. Since they both have asymptotic formulas, this yields an asymptotic formula for this sequence. - Timothy Varghese, May 06 2014

Crossrefs

Programs

  • Maple
    Primes:= [seq](ithprime(i),i=1..100):
    (map(`^`,ListTools:-PartialSums(Primes),2) - ListTools:-PartialSums(map(`^`,Primes,2)))/2; # Robert Israel, Sep 24 2015
  • Mathematica
    a[1] = 0; a[n_] := a[n] = a[n-1] + Prime[n]*Total[Prime[Range[n-1]]];
    Array[a, 35] (* Jean-François Alcover, Feb 28 2019 *)
  • PARI
    /* Extra memory allocation could be required. */
    Primes=List();
    forprime(x=2,prime(500000),listput(Primes,x));
    /* Keep previous lines global, before a(n) */
    a(n)={my(p=vector(n,j,Primes[j]),s=0);forvec(y=vector(2,i,[1,#p]),s+=(p[y[1]]*p[y[2]]),2);s} \\ R. J. Cano, Oct 11 2015

Formula

a(1) = 0, a(n+1) = prime(n+1)*(sum of first n primes) + a(n), for n > 1.
a(n) = ((A007504(n))^2 - A024450(n))/2. - Timothy Varghese, May 06 2014
a(n) ~ (3*n^4*log^2(n) - 4*n^3*log^2(n))/24. - Timothy Varghese, May 06 2014

A238146 Triangle read by rows: T(n,k) is coefficient of x^(n-k) in consecutive prime rooted polynomial of degree n, P(x) = Product_{k=1..n} (x-p(k)) = 1*x^n + T(n,1)*x^(n-1)+ ... + T(n,k-1)*x + T(n,k), for 1 <= k <= n.

Original entry on oeis.org

-2, -5, 6, -10, 31, -30, -17, 101, -247, 210, -28, 288, -1358, 2927, -2310, -41, 652, -5102, 20581, -40361, 30030, -58, 1349, -16186, 107315, -390238, 716167, -510510, -77, 2451, -41817, 414849, -2429223, 8130689, -14117683, 9699690
Offset: 1

Views

Author

Fedor Igumnov, Feb 18 2014

Keywords

Comments

The coefficient of first polynomial term with highest degree is always 1.
Each number in triangle is the sum of radicals of integers.
The absolute value of the entry in the k-th column is the k-th elementary symmetric function of the first n+(k-1) primes.

Examples

			Triangle begins:
================================================
\k |    1     2     3     4     5     6     7
n\ |
================================================
1  |  -2;
2  |  -5,   6;
3  |  -10,  31,   -30;
4  |  -17, 101,  -247,  210;
5  |  -28, 288, -1358,  2927,  -2310;
6  |  -41, 652, -5102, 20581, -40361, 30030;
7  |  -58,1349,-16186,107315,-390238,716167,-510510;
So equation x^7 -58*x^6 + 1349*x^5 -16186*x^4 + 107315*x^3 -390238*x^2+ 716167*x -510510 = 0 has 7 consecutive prime roots: 2,3,5,7,11,13,17
		

Crossrefs

Cf. A007504 (abs of column 1) A002110(abs of right border). Also:
A024447 is the abs of column 2;
A024448 is the abs of column 3;
A024449 is the abs of column 4;
A006939 is the determinant of triangle matrix, considering T(n,k) k>n = 0;
A007947 = radicals of integers.

Programs

  • Maple
    T:= n-> (p-> seq(coeff(p, x, n-i), i=1..n))(mul(x-ithprime(i), i=1..n)):
    seq(T(n), n=1..10);  # Alois P. Heinz, Aug 18 2019
  • Mathematica
    a = 1
    For [i = 1, i < 10, i++,
    a *= (x - Prime[i]);
    Print[Drop[Reverse[CoefficientList[Expand[a], x]], 1]]
    ]

Extensions

Name edited by Alois P. Heinz, Aug 18 2019

A309802 a(n) is the coefficient of x^n in the polynomial Product_{i=1..n+2} (prime(i)*x-1).

Original entry on oeis.org

1, 10, 101, 1358, 20581, 390238, 8130689, 201123530, 6166988769, 201097530280, 7754625545261, 329758834067168, 14671637258193181, 711027519310719868, 38706187989054920001, 2338431642812927422310, 145908145906128304198449, 9976861293427674211625032
Offset: 0

Views

Author

Alexey V. Bazhin, Aug 17 2019

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> coeff(mul(ithprime(i)*x-1, i=1..n+2), x, n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Aug 18 2019

Formula

a(n) = [x^n] Product_{i=1..n+2} (prime(i)*x-1).
a(n) = abs(A070918(n+2,2)).
a(n) = abs(A238146(n+2,n)) for n>0.
a(n) = A260613(n+2,n).

A309803 a(n) is the coefficient of x^n in the polynomial Product_{i=1..n+3} (prime(i)*x-1).

Original entry on oeis.org

-1, -17, -288, -5102, -107315, -2429223, -64002818, -2057205252, -69940351581, -2788890538777, -122099137635118, -5580021752377242, -276932659619923555, -15388458479166668283, -946625238259888348698, -60082571176666116692888, -4171440414742758122621945
Offset: 0

Views

Author

Alexey V. Bazhin, Aug 17 2019

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> coeff(mul(ithprime(i)*x-1, i=1..n+3), x, n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Aug 19 2019

Formula

a(n) = [x^n] Product_{i=1..n+3} (prime(i)*x-1).
a(n) = -abs(A070918(n+3,3)).
a(n) = -abs(A238146(n+3,n)) for n>0.
a(n) = -A260613(n+3,n).

A309804 a(n) is the coefficient of x^n in the polynomial Product_{i=1..n+4} (prime(i)*x-1).

Original entry on oeis.org

1, 28, 652, 16186, 414849, 11970750, 411154568, 14802996860, 617651235401, 28112591190218, 1330940558814492, 68134228016658366, 3888046744502816953, 244783216404832868510, 15878401438954693327808, 1123935467586630569656024, 83970858613393528568199649
Offset: 0

Views

Author

Alexey V. Bazhin, Aug 17 2019

Keywords

Crossrefs

Programs

  • Maple
    a:= n-> coeff(mul(ithprime(i)*x-1, i=1..n+4), x, n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Aug 19 2019
  • Mathematica
    a[n_] := CoefficientList[Series[Product[Prime[i]*x - 1, {i, 1, n+4}], {x, 0, 25}], x] [[n+1]]; Array[a, 17, 0] (* Amiram Eldar, Aug 24 2019 *)
  • PARI
    a(n) = polcoef(prod(i=1, n+4, prime(i)*x-1), n); \\ Michel Marcus, Aug 25 2019

Formula

a(n) = [x^n] Product_{i=1..n+4} (prime(i)*x-1).
a(n) = abs(A070918(n+4,4)).
a(n) = abs(A238146(n+4,n)) for n>0.
a(n) = A260613(n+4,n).

A127493 Indices k such that the coefficient [x^1] of the polynomial Product_{j=0..4} (x-prime(k+j)) is prime.

Original entry on oeis.org

1, 5, 8, 9, 22, 29, 45, 49, 60, 69, 87, 89, 90, 107, 114, 124, 125, 131, 134, 138, 145, 156, 171, 183, 188, 191, 203, 204, 207, 212, 219, 255, 261, 290, 298, 303, 329, 330, 343, 344, 349, 354, 378, 397, 398, 400, 403, 454, 456, 466, 474, 515, 549, 560, 570, 578
Offset: 1

Views

Author

Artur Jasinski, Jan 16 2007

Keywords

Comments

A fifth-order polynomial with 5 roots which are the five consecutive primes from prime(k) onward is defined by Product_{j=0..4} (x-prime(k+j)). The sequence is a catalog of the cases where the coefficient of its linear term is prime.
Indices k such that e4(prime(k), prime(k+1), ..., prime(k+4)) is prime, where e4 is the elementary symmetric polynomial summing all products of four variables. - Charles R Greathouse IV, Jun 15 2015

Examples

			For k=2, the polynomial is (x-3)*(x-5)*(x-7)*(x-11)*(x-13) = x^5-39*x^4+574*x^3-3954*x^2+12673*x-15015, where 12673 is not prime, so k=2 is not in the sequence.
For k=5, the polynomial is x^5-83*x^4+2710*x^3-43490*x^2+342889*x-1062347, where 342889 is prime, so k=5 is in the sequence.
		

Crossrefs

Programs

  • Maple
    isA127493 := proc(k)
        local x,j ;
        mul( x-ithprime(k+j),j=0..4) ;
        expand(%) ;
        isprime(coeff(%,x,1)) ;
    end proc:
    A127493 := proc(n)
        option remember ;
        if n = 1 then
            1;
        else
            for a from procname(n-1)+1 do
                if isA127493(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A127493(n),n=1..60) ; # R. J. Mathar, Apr 23 2023
  • Mathematica
    a = {}; Do[If[PrimeQ[(Prime[x] Prime[x + 1]Prime[x + 2]Prime[x + 3] + Prime[x] Prime[x + 2]Prime[x + 3]Prime[x + 4] + Prime[x] Prime[x + 1]Prime[x + 3]Prime[x + 4] + Prime[x] Prime[x + 1]Prime[x + 2]Prime[x + 4] + Prime[x + 1] Prime[x + 2]Prime[x + 3]Prime[x + 4])], AppendTo[a, x]], {x, 1, 1000}]; a
  • PARI
    e4(v)=sum(i=1,#v-3, v[i]*sum(j=i+1,#v-2, v[j]*sum(k=j+1,#v-1, v[k]*vecsum(v[k+1..#v]))))
    pr(p, n)=my(v=vector(n)); v[1]=p; for(i=2,#v, v[i]=nextprime(v[i-1]+1)); v
    is(n,p=prime(n))=isprime(e4(pr(p,5)))
    v=List(); n=0; forprime(p=2,1e4, if(is(n++,p), listput(v,n))); Vec(v) \\ Charles R Greathouse IV, Jun 15 2015

Extensions

Definition and comment rephrased and examples added by R. J. Mathar, Oct 01 2009
Showing 1-6 of 6 results.