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

A197422 Primes of the form sum_{j=1..n} (-1)^j *prime(j)*prime(j+1).

Original entry on oeis.org

1103, 9281, 10949, 12157, 26921, 48757, 61949, 87407, 92459, 95923, 124087, 162859, 198811, 289417, 363809, 467183, 530983, 754981, 792307, 830677, 1124051, 1537373, 1662307, 1706251, 1830401, 2023183, 2507963, 2534879, 3358099, 3616721, 3912901, 3929707
Offset: 1

Views

Author

Michel Lagneau, Oct 14 2011

Keywords

Comments

We select primes in the alternating partial sums of A006094 (which start -6, 9, -26, 51, -92, 129, -194, 243,...).
The corresponding values of n are 14, 32, 34, 36, 50, 64, 70, 80,...

Examples

			For n = 14, a(1) = 1103 = - 2*3 + 3*5 - 5*7 + ....+ 43*47 where 43 = prime(14) and 47 = prime(15).
		

Crossrefs

Cf. A197421.

Programs

  • Maple
    p:=0:for n from 1 to 500 do:p:=p+((-1)^n)* ithprime(n)*ithprime(n+1):if type(p,prime)=true then printf(`%d, `,p): else fi:od:
  • Mathematica
    Select[Accumulate[Times@@@Partition[Riffle[Times@@@Partition[ Prime[ Range[ 500]],2,1],{-1,1},{2,-1,2}],2]],PrimeQ] (* Harvey P. Dale, Feb 17 2015 *)

A197614 a(n) is the smallest prime of the form Sum_{j=1..k} prime(j)*prime(j+1)*...*prime(j+n).

Original entry on oeis.org

44839, 82193, 630859553, 2525696897, 1910131806019, 14899669504506112147, 60135213227903643780817, 4812219756324961, 341826385983784841, 3490785573251518581776138393, 1025219842099467656125852928369, 14472211420055197111499933838371
Offset: 1

Views

Author

Michel Lagneau, Oct 16 2011

Keywords

Comments

Generalization of A197421.

Examples

			For n=1, k=22 gives the smallest prime of the form Sum_{j=1..k} prime(j)*prime(j+1) = 44839 = 2*3 + 3*5 + 5*7 + ... + 79*83 where 79 = prime(22) and 83 = prime(23).
		

Crossrefs

Programs

  • Maple
    for n from 1 to 20 do:i:=0:p:=0:for j from 1 to 1000 while(i=0) do: uu:=1:for k from 0 to n do: uu:=uu*ithprime(j+k):od:p:=p+uu:if type(p,prime)=true then i:=1: printf(`%d, `,p):else fi:od:od:
  • PARI
    a(n) = my(k=1, p); while (!isprime(p=sum(j=1, k, prod(i=0, n, prime(j+i)))), k++); p; \\ Michel Marcus, Feb 21 2023
Showing 1-2 of 2 results.