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.

User: James G. Merickel

James G. Merickel's wiki page.

James G. Merickel has authored 173 sequences. Here are the ten most recent ones:

A260075 Where the first 3n primes are partitioned into 3 sets of cardinality n, the minimum of the largest product.

Original entry on oeis.org

5, 35, 627, 20553, 859066, 48993082, 3441790495, 287535325407, 28839054633794, 3161858853009549, 416108939893639594, 60850811089314245258, 9874934149007840709407, 1754123227439445139773155
Offset: 1

Author

James G. Merickel, Jul 14 2015

Keywords

Comments

Distinct from the smallest product of n primes from the first 3n that is larger than the cube root of the (3n)-th primorial. Both this sequence and that (hypothetical) one are analogs of A260079.
The below PARI program runs through each product of n primes up to the (3n)-th, testing it for whether it is both greater than the cube root of the (3n)-th primorial and less than the smallest result to that point; and, if these limitations are met, it then goes on to determine whether or not the remaining primes can be split into n-cardinality halves with products both less than it.
The percentages by which a(n) exceeds the (3n)-th primorial's cube root are 60.9, 12.6, 3.38, 5.37, 1.02, 0.0883, 0.0340, 5.18*10^(-3), 5.01*10^(-4), 1.68*10^(-4), 2.37*10^(-5), 2.06*10^(-5), 3.87*10^(-5) and 1.14*10^(-6).

Examples

			There are 15 distinct ways to break a set of six elements into three of cardinality 2 each. Among these for the first 6 primes, the partition {{2,13}, {3,11}, {5,7}} can be readily seen to give smallest possible maximum product of 35. So a(2)=35 (and with the convention that the product of a set consisting of one number is that number, a(1)=5 trivially).
		

Crossrefs

Cf. A260079.

