%I #18 Jan 04 2021 07:43:53
%S 0,2,16,18,32,38,168,452,610,882,1472,6510,9646,21592,39990,40156
%N Indices of primes in sequence defined by A(0) = 89, A(n) = 10*A(n-1) - 21 for n > 0.
%C Numbers n such that (780*10^n + 21)/9 is prime.
%C Numbers n such that digit 8 followed by n >= 0 occurrences of digit 6 followed by digit 9 is prime.
%C Numbers corresponding to terms <= 882 are certified primes.
%D Klaus Brockhaus and Walter Oberschelp, Zahlenfolgen mit homogenem Ziffernkern, MNU 59/8 (2006), pp. 462-467.
%H Makoto Kamada, <a href="https://stdkmd.net/nrr/8/86669.htm#prime">Prime numbers of the form 866...669</a>.
%H <a href="/index/Pri#Pri_rep">Index entries for primes involving repunits</a>.
%F a(n) = A103088(n+1) - 1. [adapted by _Georg Fischer_, Jan 04 2021]
%e 8669 is prime, hence 2 is a term.
%t Flatten[Position[NestList[10#-21&,89,9700],_?PrimeQ]]-1 (* _Harvey P. Dale_, May 26 2012 *)
%o (PARI) a=89;for(n=0,1500,if(isprime(a),print1(n,","));a=10*a-21)
%o (PARI) for(n=0,1500,if(isprime((780*10^n+21)/9),print1(n,",")))
%Y Cf. A000533, A002275, A103088.
%K nonn,hard,more
%O 1,2
%A _Klaus Brockhaus_ and Walter Oberschelp (oberschelp(AT)informatik.rwth-aachen.de), Nov 30 2004
%E More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Jan 01 2008
%E a(14)-a(16) from Kamada data by _Ray Chandler_, Apr 29 2015