login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n) is the smallest integer >= a(n-1) such that a(n) + A067076(n) + n-1 is an odd prime.
3

%I #12 Mar 05 2020 21:07:41

%S 3,3,3,4,4,5,5,6,8,8,10,11,11,12,14,16,16,18,19,19,21,22,24,27,28,28,

%T 29,29,30,36,37,39,39,43,43,45,47,48,50,52,52,56,56,57,57,62,67,68,68,

%U 69,71,71,75,77,79,81,81,83,84,84,88,94,95,95

%N a(n) is the smallest integer >= a(n-1) such that a(n) + A067076(n) + n-1 is an odd prime.

%H Robert Israel, <a href="/A177018/b177018.txt">Table of n, a(n) for n = 1..10000</a>

%e 3+0+0=3; 3+1+1=5; 3+2+2=7; 4+4+3=11; 4+5+4=13; etc.

%p N:= 100: # for a(1)..a(N)

%p A067076:= [seq((ithprime(i)-3)/2, i=2..N+1)]:

%p a:= Vector(N):

%p a[1]:= 3:

%p for i from 2 to N do

%p q:= nextprime(a[i-1]+A067076[i]+i-2);

%p a[i]:= q - A067076[i]-i+1;

%p od:

%p convert(a,list); # _Robert Israel_, Mar 05 2020

%o (PARI) n=0; c=0;for(i=1,99, t = n+c+A067076(c); if( t%2 == 1 && isprime(t), print1(n", "); c++,/*else*/ n++ )) /* _M. F. Hasler_, Jun 18 2010 */

%Y Cf. A067076, A169915, A175540.

%K nonn

%O 1,1

%A _Vincenzo Librandi_, May 22 2010

%E Better definition from _M. F. Hasler_, Jun 18 2010

%E Edited by _N. J. A. Sloane_, Jul 18 2010