A173189 For bases beginning with b=2, a(b) is the number of primes beginning with a power of b that are a concatenation of simply decremented numbers that are less than A227775(b).
1, 0, 11, 0, 1, 2, 1, 0, 17, 0, 0, 6, 0, 0, 3, 0, 0, 5, 1, 0, 0, 0, 1, 2, 3, 0, 2, 0, 1, 5, 0, 1, 2, 0, 3, 5, 1, 0, 4, 0, 0, 6, 1, 0, 3, 3, 1, 8, 2, 0, 3, 1, 1, 3, 1, 0, 3, 0, 1, 5, 3, 0, 8, 0, 2, 7, 2, 0, 5, 0, 0, 4, 0, 2, 4, 0, 2
Offset: 2
Examples
For n=10, the smallest prime starting with a power of ten and ascending by concatenation of incremented numbers starts with 10^13 and runs to a concatenation of ten numbers. The descending numbers less than this derive from the first ten elements of A096594, the first four values of 10^4k+10^3k-10^k-3, the prime running from 1000 to 993, and the primes that stem from 100 and run to 91 and to 61.
Programs
-
PARI
\\ Output is the sequence 'base:count'. { \\ variables: b=base, d=#{digits (in search)},\\ \\ u=vector of values in terms of incr. exp.,\\ \\ e=vector of multiplying power of b (for u),\\ \\ k=current # of starting points being checked\\ \\ for increasing concatenations, q=vector of\\ \\ values appended, f=flag that a prime incr.\\ \\ concatenation is (=1) found, r=smallest incr.\\ \\ concatenation, c=SEQUENCE (current count),\\ \\ x=current exponent on b being searched as\\ \\ starting value in decr., z=current decreasing\\ \\ concatenation in search, y=current value to be\\ \\ appended, E=current multiplying power of b,\\ \\ i=for-loop index (twice)\\ \\ Starting 'if' sets exceptional data for b=2.\\ \\ First 'for' loop searches for smallest forward\\ \\ concatenation. It only looks at certain values\\ \\ of u vector, and if no forward concatenation is\\ \\ found to be prime in one pass this shows up in\\ \\ 'if' statement and the u vector is increased for\\ \\ searching in the next pass. If a prime is found,\\ \\ then the count of primes of the other form and\\ \\ less begins. Each power of ten, determined by the\\ \\ variable x, is searched in turn for primes that\\ \\ stem from it, up to the last power such that the\\ \\ concatenation of it and one less than the power\\ \\ is small enough. Once this is done, the print is\\ \\ performed and the base increases for the next term.\\ b=2; while(1, if(b==2,d=3;u=[6];e=[4],d=2;u=[b+2];e=[b]); k=1;q=[2]; while(1, f=0; for(i=1,k, if(u[i]r,break()); if(ispseudoprime(z),c++);y=b^x-2;E=b^x; while(1, if(y==E/b-1,if(y,E/=b,break())); z*=E;z+=y; if(z>r,break(),if(ispseudoprime(z), c++));y--);x++);break(), for(i=1,k, if(u[i]
Extensions
Terms for bases 61 through 78 added by James G. Merickel, Feb 24 2010
Comments