Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #10 Oct 15 2013 22:32:20
%S 9,341,91,15,217,35,25,9,91,33,15,65,21,15,341,51,45,25,45,21,55,69,
%T 33,25,39,27,65,45,35,49,49,33,85,35,51,91,45,39,95,91,105,205,77,45,
%U 133,133,65,49,75,51,65,85,65,55,63,57,65,133,87,341,91,63,341,65,133,91,85
%N Smallest odd pseudoprimes to base n exceeding n (like A007535 but with smallest odd terms instead of few even ones).
%H Charles R Greathouse IV, <a href="/A090085/b090085.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Ps#pseudoprimes">Index entries for sequences related to pseudoprimes</a>
%t ds[x_, b_] := Mod[ -1+b^(x-1), x] a[n_] := Block[{m=1, s=ds[m, n]}, While[(s !=0||PrimeQ[m])||Equal[m, 1] ||!Greater[m, n]||EvenQ[m], m++ ];m]; t=Table[a[n], {n, 1, 256}]
%o (PARI) a(n)=my(k=n+if(n%2,2,1));while(Mod(n,k)^(k-1)!=1 || isprime(k), k+=2);k \\ _Charles R Greathouse IV_, Apr 12 2012
%Y Cf. A007535.
%K nonn
%O 1,1
%A _Labos Elemer_, Nov 25 2003