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

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

Original entry on oeis.org

1, 2, 3, 4, 7, 6, 5, 8, 9, 12, 13, 10, 15, 14, 17, 18, 11, 30, 19, 22, 16, 21, 20, 23, 26, 33, 34, 27, 28, 24, 25, 42, 31, 36, 32, 29, 38, 39, 48, 37, 40, 43, 46, 51, 50, 45, 52, 49, 54, 44, 47, 56, 41, 62, 59, 60, 53, 66, 35, 68, 57, 58, 55, 70, 61, 76, 63, 74, 69, 72, 71, 98
Offset: 1

Views

Author

Amarnath Murthy, Aug 10 2002

Keywords

Crossrefs

Programs

  • Mathematica
    a[1]=1; a[n_]:=a[n]=(For[c=Sort[Table[a[k], {k, n-1}]]; d=Append[c, Last[c]+1]; m=First[Complement[Range[Last[d]], c]], MemberQ[c, m]||!PrimeQ[m*a[n-1]+1], m++ ]; m); Table[a[k], {k, 70}] (* Farideh Firoozbakht, Apr 14 2004 *)
  • PARI
    A073666(n,show=1,a=1,u=[a])={for(n=2,n,show&&print1(a",");for(k=u[1]+1,9e9,!setsearch(u,k) && isprime(a*k+1) && (a=k) && break);u=setunion(u,[a]); while(#u>1&&u[2]==u[1]+1,u=u[2..-1]));a} \\ Use 2nd, 3rd or 4th optional arg to display intermediate terms, to use another starting value, to exclude some terms. - M. F. Hasler, Nov 24 2015

Extensions

More terms from Jason Earls, Aug 26 2002
Offset changed to 1 by Ivan Neretin, Mar 06 2016

A081943 a(1) = 1, a(n)= smallest number not occurring earlier such that a(n-1)*a(n) -1 is a prime. re-arrangement of natural numbers such that the product of adjacent terms is one more than a prime.

Original entry on oeis.org

1, 3, 2, 4, 5, 6, 7, 12, 9, 8, 10, 11, 18, 13, 14, 16, 15, 24, 20, 19, 30, 17, 22, 21, 28, 23, 36, 27, 26, 33, 40, 32, 31, 42, 25, 50, 34, 38, 39, 48, 43, 60, 35, 46, 45, 44, 37, 54, 41, 52, 57, 56, 55, 68, 49, 62, 64, 53, 70, 29, 66, 63, 76, 47, 82, 69, 58, 51, 72, 61
Offset: 1

Views

Author

Amarnath Murthy, Apr 02 2003

Keywords

Crossrefs

Programs

  • Mathematica
    a[1]=1; a[n_]:=a[n]=(For[c=Sort[Table[a[k],{k,n-1}]]; d=Append[c,Last[c]+1]; m=First[Complement[Range[Last[d]],c]], MemberQ[c,m]||!PrimeQ[m*a[n-1]-1],m++ ]; m); Table[a[k],{k,70}] (* Farideh Firoozbakht, Apr 14 2004 *)

Extensions

More terms from Farideh Firoozbakht, Apr 14 2004

A092842 a(n) is the solution of the equation A073666(x) = n (A073666(a(n)) = n).

Original entry on oeis.org

1, 2, 3, 4, 7, 6, 5, 8, 9, 12, 17, 10, 11, 14, 13, 21, 15, 16, 19, 23, 22, 20, 24, 30, 31, 25, 28, 29, 36, 18, 33, 35, 26, 27, 59, 34, 40, 37, 38, 41, 53, 32, 42, 50, 46, 43, 51, 39, 48, 45, 44, 47, 57, 49, 63, 52, 61, 62, 55, 56, 65, 54, 67, 74, 88, 58, 75, 60, 69, 64
Offset: 1

Views

Author

Farideh Firoozbakht, Apr 15 2004

Keywords

Comments

For each n number of solutions of the equation A073666(x) =n is less than 2 because the terms of the sequence A073666 are distinct. Conjecture: This sequence is infinite(see A073666).

Crossrefs

A093701 a(n) = smallest m>a(n-1) such that 1+m*n is prime, a(1) = 1.

Original entry on oeis.org

1, 2, 4, 7, 8, 10, 16, 17, 18, 19, 30, 31, 34, 35, 36, 37, 38, 41, 58, 59, 62, 64, 72, 73, 76, 77, 80, 81, 84, 85, 88, 95, 96, 97, 102, 103, 106, 111, 114, 118, 122, 123, 124, 125, 130, 132, 134, 135, 138, 140, 142, 144, 150, 152, 156, 158, 164, 166, 174, 175
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 10 2004

Keywords

Comments

A093702(n) = 1+a(n)*n.

Examples

			For n=3: we have a(2)=2, so we want the smallest number m > 2 such that n*m+1 = 3*m+1 is prime. m=3 fails but m=4 works, so a(3) = m = 4. - _N. J. A. Sloane_, Dec 13 2018
		

Crossrefs

Note that A081942 is a related but distinct sequence.

Programs

  • Mathematica
    nxt[{n_,a_}]:=Module[{m=a+1},While[!PrimeQ[m(n+1)+1],m++];{n+1,m}]; NestList[ nxt,{1,1},60][[All,2]] (* Harvey P. Dale, Dec 13 2018 *)

A219761 a(1) = 1; for n>1, a(n) = smallest integer > a(n-1) such that a(n)*a(n-i)+1 is prime for all 0 <= i <= n-1.

Original entry on oeis.org

1, 2, 6, 156, 4260, 117306, 160650, 13937550, 32742516, 3306719796, 7746764190
Offset: 1

Views

Author

N. J. A. Sloane, Dec 01 2012

Keywords

Examples

			After a(1)=1, a(2)=2, a(3)=6, we want the smallest m>6 such that 1+m, 1+2m, 1+6m and 1+m^2 are all prime: this is m = 156 = a(4).
		

References

Crossrefs

Programs

  • Mathematica
    f[a_List] := Block[{m = a, k = a[[-1]] + 6}, While[ Union@ PrimeQ[k*Join[m, {k}] + 1] != {True}, k += 6]; k]; s = {1, 2, 6}; Do[ Print[{n, a = f[s]}]; s = Append[s, a], {n, 4, 9}] (* Robert G. Wilson v, Dec 03 2012 *)

Extensions

a(8) and a(9) from Robert G. Wilson v, Dec 03 2012
a(10) and a(11) from Robert G. Wilson v, Dec 04 2012
Showing 1-5 of 5 results.