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 11-12 of 12 results.

A357813 a(n) is the least number k such that the sum of n^2 consecutive primes starting at prime(k) is a square.

Original entry on oeis.org

3, 1, 78, 333, 84, 499, 36, 1874, 1102, 18, 183, 2706, 23, 104, 739, 1055, 8435, 633, 42130, 13800, 942, 55693, 7449, 13270, 41410, 4317, 17167, 61999, 17117, 9161, 46704, 12447, 2679, 2971, 3946, 103089, 6359, 19601, 7240, 422, 690, 20851, 963, 36597, 3559, 111687, 12926, 4071, 30622, 6355
Offset: 2

Views

Author

Jean-Marc Rebert, Nov 12 2022

Keywords

Examples

			Define sp(k,n) to be the sum of n^2 consecutive primes starting at prime(k).
a(2) = 3 because sp(k,2) at k=3 is 5 + 7 + 11 + 13 = 36 = 6^2, a square, and no smaller k has this property.
a(3) = 1 because sp(k,3) at k=1 is 2 + 3 + 5 + 7 + 11 + 13 + 17 + 19 + 23 = 100 = 10^2, a square, and no smaller k has this property.
a(4) = 78 because sp(k,4) at k=78 is 397 + 401 + ... + 487 = 7056 = 84^2, a square, and no smaller k has this property.
		

Crossrefs

Cf. A358156. Subsequence of A230327.

Programs

  • PARI
    \\ sum of n^2 consecutive primes starting at prime(k).
    sp(k,n)=my(u=primes([prime(k),prime(k+n*n-1)]));return(vecsum(u))
    \\ Least number k such that sp(k,n) is a square.
    a(n)=my(k=1);while(!issquare(sp(k,n)),k++);k
    
  • PARI
    a(n) = { my(pr = primes(n^2), s = vecsum(pr), startprime = nextprime(pr[#pr] + 1), res = 1); pr = List(pr); forprime(p = startprime, oo, if(issquare(s), return(res); ); res++; s += (p - pr[1]); listput(pr, p); listpop(pr, 1); ) } \\ David A. Corneth, Nov 13 2022

Formula

a(n) = A230327(n^2).

A125270 Coefficient of x^2 in polynomial whose zeros are 5 consecutive primes starting with the n-th prime.

Original entry on oeis.org

1358, 3954, 10478, 22210, 43490, 78014, 129530, 206650, 324350, 466270, 621466, 853742, 1132130, 1436690, 1870850, 2388050, 2886370, 3440410, 4133410, 4904906, 5926654, 7195670, 8425430, 9792950, 11040910, 12098990, 13917898, 16097810
Offset: 1

Views

Author

Artur Jasinski, Jan 16 2007

Keywords

Comments

Sums of all distinct products of 3 out of 5 consecutive primes, starting with the n-th prime; value of 3rd elementary symmetric function on the 5 consecutive primes.

Crossrefs

Programs

  • Mathematica
    a = {}; Do[AppendTo[a, (Prime[x] Prime[x + 1] Prime[x + 2] + Prime[x] Prime[x + 1] Prime[x + 3] + Prime[x] Prime[x + 1] Prime[x + 4] + Prime[x] Prime[x + 2] Prime[x + 3] + Prime[x] Prime[x + 2] Prime[x + 4] + Prime[x] Prime[x + 3] Prime[x + 4] + Prime[x + 1] Prime[x + 2] Prime[x + 3] + Prime[x + 1] Prime[x + 2] Prime[x + 4] + Prime[x + 1] Prime[x + 3] Prime[x + 4] + Prime[x + 2] Prime[x + 3] Prime[x + 4])], {x, 1, 100}]; a
    fcp[{p_,q_,r_,s_,t_}]:=p*q(r+s+t)+(p+q)r(s+t)+(p+q+r)s*t; fcp/@Partition[ Prime[ Range[40]],5,1] (* Harvey P. Dale, Sep 05 2014 *)

Formula

Let p = Prime(n), q = Prime(n+1), r = Prime(n+2), s = Prime(n+3) and t = Prime(n+4). Then a(n) = p q (r+s+t) + (p + q) r (s + t) + (p + q + r) s t.

Extensions

Edited and corrected by Franklin T. Adams-Watters, Jan 23 2007
Previous Showing 11-12 of 12 results.