login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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). 2
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
2,3
COMMENTS
This sequence is motivated by the number of small primes in base ten that are a concatenation of a power of ten followed by decremented numbers. The terms after the first two are generated by the below program, which relies upon the infrequent failure of PARI's 'ispseudoprime' function to eliminate composites, and is thus subject to (unlikely) revision.
A227775 was composed later as an afterthought to simplify the title here (at least). The term for b=79 is remarked on there (as likely too large for computation), and, on the basis of the situation of computability with that value, it's very likely a first term larger than 17 is not computable in any reasonable time and with certainty; so a question is whether any base can be found for that to occur.
LINKS
EXAMPLE
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.
PROG
(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]<b^d,
if(ispseudoprime(u[i]), r=u[i]; f=1)));
if(f, c=0; x=1;
while(1,
z=b^(2*x)+b^x-1; if(z>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]<b^d, q[i]++;
if(q[i]==e[i], e[i]*=b);
u[i]*=e[i]; u[i]+=q[i]));
d++; if(d==2*k+2,
k++; u=concat(u, b^(d-1)+b^(k-1)+1);
e=concat(e, b^k); q=concat(q, b^(k-1)+1))));
print1(b":"c" || "); b++)
}
CROSSREFS
Sequence in context: A323169 A143197 A138066 * A115595 A342123 A187553
KEYWORD
nonn,base,hard
AUTHOR
James G. Merickel, Feb 12 2010
EXTENSIONS
Terms for bases 61 through 78 added by James G. Merickel, Feb 24 2010
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 18:05 EDT 2024. Contains 371798 sequences. (Running on oeis4.)