login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A073666 Rearrangement of natural numbers such that a(k)*a(k+1) + 1 is a prime for all k. 9
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
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 *)
PROG
(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
CROSSREFS
Cf. A073667.
Cf. A096100.
Sequence in context: A264966 A308728 A201543 * A092842 A343600 A343601
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Aug 10 2002
EXTENSIONS
More terms from Jason Earls, Aug 26 2002
Offset changed to 1 by Ivan Neretin, Mar 06 2016
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 19 04:26 EDT 2024. Contains 370952 sequences. (Running on oeis4.)