login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A073662 Rearrangement of even numbers such that a(k)*a(k+1) + 1 is a prime for all k. 6
2, 6, 10, 4, 18, 22, 16, 12, 8, 14, 20, 26, 36, 28, 24, 32, 38, 42, 34, 30, 40, 52, 46, 66, 48, 44, 54, 64, 70, 60, 50, 56, 80, 68, 62, 84, 74, 90, 72, 58, 76, 88, 94, 78, 82, 96, 100, 106, 120, 86, 98, 104, 122, 108, 112, 118, 102, 116, 132, 124, 142, 114, 110, 128, 92 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

a(1)=2; a(n) is the smallest number not already in the sequence such that a(n)*a(n-1) + 1 is a prime. Some numbers retain their places (that is an even number 2n retains its n-th position), such numbers are in A076023.

LINKS

Robert Israel, Table of n, a(n) for n = 1..10000

MAPLE

Avail:= 2*[$2..110]:

A[1]:= 2:

for n from 2 do

    found:= false:

    for i in Avail do

      if isprime(i*A[n-1]+1) then

        A[n]:= i;

        Avail:= subs(i=NULL, Avail);

        found:= true;

        break

     fi

    od;

    if not found then break fi

od:

seq(A[i], i=1..n-1); # Robert Israel, Jul 16 2018

MATHEMATICA

amax = 200; a[1] = 2; aa = Range[4, amax, 2];

a[n_] := a[n] = For[k = 1, k <= Length[aa], k++, an = aa[[k]]; If[PrimeQ[ a[n - 1] an + 1], aa = Delete[aa, k]; Return[an]]];

DeleteCases[Array[a, Floor[amax/2]], Null] (* Jean-Fran├žois Alcover, Feb 28 2019 *)

CROSSREFS

Cf. A073661, A076023.

Sequence in context: A220338 A052194 A320383 * A086553 A004055 A077933

Adjacent sequences:  A073659 A073660 A073661 * A073663 A073664 A073665

KEYWORD

nonn

AUTHOR

Amarnath Murthy, Aug 10 2002

EXTENSIONS

More terms from Hans Havermann, Sep 23 2002

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 29 17:01 EDT 2020. Contains 337432 sequences. (Running on oeis4.)