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!)
A145173 Least a(n) such that p(n)#*(p(n)# - a(n)) - 1 is prime, where p(i)# is the i-th primorial. 2
0, 1, 2, 1, 2, 4, 2, 1, 4, 9, 1, 2, 14, 2, 3, 9, 2, 9, 24, 1, 25, 1, 7, 8, 2, 52, 14, 13, 42, 7, 22, 8, 5, 20, 36, 9, 8, 10, 36, 56, 2, 14, 42, 7, 2, 128, 159, 45, 49, 1, 16, 69, 211, 80, 19, 13, 3, 12, 25, 21, 106, 32, 39, 26, 21, 23, 5, 22, 66, 43, 45, 139, 350, 38, 26, 145, 19, 142 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
As n increases, Sum_{i=1..n} a(n) tends to n*(n+1)/2.
LINKS
EXAMPLE
2*(2-0) - 1 = 3, which is prime, so a(1)=0;
2*3*(2*3 - 1) - 1 = 29, which is prime, so a(2)=1;
2*3*5*(2*3*5 - 2) - 1 = 839, which is prime, so a(3)=2.
PROG
(PARI) { allocatemem(932245000); default(primelimit, 4294965247); n=0; p=1; q=1; until (0, n=n+1; p=nextprime(p+1); q=q*p; for (a=0, 1000000000, r=q*(q-a)-1; if (isprime(r), print(n, " ", a); write("b145173.txt", n, " ", a); break; ); ) ) } \\ Harry J. Smith, Jan 14 2009
CROSSREFS
Sequence in context: A097082 A281729 A302290 * A361656 A270594 A270706
KEYWORD
nonn
AUTHOR
Pierre CAMI, Oct 03 2008
EXTENSIONS
Corrected by several correspondents, Jan 14 2009
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 April 24 03:08 EDT 2024. Contains 371918 sequences. (Running on oeis4.)