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.

A073664 Even numbers which retain their relative position in A073661 (are not disturbed in the rearrangement process).

Original entry on oeis.org

2, 4, 6, 18, 28, 56, 60, 64, 68, 72, 80, 116, 126, 152, 170, 184, 200, 214, 234, 248, 276, 290, 328, 330, 334, 346, 360, 402, 408, 416, 438, 472, 512, 524, 578, 598, 662, 702, 744, 786, 810, 824, 864, 908, 968, 1008, 1030, 1032, 1052, 1076, 1172, 1182, 1220
Offset: 0

Views

Author

Amarnath Murthy, Aug 10 2002

Keywords

Crossrefs

Extensions

More terms from Hans Havermann, Sep 23 2002

A073662 Rearrangement of even numbers such that a(k)*a(k+1) + 1 is a prime for all k.

Original entry on oeis.org

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
Offset: 1

Views

Author

Amarnath Murthy, Aug 10 2002

Keywords

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.

Crossrefs

Programs

  • 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 *)

Extensions

More terms from Hans Havermann, Sep 23 2002

A074368 Rearrangement of odd numbers such that a(k) + a(k+1) + 1 is a prime for all k.

Original entry on oeis.org

1, 3, 7, 5, 11, 17, 13, 9, 19, 21, 15, 25, 27, 31, 29, 23, 35, 37, 33, 39, 43, 45, 51, 49, 47, 41, 55, 53, 59, 67, 63, 73, 57, 69, 61, 65, 71, 77, 79, 83, 89, 91, 75, 81, 85, 87, 93, 97, 95, 101, 109, 113, 115, 107, 103, 119, 121, 105, 117, 111, 99, 123, 127, 129, 133, 135
Offset: 1

Views

Author

Hans Havermann, Sep 23 2002

Keywords

Crossrefs

Cf. A073661.

A073665 Rearrangement of even numbers such that a(n) + a(n+1) + 1 and a(n)*a(n+1) + 1 are primes for all n.

Original entry on oeis.org

2, 8, 14, 32, 20, 26, 62, 38, 50, 56, 80, 68, 110, 86, 140, 98, 74, 122, 104, 128, 152, 44, 92, 134, 212, 176, 170, 146, 116, 200, 158, 224, 194, 164, 218, 242, 188, 272, 284, 308, 254, 314, 278, 290, 230, 248, 182, 206, 302, 296, 260, 326, 332, 350, 236, 320, 266
Offset: 1

Views

Author

Amarnath Murthy, Aug 10 2002

Keywords

Crossrefs

Extensions

Corrected and extended by Sascha Kurz, Jan 28 2003
Showing 1-4 of 4 results.