Programs

  • PARI
    {
    p=vector(60,n,prime(n));i=1;while(1,
      a=vectorsmall(3*i);for(j=1,i,a[j]=1);
      n=prod(j=1,i,p[j]);r=10^1000;
      P=prod(j=1,3*i,p[j]);Q=P^(1/3);
      b=vectorsmall(3*i);
      for(j=2*i+1,3*i,b[j]=1);
      while(1,
        if(nQ,
            R=P/n;c=vector(2*i);k=1;
            for(j=1,2*i,while(a[k],k++);
              c[j]=k;k++);
            d=vectorsmall(2*i);for(j=1,i,d[j]=1);
            e=vectorsmall(2*i);for(j=i+1,2*i,e[j]=1);
            S=prod(j=1,i,p[c[j]]);
            while(1,
              if(S
    				

A260079 The smallest product of n distinct primes no larger than the (2n)-th to exceed the square root of the (2n)-th primorial.

Original entry on oeis.org

3, 15, 182, 3135, 81345, 2733549, 114535239, 5708795638, 342503171205, 23622238184727, 1793796113720611, 154171427826650234, 15259854588449248245, 1601991507050573600715, 177792170427340904920562, 22932432920285320919637458, 3164592660873444717893657954, 474678349195034622662784926530
Offset: 1

Author

James G. Merickel, Jul 15 2015

Keywords

Comments

This is similar to but distinct from the even-indexed terms of A060796, with a(n) differing from A060796(2n) at n=7, 10, 11, 12, 13 and 16 (with A060796(36) unavailable for comparison). A260075 is the analog by splitting the first 3n primes into 3 equal-sized sets (but not by giving the smallest product larger than the cube root of the corresponding primorial). The percentages by which a(n) exceeds the square root of the (2n)-th primorial are 22.5, 3.51, 5.03, 0.660, 1.13, 0.347, 0.136, 1.82*10^(-3), 8.54*10^(-3), 6.21*10^(-3), 9.28*10^(-4), 1.84*10^(-4), 1.71*10^(-4), 1.31*10^(-5), 1.94*10^(-6), 5.62*10^(-8), 2.93*10^(-7) and 4.50*10^(-8).
The below PARI program functions by checking for each set of n primes through the (2n-1)-st whether either its product or its product's cofactor in the (2n)-th primorial gives an improvement.

Examples

			If the primes 2 through 13 are split into equal-sized sets, the larger product of the two is not less than 182. This is the value for {2, 7, 13}, so a(3)=182.
		

Crossrefs

Programs

  • PARI
    {
    p=vector(50,n,prime(n));i=1;
    while(1,
      P=prod(j=1,2*i,p[j]);Q=sqrt(P);r=10^1000;
      m=prod(j=1,i,p[j]);a=vectorsmall(2*i-1);
      for(j=1,i,a[j]=1);b=vectorsmall(2*i-1);
      for(j=i,2*i-1,b[j]=1);while(1,
        if(m>Q,if(m
    				

A259801 Numbers such that it and its two neighbors are products of 8 distinct primes.

Original entry on oeis.org

102099792179230, 117092756174954, 136745109677256, 162338633743714, 167791215874866, 178571623400554, 183789996331514, 188284244083286, 211843056257854, 217181576415166, 224685381821406, 230455538364206, 234115003437666, 247662164889294, 265223112108514, 265730468260830, 266665427846390, 267248859559214, 268021718391414, 274354628059534
Offset: 1

Author

James G. Merickel, Jul 14 2015

Keywords

Comments

A subsequence of A169834.
With bound set at 4*10^14, the linked-to PARI program completed its run in about 2 days (producing 48 terms). The program fixes prospective smallest 4 prime factors so their product is at or above the minimum possible of the largest of 3 products of 4 primes without overlap (A260075(4)=20553), doing bound-restricted testing for the larger 4 in turn for each of these smaller quadruples. This is just one of a variety of ways of fixing a prospective trio by specifying one member as being within a certain range and satisfying the criterion. The program mostly avoids duplicates but does not entirely. See the part of the corresponding program at A259350 immediately before the print command for a fix.
The efficiency the program seems to generate empirically would come from the specification of product of 4 smaller primes as greater than a certain value and whole product within a certain range. Running through all even products of 8 distinct primes between the cube root of the (3n)-th primorial and the bound given would be a simpler way but one not so statistically limited (with a proportionally larger number of candidates). Note: The author is not making a claim of maximal efficiency, just of marked improvements over some simpler approaches.
a(1)=A093550(8).

Examples

			102099792179229=3*13*19*53*83*131*181*1321, 102099792179230=2*5*17*43*127*229*283*1697, and 102099792179231=7*11*23*29*31*71*113*7993. No smaller collection meets the criterion, so a(1)=102099792179230.
		

Programs

  • PARI
    \\ See above link to PARI program generating terms under 4*10^14 (out of order and with some duplicates).

A259349 Numbers n such that n-1, n, and n+1 are all products of 6 distinct primes (i.e. belong to A067885).

Original entry on oeis.org

1990586014, 1994837494, 2129658986, 2341714794, 2428906514, 2963553594, 3297066410, 3353808094, 3373085990, 3623442746, 3659230730, 3809238770, 3967387346, 4058711734, 4144727994, 4196154390, 4502893746, 4555267690, 4653623534
Offset: 1

Author

James G. Merickel, Jun 24 2015

Keywords

Comments

A subsequence of A169834 and A067885.
The rudimentary method employed by the PARI program below reaches the limit of its usefulness here. Contrast it with the method required for A259350, which is over 4.5 orders of magnitude faster than the analog of this (and may still be some distance best).
a(1)=A093550(6) (that sequence's 5th term, with offset 2). The program arbitrarily makes use of this knowledge, but will run (slower) without it.

Examples

			1990586013 = 3*13*29*67*109*241,
1990586014 = 2*23*37*43*59*461, and
1990586015 = 5*11*17*19*89*1259; and no smaller trio of this kind exists, making the middle value a(1).
		

Crossrefs

For products of 1, 2, 3, 4, 5, and 6 distinct primes see A000040, A006881, A007304, A046386, A046387, and A067885, resp.
See A364265 for a closely related sequence. - N. J. A. Sloane, Jul 18 2023

Programs

  • PARI
    {
    \\Program initialized with known a(1).\\
    \\The purpose of vector s and value u\\
    \\is to skip bad values modulo 36.\\
    k=1990586014;s=[4,4,8,8,8,4];u=1;
    while(1,
      if(issquarefree(k),
        if(issquarefree(k-1),
          if(issquarefree(k+1),
            if(omega(k)==6,
              if(omega(k-1)==6,
                if(omega(k+1)==6,
                  print1(k" ")))))));
      k+=s[u];if(u==6,u=1,u++))
    }

Formula

{n: A001221(n-1) = A001221(n) = A001221(n+1) = A001222(n-1) = A001222(n) = A001222(n+1) = 6}. - R. J. Mathar, Jul 18 2023

A259493 Number of n-digit semiprimes whose prime factors concatenated larger to the right of smaller form an n-digit prime (in decimal).

Original entry on oeis.org

0, 1, 21, 148, 1078, 7898, 60843, 486390, 3969956, 33123937, 280486145, 2411806083
Offset: 1

Author

James G. Merickel, Jun 28 2015

Keywords

Comments

For n>2, A220296(n)>a(n), with the numbers counted to obtain A220296(n) being a proper superset of the numbers counted for a(n) (and the example here being unique for both for n<3).

Examples

			21=3*7 produces the prime 37 via the described concatenation, and it is the only 2-digit semiprime that does produce a 2-digit prime like this, making a(2)=1.
		

Crossrefs

Cf. A220296.

Programs

  • Mathematica
    f[n_] := Block[{g, s}, s = Select[Range[10^(n - 1), 10^n - 1], PrimeOmega@ # == 2 &]; g[x_] := FromDigits[IntegerDigits[First /@ FactorInteger[x]] // Flatten]; Select[s, And[IntegerLength[g@ #] == n, PrimeQ@ g@ #] &]]; Length@ f@ # & /@ Range@ 6 (* Michael De Vlieger, Jul 01 2015 *)
  • PARI
    {
    \\Variables: E changes with every other\\
    \\change in n as bounding smaller prime\\
    \\p, b and B are the bounding powers of\\
    \\10, e represents the power of 10 just\\
    \\above p, q is the larger prime, and c is\\
    \\the count of those pq satisfying the\\
    \\criterion.\\
    print(0);n=2;E=10;b=10;B==100;
    while(1,
      p=2;e=10;c=0;while(pe,e*=10));
      print(c);n++;b*=10;B*=10;if(n%2==0,E*=10))
    }

Extensions

a(12) from Giovanni Resta, Jul 13 2015

A259350 Numbers n such that n-1, n, and n+1 are all products of 7 distinct primes.

Original entry on oeis.org

41704979954, 124731595066, 365993436094, 366230785766, 367810728790, 368695198806, 589316590786, 598986161410, 607638803134, 673917791834, 710756189898, 753389272714, 762118572046, 772416848554, 806996241806, 832216749090, 874567856590, 905173650094, 933893335166, 958872775134, 970959170390, 985722818366, 997785568130
Offset: 1

Author

James G. Merickel, Jun 24 2015

Keywords

Comments

A subsequence of A169834. A093550(7)=a(1), that sequence with offset 2 (so actually its 6th term) holding first terms of sequences of this kind.
Other than a(4)=366230785766 and a(18)=905173650094 (with minimax prime factor 1867 for it and its neighbors), the terms were initially discovered by increasing value of the trios' smallest large prime factors. An exhaustive search running multiple (suitably modified) copies of a pre-acceptance PARI program that disposed of fails in a somewhat efficient way and ran about an order of magnitude faster than the analog of the simple program at A259349 required about 1000 window-hours to produce the list given (adding two terms, including one that was unachievable by the increasing-minimax-prime method). Then the much faster program--15 minutes in just one PARI window--shown was developed and edited in here in its place. By specifying the 4 largest prime factors secondary to setting the product of the smallest 3 such that this is at least 627--as must be true for one of 3 relatively prime sphenic numbers--a speedup of over 3.5 orders of magnitude more (over the single order of magnitude that the replaced program managed, for a total of about 10^4.5 in time ratio over the program used for 6 primes) was achieved.
Note: The PARI program avoids duplicates but does not order terms.

Examples

			41704979953 = 7*13*29*41*47*59*139,
41704979954 = 2*11*23*31*83*103*311, and
41704979955 = 3*5*17*19*109*157*503; and no smaller such trio exists, so that a(1)=41704979954.
		

Programs

  • PARI
    {
    \\Program runs for arbitrary B.\\
    B=10^12;N=primepi(B/(627*17*19*23));
    p=vector(N,n,prime(n));
    in=primepi((B/210)^(1/3));
    P=prod(i=1,27,p[i]);Q=prod(i=28,in,p[i]);
    v=28;d=[[1,2],[-1,1],[-2,-1]];i3=6;
    while(6*p[i3]^5626,
        if(k1*p[i3+1]*p[i3+2]*p[i3+3]*p[i3+4]=k1,v--;Q*=p[v];P/=p[v]));
         r=(B\k1)^(1/4);j1=i3+1;
         while(p[j1]2,
              f=1;if(y1==3,if(a1>j1,f=0));
              if(f,
               b1=gcd(P,b);z1=omega(b1);
               if(z1>2,
                if(z1==3,if(b1>j1,f=0));
                if(f,
                 a2=a/a1;
                 if(gcd(a1,a2)==1,
                  b2=b/b1;
                  if(gcd(b1,b2)==1,
                   a21=gcd(a2,Q);a22=a2/a21;
                   if(gcd(a21,a22)==1,
                    y=y1+omega(a21);
                    if(y>4,
                     if(y<8,
                      b21=gcd(Q,b2);b22=b2/b21;
                      if(gcd(b21,b22)==1,
                       z=z1+omega(b21);
                       if(z>4,
                        if(z<8,
                         if(y+omega(a22)==7,
                          if(z+omega(b22)==7,
                           f1=factor(a1);
                           if(f1[1,1]*f1[2,1]*f1[3,1]
    				

A258930 Number of n-digit terms in A000230.

Original entry on oeis.org

3, 2, 5, 9, 15, 18, 23, 22, 34, 36, 41, 46, 55, 58, 55, 66, 83, 70
Offset: 1

Author

James G. Merickel, Jun 15 2015

Keywords

Crossrefs

Cf. A000230.

A258433 Primes with repdigit indices (in decimal).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 31, 79, 137, 193, 257, 317, 389, 457, 523, 607, 1399, 2239, 3119, 4019, 4973, 5903, 6907, 7907, 8933, 19583, 30911, 42473, 54581, 66889, 79357, 92003, 104723, 117763, 252233, 393191, 538259, 686671, 836833, 989999, 1144153, 1299689, 1456667, 3080969, 4767181, 6495109, 8251153
Offset: 1

Author

James G. Merickel, May 29 2015

Keywords

Comments

Elements of this sequence are the first 9 primes, then the 11th, 22nd, 33rd, ... , 99th, 111th, 222nd, etc. This is a somewhat remarkable sequence because of certain digital coincidences (see Prime Curios links).

Examples

			The first prime skipped is the 10th, 29, so that a(10)=31.  Then follows a(11)=79, a(12)=137, a(13)=193, etc.: The 22nd, 33rd, and 44th primes, and so on.
		

Crossrefs

Programs

  • Mathematica
    Prime[#]&/@(FromDigits/@Flatten[Table[PadRight[{},k,n],{k,6},{n,9}],1]) (* Harvey P. Dale, Mar 25 2019 *)
  • PARI
    a(n)=prime(10^((n+8)\9)\9*((n-1)%9+1)) \\ Charles R Greathouse IV, Jun 03 2015

Formula

a(n) = A000040(A010785(n)).

A246718 a(n) is the number of different ways of concatenating the numbers {3^k, k=0,...,n} so as to produce a prime number.

Original entry on oeis.org

2, 2, 3, 44, 128, 619, 4134, 28628, 229132, 2107538, 21438790, 238754555
Offset: 1

Author

James G. Merickel, Nov 15 2014

Keywords

Comments

A PARI program distinct from that below was used to compute a(14) using four windows in under a month, but the value was lost.
It is neither trivial nor very difficult to establish that distinct permutations lead to distinct values.

Examples

			The a(1)+a(2)+a(3)+a(4)=51 primes corresponding to the first four terms are, in increasing order, 13, 31, 139, 193, 12739, 19273, 32719, 1273981, 1278139, 1279813, 1381279, 1398127, 1812793, 1819273, 1927813, 2713981, 2718139, 2718193, 2731819, 2738119, 2738191, 2739181, 2781139, 2781193, 2781913, 2793181, 2793811, 2798113, 3127819, 3127981, 3192781, 3271981, 3279811, 3811279, 3812719, 3812791, 3912781, 3918127, 8113279, 8113927, 8119273, 8127319, 8131927, 8139127, 8193127, 9127813, 9181327, 9273181, 9327181, 9812731 and 9813127. Concatenations not shown, such as 931 = 7^2 * 19 and 1392781 = 13 * 107137, are all composite.
		

Programs

  • PARI
    a(n,v=vector(n+1,k,Str(3^(k-1))))=sum(k=1,(n+1)!,ispseudoprime(eval(concat(vecextract(v,numtoperm(n+1,k)))))) \\ M. F. Hasler, Jan 13 2015

Extensions

Edited and verified up to n=9 by M. F. Hasler, Jan 13 2015

A248204 Middle values in trios of products of 5 distinct primes.

Original entry on oeis.org

16467034, 18185870, 21134554, 21374354, 21871366, 22247554, 22412534, 22721586, 24845314, 25118094, 25228930, 25435334, 25596934, 26217246, 27140114, 29218630, 29752346, 30323734, 30563246, 31943066, 32663266, 33367894, 36055046, 38269022, 39738062, 40547066
Offset: 1

Author

James G. Merickel, Oct 28 2014

Keywords

Comments

A subsequence of A066509 and offset by 1 from A192203.

Examples

			16467033=3*11*17*149*197,
16467034=2*19*23*83*227, and
16467035=5*13*37*41*167,
with no smaller similar trio. So a(1)=16467034. [Corrected by _James G. Merickel_, Jul 23 2015]
		

Programs

  • PARI
    {
    \\ This program checks all consecutives with elements not divisible \\
    \\ by the squares of 2 or 3. More efficiency is required if enormous \\
    \\ numbers of terms are sought and for the analog sequences beyond \\
    \\ 6 prime factors. The start value is A093550(5). If a start other \\
    \\ than this is chosen, one must be sure that (one of) s or u is \\
    \\ adjusted if it needs to be. \\
    n=16467034;s=[8,4,4,4,8,8];u=1;
    while(1,
      if(issquarefree(n) && issquarefree(n-1) && issquarefree(n+1) && omega(n)==5 && omega(n-1)==5 && omega(n+1)==5, print1(n" "));
      n+=s[u];
      if(u==6,u=1,u++)
    )
    } \\ James G. Merickel, Jul 23 2015

Formula

a(n) = A192203(n) + 1.