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

A234852 Indices k of primes p=prime(k) such that prime(p)-p+1 is prime.

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 9, 11, 13, 14, 18, 20, 23, 24, 27, 29, 34, 36, 40, 42, 46, 47, 48, 53, 58, 59, 60, 62, 63, 64, 66, 68, 70, 71, 73, 90, 95, 100, 103, 105, 110, 121, 122, 127, 128, 132, 133, 134, 141, 143, 144, 153, 155, 156, 162
Offset: 1

Views

Author

M. F. Hasler, Dec 31 2013

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[200],PrimeQ[Prime[Prime[#]]-Prime[#]+1]&] (* Harvey P. Dale, Jul 14 2024 *)
  • PARI
    for(k=1,999,isprime(prime(p=prime(k))-p+1)&&print1(k","))

Formula

a(n) = PrimePi(A234695(n)), PrimePi = A000720.

A107819 Slowest increasing sequence where a(n)+n is prime.

Original entry on oeis.org

1, 3, 4, 7, 8, 11, 12, 15, 20, 21, 26, 29, 30, 33, 38, 43, 44, 49, 52, 53, 58, 61, 66, 73, 76, 77, 80, 81, 84, 97, 100, 105, 106, 115, 116, 121, 126, 129, 134, 139, 140, 149, 150, 153, 154, 165, 176, 179, 180, 183
Offset: 1

Views

Author

Eric Angelini, Jun 11 2005

Keywords

Comments

Appears to be closely related to A014692.

Examples

			(1)+1=2, which is prime; (3)+2=5=prime; (4)+3=7=prime; (7)+4=11=prime; (8)+5=13=prime; etc.
		

Programs

  • Maple
    A107819 := proc(n)
            option remember;
            if n = 1 then
                    return 1;
            else
                    for a from procname(n-1)+1 do
                            if isprime(a+n) then
                                    return a;
                            end if;
                    end do:
            end if;
    end proc: # R. J. Mathar, Sep 05 2011
  • Sage
    @cached_function
    def A107819(n):
        prev = (-1 if n == 1 else A107819(n-1))
        return next_prime(prev+n)-n  # D. S. McNeil, Sep 05 2011

Extensions

Corrected by R. J. Mathar, Sep 05 2011

A234853 Indices of primes in A234851.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 9, 11, 12, 13, 15, 16, 18, 19, 20, 22, 26, 27, 29, 30, 34, 35, 37, 40, 44, 46, 48, 50, 53, 54, 55, 59, 60, 61, 62, 68, 76, 79, 80, 81, 85, 89, 91, 94, 96, 99, 100, 102, 110, 111, 112, 117, 122, 123, 125, 126, 134, 138, 139, 141, 144, 147
Offset: 1

Views

Author

M. F. Hasler, Dec 31 2013

Keywords

Crossrefs

Programs

  • PARI
    c=0;for(k=1,1999,isprime(prime(k)-k+1)&&c++&&isprime(k)&&print1(c", "))
Previous Showing 11-13 of 13 results.