A144725 Primes arising in A144724.
5, 13, 61, 421, 3361, 30241, 332641, 3991681, 55883521, 950019841, 19000396801, 456009523201, 13680285696001, 465129713664001, 20465707401216001, 1473530932887552001, 125250129295441920001
Offset: 1
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.
k = 1; a = {}; Do[If[PrimeQ[k n + 1], k = k n; AppendTo[a, k + 1]], {n, 1, 1000}]; a (* Artur Jasinski, Sep 19 2008 *)
a(1)=1 because a(0) is not defined and 2*1 + 1 = 3 is prime; a(2)=2 because 2*1*2 + 1 = 5 is prime; a(3)=3 because 2*1*2*3 + 1 = 13 is prime; a(4) is not 4 because 2*1*2*3*4 + 1 = 49 is not prime, but a(4)=5 works because 2*1*2*3*5 + 1 = 61 is prime.
k = 2; a = {}; Do[If[PrimeQ[k n + 1], k = k n; AppendTo[a, n]], {n, 1, 3000}]; a (* Artur Jasinski *) nxt[{p_,a_}]:=Module[{k=a+1},While[!PrimeQ[p*k+1],k++];{p*k,k}]; NestList[ nxt,{2,1},60][[All,2]] (* Harvey P. Dale, Aug 18 2021 *)
from sympy import isprime from itertools import count, islice def agen(): # generator of terms an, p = 1, 2 while True: yield an an = next(k for k in count(an+1) if isprime(p*k+1)) p *= an print(list(islice(agen(), 58))) # Michael S. Branicky, Jan 13 2023
k = 2; a = {}; Do[If[PrimeQ[k n + 1], AppendTo[a, k n+1 ]; k = k n ], {n, 1, 3000}]; a
k = 3; a = {}; Do[If[PrimeQ[k n + 1], AppendTo[a, k n+1 ]; k = k n ], {n, 1, 3000}]; a (*Artur Jasinski*)
k = 5; a = {}; Do[If[PrimeQ[k n + 1], k = k n; AppendTo[a, n]], {n, 1, 3000}]; a
3*1+1=4 is not prime (omitted). a(1)=2 because 3*2+1=7 is prime. a(2)=3 because 3*2*3+1=19 is prime.
k = 3; a = {}; Do[If[PrimeQ[k*n + 1], k = k*n; AppendTo[a, n]], {n, 1, 3000}]; a
k = 6; a = {}; Do[If[PrimeQ[k n + 1], k = k n; AppendTo[a, n]], {n, 1, 3000}]; a
k = 7; a = {}; Do[If[PrimeQ[k n + 1], k = k n; AppendTo[a, n]], {n, 1, 3000}]; a (*Artur Jasinski*)
Comments