The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A204142 a(1)=1 and for n>1, a(n) equals the smallest prime greater than a(n-1) of the form a(i)*a(j)+2 for some i, j < n. 3
1, 3, 5, 7, 11, 13, 17, 19, 23, 37, 41, 43, 53, 59, 61, 67, 71, 73, 79, 97, 113, 131, 163, 179, 181, 211, 223, 239, 241, 293, 307, 337, 367, 373, 397, 409, 439, 487, 491, 499, 631, 673, 691, 719, 733, 739, 769, 853, 881, 883, 907, 919, 991 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Is this sequence finite?
For n>1, a(n)-2 is prime or semiprime.
If a(n) is the lesser of a twin prime pair, then a(n+1) = a(n)+2 (= a(1)*a(n)+2). - M. F. Hasler, Feb 11 2012
There are exactly 3478486 terms < 10^18 with a(3478486) = 999999462621744733. - Terentyev Oleg, Mar 09 2012
LINKS
EXAMPLE
a(2) = a(1)^2+2, a(3) = a(1)*a(2)+2, a(4) = a(1)*a(3)+2, a(5) = a(2)^2+2, a(6)=a(1)*a(5)+2, a(7) = a(1)*a(5)+2, a(8) = a(2)*a(3)+2, ...
a(16027) = 14228123711 is the lesser of a twin prime pair, it is followed by the greater twin prime, a(16028) = 14228123713.
MATHEMATICA
a = {1}; s = {}; While[s = Union[s, Select[a*a[[-1]] + 2, PrimeQ]]; s != {} && Length[a] < 100, AppendTo[a, s[[1]]]; s = Rest[s]]; a (* T. D. Noe, Mar 12 2012 *)
PROG
(PARI) a=Set(p=1); for(n=1, 999, until(bigomega(p-2)<3 & !setminus(Set(factor(p-2)[, 1]~), a), p=nextprime(p+2)); a=setunion(a, Set(p))); vecsort(eval(a)) \\ M. F. Hasler, Feb 10 2012
(PARI) {a=[r=1]; for(n=1, 9999, while(a[r]^2+2<=a[n], r++); m=0; s=r; for(i=r, n, while(s>1&&a[s-1]*a[i]+2>a[n], s--); for( j=s, i, m & a[j]*a[i]+2>m & break; isprime(a[j]*a[i]+2) & m=a[j]*a[i]+2 )); a=concat(a, m))} \\ M. F. Hasler, Feb 10 2012
CROSSREFS
Sequence in context: A120334 A000978 A128925 * A131261 A100276 A225669
KEYWORD
nonn
AUTHOR
Max Alekseyev, Jan 16 2012
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 May 23 06:14 EDT 2024. Contains 372760 sequences. (Running on oeis4.)