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.

A154495 a(n+1)-+a(n)=prime, a(n+1)*a(n)=Average of twin prime pairs, a(1)=2,a(2)=9.

Original entry on oeis.org

2, 9, 20, 33, 40, 141, 298, 435, 536, 687, 884, 1197, 1244, 1665, 1792, 2235, 2486, 2595, 2602, 3765, 3784, 4095, 4148, 4605, 4868, 5061, 5330, 6159, 6220, 6579, 6662, 7119, 7162, 7341, 8288, 10791, 11438, 11859, 12142, 12825, 13274, 14553, 14734
Offset: 1

Views

Author

Keywords

Comments

Sum and difference of any of two consecutive numbers in current sequence are prime numbers and multiplication and any two consecutive numbers is Average of twin prime pairs : 9-2=7;9+2=11;9*2=18, ...

Crossrefs

Programs

  • Maple
    A:= 2,9: b:= 9:
    for i from 3 to 100 do
      p:= 2:
      do
        p:= nextprime(p);
        k:= b + p;
        if isprime(b*k+1) and isprime(b*k-1) and isprime(k+b) then
           A:= A,k; b:= k; break
    fi od od:
    A; # Robert Israel, Jan 01 2024
  • Mathematica
    a=2;b=9;lst={a,b};Do[If[PrimeQ[n-b]&&PrimeQ[n+b]&&PrimeQ[n*b-1]&&PrimeQ[n*b+1],AppendTo[lst,n];a=b;b=n],{n,b+1,9!}];lst

Extensions

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