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.

A289361 Least sum s of three consecutive primes such that s is a multiple of the n-th prime.

Original entry on oeis.org

10, 15, 10, 49, 121, 143, 187, 551, 23, 319, 31, 407, 41, 301, 235, 159, 59, 1891, 1943, 71, 803, 395, 83, 2759, 97, 1717, 3193, 749, 109, 565, 3175, 131, 2329, 1807, 7301, 6493, 471, 1793, 1169, 173, 1611, 5611, 2101, 3281, 985, 199, 211, 223, 1135, 4351, 5359, 11233, 2651
Offset: 1

Views

Author

Zak Seidov, Jul 04 2017

Keywords

Comments

Are all terms distinct? Is a(1)=a(3)=10 the only case of equality?

Examples

			a(1)=10=A034961(1), a(2)=15=A034961(2), a(3)=319=A034961(27).
		

Crossrefs

Cf. A034961, A034962 (subsequence).

Programs

  • Mathematica
    Table[Function[p, k = 1; While[! Divisible[Set[s, Total@ Prime@ Range[k, k + 2]], p], k++]; s]@ Prime@ n, {n, 53}] (* or *)
    s = Total /@ Partition[Prime@ Range[10^4], 3, 1]; Table[SelectFirst[s, Divisible[#, Prime@ n] &], {n, 53}] (* Michael De Vlieger, Jul 04 2017 *)
  • PARI
    a(n)=p = 2; q = 3; pn = prime(n); forprime(r=5,,if (((s=p+q+r) % pn) == 0, return (s)); p = q; q = r;); \\ Michel Marcus, Jul 04 2017
    
  • PARI
    isA034961(n)=my(p=precprime(n\3),q=nextprime(n\3+1),r=n-p-q); if(r>q, r==nextprime(q+2), r==precprime(p-1) && r)
    a(n,p=prime(n))=if(p==5, return(10)); my(k=1); while(!isA034961(p*k), k+=2); p*k \\ Charles R Greathouse IV, Jul 05 2017