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

A214632 a(1) = 17, a(n) is smallest prime of the form k*a(n - 1) + 1.

Original entry on oeis.org

17, 103, 619, 2477, 34679, 416149, 7490683, 29962733, 419478263, 5872695683, 82217739563, 986612874757, 27625160493197, 994505777755093, 5967034666530559, 71604415998366709, 6444397439853003811, 180443128315884106709, 9743928929057741762287
Offset: 1

Views

Author

Robin Garcia, Jul 23 2012

Keywords

Comments

Sequence does not begin with 2 (17 = 8*2 + 1; all primes are k*2+1) because 3 = 1*2 + 1 or 5 = 2*2 + 1 are smaller; and they would lead to A061092, or A059411. Also: 7 belongs to A061092; 11 to A059411 and 13 is a(1) in A214523.

Examples

			a(2) = 103 = 6*17 + 1.
		

Crossrefs

Programs

  • Mathematica
    t = {17}; Do[k = 1; While[p = k*t[[-1]] + 1; ! PrimeQ[p], k++]; AppendTo[t, p], {20}]; t (* T. D. Noe, Jul 24 2012 *)
    nxt[n_]:=Module[{k=1},While[!PrimeQ[k*n+1],k++];k*n+1]; NestList[nxt,17,20] (* Harvey P. Dale, Apr 18 2014 *)

A214633 a(1)=2; a(n) is smallest prime of the form k*a(n-1) + 3, k>0.

Original entry on oeis.org

2, 5, 13, 29, 61, 491, 3931, 15727, 157273, 314549, 4403689, 17614759, 387524701, 5425345817, 119357607977, 9787323854117, 78298590832939, 1722568998324661, 68902759932986443, 4685387675443078127, 318606361930129312639, 637212723860258625281
Offset: 1

Views

Author

Robin Garcia, Jul 23 2012

Keywords

Crossrefs

Programs

  • Maple
    A214633 := proc(n)
        option remember;
        local k;
        if n =  1 then
            2;
        else
            for k from 1 do
                if isprime(k*procname(n-1)+3) then
                    return k*procname(n-1)+3 ;
                end if;
            end do:
        end if;
    end proc:
    seq(A214633(n),n=1..20) ; # R. J. Mathar, Jul 23 2012

A214634 a(1) = 7; a(n) is smallest prime of the form k*a(n-1) + 3, k>0.

Original entry on oeis.org

7, 17, 37, 151, 607, 1217, 2437, 4877, 39019, 78041, 624331, 6243313, 174812767, 1398502139, 19579029949, 39158059901, 1957902995053, 15663223960427, 156632239604273, 3132644792085463, 181693397940956857, 726773591763827431, 7267735917638274313, 1148302274986847341457, 4593209099947389365831
Offset: 1

Views

Author

Robin Garcia, Jul 23 2012

Keywords

Examples

			a(2) = 17 = 2 * 7 + 3.
a(3) = 37 = 2 * 17 + 3.
a(4) = 151 = 4 * 37 + 3.
		

Crossrefs

Programs

  • Maple
    A214634 := proc(n)
        option remember;
        local k;
        if n =  1 then
            7;
        else
            for k from 1 do
                if isprime(k*procname(n-1)+3) then
                    return k*procname(n-1)+3 ;
                end if;
            end do:
        end if;
    end proc:
    seq(A214634(n),n=1..20) ; # R. J. Mathar, Jul 23 2012
  • Mathematica
    spf[n_]:=Module[{k=1},While[!PrimeQ[k*n+3],k++];k*n+3]; NestList[spf,7,25] (* Harvey P. Dale, Aug 02 2017 *)
  • PARI
    a=7;for(n=1,200,b=a*n+3;if(isprime(b),a=b;print1(a,", ");next(n=1)))

Extensions

More terms from Robert Israel, Nov 23 2016

A214680 a(1)=3; a(n) is the smallest prime of the form k*a(n-1) + 2.

Original entry on oeis.org

3, 5, 7, 23, 71, 73, 367, 1103, 7723, 131293, 3807499, 19037497, 57112493, 1427812327, 15705935599, 141353420393, 989473942753, 44526327423887, 311684291967211, 4675264379508167, 4675264379508169, 275840598390981973, 4137608975864729597
Offset: 1

Views

Author

Robin Garcia, Jul 25 2012

Keywords

Comments

Up to the end of the b-file, there are only 4 pairs of twin primes in the sequence, with lesser twin primes 3, 5, 71 and 4675264379508167. - Editors, Feb 20 2018

Crossrefs

Programs

  • Mathematica
    t = {3}; Do[k = 1; While[p = k*t[[-1]] + 2; ! PrimeQ[p], k++]; AppendTo[t, p], {25}]; t (* T. D. Noe, Jul 26 2012 *)
Showing 1-4 of 4 results.