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.

A035346 Let F(n) = Q(n) - P(n) be the Fortunate numbers (A005235); sequence gives n such that F(n) = prime(n+1).

Original entry on oeis.org

1, 2, 3, 6, 7, 8, 14, 16, 17, 21, 73, 801, 1971, 3332, 3469, 3509, 4318, 7986, 41292
Offset: 1

Views

Author

Keywords

Comments

Positive n such that A002110(n) + A000040(n+1) is prime. - Robert Israel, Dec 02 2015
Subsequence of A265109. - Altug Alkan, Dec 02 2015

Examples

			a(10) = 21 because A002110(21) + prime(22) = 40729680599249024150621323549 = 2*3*5*...*67*71*73 + 79 is prime.
		

Crossrefs

Programs

  • Maple
    p:= 3:
    A[1]:= 1:
    count:= 1:
    Primorial:= 2:
    for n from 2 to 1000 do
      Primorial:= Primorial*p;
      p:= nextprime(p);
      if isprime(Primorial + p) then
        count:= count+1;
        A[count]:= n;
      fi
    od:
    seq(A[i],i=1..count); # Robert Israel, Dec 02 2015
  • Mathematica
    Select[Range@ 801, PrimeQ[Product[Prime@ k, {k, #}] + Prime[# + 1]] &] (* Michael De Vlieger, Dec 02 2015 *)
  • PARI
    lista(nn) = {s = 1; for(k=1, nn, s *= prime(k); if(ispseudoprime(s + prime(k+1)), print1(k, ", ")); ); } \\ Altug Alkan, Dec 02 2015

Extensions

a(10)-a(11) were found by Labos Elemer, May 02 2000
a(12) from Ralf Stephan, Oct 20 2002
Offset changed by Altug Alkan, Dec 02 2015
a(13) from Michael De Vlieger, Dec 02 2015
a(14)-a(18) from Altug Alkan, Dec 02 2015
a(19) from Henri Lifchitz, Nov 08 2024