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

A154500 Sum of any 3 consecutive numbers is prime and |a(n+2) - (a(n+1) + a(n))| is prime, a(1)=3, a(2)=5.

Original entry on oeis.org

3, 5, 11, 13, 17, 23, 27, 33, 37, 39, 63, 65, 69, 93, 95, 105, 111, 115, 123, 129, 145, 147, 165, 175, 183, 219, 229, 285, 315, 319, 357, 363, 367, 393, 411, 425, 447, 489, 493, 549, 555, 563, 615, 669, 713, 729, 765, 775, 801, 807, 839, 885, 897, 901, 915, 933, 941, 945, 957, 995, 1005, 1023, 1051
Offset: 1

Views

Author

Keywords

Examples

			3+5+11=19; 11-(3+5)=3, 5+11+13=29; 13-(5+11)=-3, 11+13+17=41; 17-(11+13)=-7, 13+17+23=53; 23-(13+17)=-7,... .
		

Crossrefs

Programs

  • Maple
    R:= 3,5: count:= 2:
    a:= 3: b:= 5:
    for x from b+2 by 2 while count < 100 do
       if isprime(a+b+x) and isprime(abs(x-(a+b))) then
         R:= R, x; a:= b; b:= x; count:= count+1;
       fi
    od:
    R; # Robert Israel, Nov 29 2023
  • Mathematica
    a=3;b=5;lst={a,b};Do[c=Prime[n];p1=c+a+b;p2=c-(a+b);If[PrimeQ[p1]&&PrimeQ[p2],AppendTo[lst,c];a=b;b=c],{n,5,9!}];lst

Extensions

NAME adapted to offset. - R. J. Mathar, Jun 19 2021
Corrected and extended by Robert Israel, Nov 29 2023

A154501 Sum of any 3 consecutive numbers is prime and a(n+2)-(a(n+1)+a(n)) is prime, a(1)=3,a(2)=11.

Original entry on oeis.org

3, 11, 17, 31, 41, 59, 97, 113, 127, 139
Offset: 1

Views

Author

Keywords

Comments

3+11+17=31;17-(3+11)=3,...

Crossrefs

Programs

  • Mathematica
    a=3;b=11;lst={a,b};Do[c=Prime[n];p1=c+a+b;p2=c-(a+b);If[PrimeQ[p1]&&PrimeQ[p2],AppendTo[lst,c];a=b;b=c],{n,5,9!}];lst

Extensions

NAME adapted to offset. - R. J. Mathar, Jun 19 2021

A154502 Sum of any 3 consecutive numbers is prime and a(n+2)-(a(n+1)+a(n)) is prime, a(1)=3,a(2)=31.

Original entry on oeis.org

3, 31, 37, 71, 89, 157, 163
Offset: 1

Views

Author

Keywords

Comments

3+31+37=71;37-(3+31)=3,...

Crossrefs

Programs

  • Mathematica
    a=3;b=31;lst={a,b};Do[c=Prime[n];p1=c+a+b;p2=c-(a+b);If[PrimeQ[p1]&&PrimeQ[p2],AppendTo[lst,c];a=b;b=c],{n,9,9!}];lst

Extensions

NAME adapted to offset. - R. J. Mathar, Jun 19 2021
Showing 1-3 of 3 results.