cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

A172994 a(n), starting at n=4, is the smallest positive integral x with an n-th prime in {x^2k+x^k-1} occurring for k < A096594(n).

Original entry on oeis.org

2, 460724, 610357585, 2096681555, 5351622936, 66, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 4

Views

Author

James G. Merickel, Feb 07 2010

Keywords

Comments

Note that the offset here is 4 for the reason that 10^2k+10^k-1 is prime for k=1 through 3 but not for k=4. This sequence is related to the remarkable occurrence of primes in the sequence 109, 10099, 1000999, etc. Second and third terms from Jens Kruse Andersen (prior to submission).
This sequence is essentially complete: a(k)=2 for k>9 with near certainty. That is, assuming the referenced sequences being compared are correct (and they have been checked), this is absolutely known true through a(25); and the contrary at any later point would be comparable to a return to the origin of a random walk on the line that is biased in one direction and already many 'paces' along in that direction. - James G. Merickel, Apr 16 2014

Examples

			a(9)=66 corresponds to the fact that 66^48+66^24-1 is already the 9th prime value of type x^2k+x^k-1 for x=66 (i.e., this surpasses A096594(9)=26, that 10^52+10^26-1 is the 9th prime for the case x=10).
		

Crossrefs

Extensions

a(9)-a(28) added by James G. Merickel, Mar 23 2014

A227949 Primes obtained by concatenating decremented numbers starting at a power of 10.

Original entry on oeis.org

109, 10099, 10987, 1000999, 100999897, 10000099999, 1000000999999, 1000999998997, 100000009999999, 10000999999989997, 1000000000999999999, 100999897969594939291, 1000999998997996995994993, 100000000000009999999999999, 10000000000000000000000000099999999999999999999999999
Offset: 1

Views

Author

James G. Merickel, Aug 01 2013

Keywords

Examples

			Since the concatenation of 10 and 9 produces the prime 109, the number 109 is in the sequence.
Since the concatenation of 100 and 99 produces the prime 10099, the number 10099 is in the sequence.
The concatenation of 100, 99, 98 does not produce a prime, hence 1009998 is not in the sequence.
		

Crossrefs

Programs

  • Maple
    N:= 100: # for terms of up to N digits:
    S:= NULL:
    for m from 1 to N/2 do
      for k from 1 by 2 to 10^m do
        x:= parse(cat(seq(i,i=10^m .. 10^m - k, -1)));
        if length(x) > N then break fi;
        if isprime(x) then S:= S, x;  fi
    od od:
    sort([S]); # Robert Israel, Jan 23 2024

Formula

A227949(n) begins with 10^[(A227950(n)-1)/A227951(n)].

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).

Original entry on oeis.org

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

Views

Author

James G. Merickel, Feb 12 2010

Keywords

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.

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.
		

Crossrefs

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

A212129 Numbers n such that 10^(2n+1) + 21*10^n + 1 is prime.

Original entry on oeis.org

2, 3, 11, 12, 15, 42, 311, 314, 579, 1943, 2262, 5199, 7329, 12792
Offset: 1

Views

Author

James G. Merickel, Feb 13 2013

Keywords

Comments

This is the analog of A096594, the numbers n for which the concatenation of 10^n and 10^n - 1 is prime, with the numbers concatenated here being 10^n + 2 and 10^n + 1. For example, 3 is in this sequence because 10021001 is prime, and 3 is in A096594 since 1000999 is prime.
All the primes arising from terms up to a(14) have been certified with pfgw. a(15) > 32400. - Giovanni Resta, Feb 18 2013

Examples

			1 is not in the sequence since 10^(2*1+1) + 21*10^1 + 1 = 1000 + 210 + 1 = 1211 is composite.
2 is in the sequence since 10^(2*2+1) + 21*10^2 + 1 = 100000 + 2100 + 1 = 102101 is prime.
		

Crossrefs

Cf. A096594.

Programs

  • Mathematica
    Select[Range[500], PrimeQ[10^(2# + 1) + 21 * 10^# + 1] &] (* Alonso del Arte, Feb 17 2013 *)
  • PARI
    i=1; while(1, if(ispseudoprime(10^(2*i+1) + 21*10^i + 1), print1("\n"i"\n")); if(i%10==0, print1("*")); i++; next())

Extensions

a(14) from Giovanni Resta, Feb 18 2013

A239944 Smallest b > 0 making b^(2k) + b^k - 1 prime for k=1 through n.

Original entry on oeis.org

2, 2, 2, 2, 460724, 610357585, 37748311920
Offset: 1

Views

Author

James G. Merickel, Mar 31 2014

Keywords

Comments

This sequence is a natural companion to A172994, which holds numbers b 'outperforming' 10 in this polynomial (relative to the sequence A096594). a(8) is known to exceed 4*10^12.
Note that a(n) exists for all n under Schinzel's hypothesis H. - Charles R Greathouse IV, Apr 24 2014

Examples

			a(5)=460724 means that for no integer k from 2 through 460723 does it hold that k^2n + k^n - 1 is prime for all n from 1 through 5, but for k=460724 this prime simultaneity occurs.
		

Crossrefs

Programs

  • PARI
    ok(b,n)=my(bk=1);for(k=1,n,bk*=b;if(!ispseudoprime(bk^2+bk-1),return(0)));b>0
    a(n)=my(b=2); while(!is(b,n), b++); b \\ Charles R Greathouse IV, Apr 24 2014
    
  • PARI
    \\ Reasonably efficient code, using precomputed modulus tables to speed the searches.
    diff(v)=vector(#v-1,i,v[i+1]-v[i])
    ok(b,n)=my(bk=1);for(k=1,n,bk*=b;if(!ispseudoprime(bk^2+bk-1),return(0)));b>0
    okMod(b,p,n)=for(k=1,n,my(m=Mod(b,p)^k);if(m^2+m==1,return(0)));1
    lst(p,n)=select(b->okMod(b,p,n),[0..p-1])
    makeU(lim,n)=my(v=[0],m=1,t);forprime(p=5,lim,t=lst(p);if(#tCharles R Greathouse IV, Apr 24 2014
Showing 1-5 of 5 results.