%I #38 Sep 08 2022 08:45:16
%S 0,1,11,14,50,193,497,2135,2821,3761,7427,22739,30451,37951,55253
%N Indices of primes in sequence defined by A(0) = 37, A(n) = 10*A(n-1) - 3 for n > 0.
%C Numbers n such that (330*10^n + 3)/9 is prime.
%C Numbers n such that digit 3 followed by n >= 0 occurrences of digit 6 followed by digit 7 is prime.
%C Numbers corresponding to terms <= 497 are certified primes.
%C a(16) > 10^5. - _Robert Price_, Jan 29 2015
%C All terms except the first are congruent to 1, 2 or 5 (mod 6), since 37 | A(3n) and 7 | A(6n+4). - _Robert Israel_, Dec 02 2015
%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/3/36667.htm#prime">Prime numbers of the form 366...667</a>.
%H <a href="/index/Pri#Pri_rep">Index entries for primes involving repunits</a>.
%F a(n) = A102975(n) - 1.
%e 367 is prime, hence 1 is a term.
%e 3666666666667 is prime, hence 11 is a term.
%p select(t -> isprime((330*(10^t)+3)/9), [0,seq(seq(6*i+j,j=[1,2,5]),i=0..1000)]); # _Robert Israel_, Dec 02 2015
%t A101840[n_] := If[PrimeQ[((330*(10^n)) + 3)*(1/9)] == True, n, 0];
%t DeleteDuplicates[Table[A101840[n], {n, 0, 55300}]] (* _Abdul Gaffar Khan_, Nov 29 2015 *)
%o (PARI) a=37;for(n=0,1500,if(isprime(a),print1(n,","));a=10*a-3)
%o (PARI) for(n=0,1500,if(isprime((330*10^n+3)/9),print1(n,",")))
%o (Magma) [n: n in [0..500] | IsPrime((330*10^n+3) div 9)]; // _Vincenzo Librandi_, Nov 30 2015
%Y Cf. A000533, A002275, A102975.
%K nonn,hard,more
%O 1,3
%A _Klaus Brockhaus_ and Walter Oberschelp (oberschelp(AT)informatik.rwth-aachen.de), Dec 20 2004
%E More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), Jan 02 2008
%E a(12)-a(15) derived from A102975 by _Robert Price_, Jan 29 2015