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: Michael G. Kaarhus

Michael G. Kaarhus's wiki page.

Michael G. Kaarhus has authored 10 sequences.

A306395 Primes g such that 8*g + 2*p is a primorial for some twin prime p.

Original entry on oeis.org

2, 3, 11, 19, 23, 31, 37, 79, 83, 97, 113, 131, 139, 157, 173, 181, 191, 211, 229, 233, 239, 241, 251, 263, 271, 281, 293, 331, 337, 359, 367, 379, 419, 431, 439, 449, 503, 541, 547, 601, 607, 619, 641, 653, 659, 661, 691, 701, 719, 727, 743, 761, 769, 809
Offset: 1

Author

Michael G. Kaarhus, Feb 12 2019

Keywords

Comments

So far, I find that there exists at least one prime g, and at least one twin prime p in A001097, such that 8g + 2p is a primorial. Some of the related twin primes are rather large. The twin related to a(112), for instance, is 242 digits long. For each n, the program returns the primorial, g, g (mod 30) the twin prime (mod 30) and the twin prime. These data are in a linked file.

Examples

			n |  b# = 8 * g   +  2 * p     greater or lesser
--+----------------------------------------------
1 |  5# = 8 *  2  +  2 *    7  greater
2 |  5# = 8 *  3  +  2 *    3  lesser
3 |  7# = 8 * 11  +  2 *   61  greater
4 |  7# = 8 * 19  +  2 *   29  lesser
5 |  7# = 8 * 23  +  2 *   13  greater
6 | 11# = 8 * 31  +  2 * 1031  lesser
		

Crossrefs

Subsequence of A000040. Supersequence of A218046.

Programs

  • CALC
    #!/usr/bin/calc -q -f
    global b=5, chck=list(), g=1, gt, mg30=2, mg6, mp30=7, n=1, oar=pfact(b)/2,
    tpr=7, ts='greatr', fmt = "%4d%s%5d%s%7d%7d%9d%11s%s%d\n";
    define bookem(an) {
        mp30=mod(tpr, 30);
        printf(fmt, n, '.', b, '#', an, mg30, mp30, ts, '  ', tpr);
        n++; append(chck, an); return(an);
    }
    define incg() {
        top: g=nextprime(g); mg6=mod(g, 6); mg30=mod(g, 30);
        if (mg30 == 13 || mg30 == 17) {goto top;}
        else {gt=g*4; return(mg30);}
    }
    define incb(p) {b=nextprime(p); oar=pfact(b)/2; return(b);}
    print;
    printf(fmt, 'n', '.', 'b', '#', 'g', 'g%30', 'twin%30', 'twin type', '  ', 'twin prime');
    print '----------------------------------------------------------';
    for (i=0; i<=1; i++) {g=nextprime(g); bookem(g); tpr=3; ts='lesser'; mg30=3;}
    b=incb(b); while (g <= b) {incg();}
    while (n <= 35) {
        while (g > b) {
            tpr=oar-gt;
            if (tpr <= 7) {incb(b); continue;}
            if (ptest(tpr, 200)) {
                if (mg6 == 1 && ptest(tpr+2, 200)) {
                        ts='lesser'; bookem(g); break;
                }
                else {if (ptest(tpr-2, 200)) {
                        ts='greatr'; bookem(g); break;
                    }
                }
            }
            incb(b);
        }
        incg();
        while (oar-gt > 0) {b=prevprime(b); oar=pfact(b)/2;}
    }
    print; chs=size(chck)-1; for (i=0; i <= chs; i++) {print i+1, chck[[i]];}

A236240 Multiples of 6 that either are Averages of Twin Prime Pairs (ATPP), or become ATPP when multiplied by 3.

Original entry on oeis.org

6, 12, 18, 24, 30, 36, 42, 60, 66, 72, 90, 102, 108, 138, 144, 150, 174, 180, 192, 198, 228, 240, 270, 276, 282, 294, 312, 348, 354, 384, 420, 426, 432, 462, 522, 540, 570, 600, 618, 624, 642, 660, 666, 696, 714, 756, 780, 810, 822, 828, 858, 864, 882, 930
Offset: 1

Author

Michael G. Kaarhus, Jan 20 2014

Keywords

Comments

The first 10k terms of this sequence are 45.37% pseudo ATPP, and are about 9.71% of all multiples of 6 up to 617694. All numbers in this sequence that end 4 or 6 are ATPP/3 (but the reverse is not true).

Examples

			660 is in this sequence because it is an ATPP.  666 is in this sequence because 666 * 3 = 1998 is an ATPP.
		

Crossrefs

Subsequence of A008588 (Multiples of 6)

Programs

  • Maxima
    load(basic)$ a:[]$ p:-1$ j:0$ m:0$
    chli():= block (if w>341550071728321 then
       (n:11000, print("# over limit") ), return)$
    for n:1 thru 10000 step 0 do
       (p:p+6, q:p+1, r:p+2, if (primep(p) and primep(r)) then
          (push(q, a), n:n+1, j:j+1) else
             (w:3*q, chli(), if (primep(w-1) and primep(w+1)) then
                (push(q, a), n:n+1, m:m+1
       )     )  )$
    a:reverse(a)$ d:length(a)$ k:float(m*100/d)$ h:", "$
    y:last(a)$ b:float(d*100/(y/6))$
    print("# Real ATPP = ", j, h, " Pseudo ATPP = ", m, h, " Percent pseudo = ", k)$
    print("# First ", d, " of sequence are ", b, "% of ints. up to ", y, " cong. to 0 mod 6.")$ for i:1 thru d do (s:pop(a), print(i, h, s) )$

A235109 Averages q of twin prime pairs, such that q concatenated to q is also the average of a twin prime pair.

Original entry on oeis.org

42, 102, 108, 180, 192, 270, 312, 420, 522, 660, 822, 882, 1230, 1482, 4242, 4788, 8820, 10332, 11550, 13692, 14550, 14562, 14868, 15732, 17910, 18522, 20550, 21648, 22620, 23670, 23832, 26262, 27738, 35838, 38922, 39042, 40128, 42018, 43962, 44532, 46440
Offset: 1

Author

Michael G. Kaarhus, Jan 03 2014

Keywords

Examples

			192 is in this sequence, because 192 is an average of a twin prime pair, and so is 192192.
		

Crossrefs

Subsequence of A014574.

Programs

  • Maxima
    q:0$ for n:1 thru 800 step 0 do (q:q+6, if(primep(q-1) and primep(q+1)) then (b:concat(q,q), c:eval_string(b), if(primep(c-1) and primep(c+1)) then (if c>341550071728321 then (print("# ", c, " not determ."), n:5000), print(n, ", ", q), n:n+1 ) ) )$
    
  • PARI
    cat(n)=eval(concat(Str(n),n))
    istwin(n)=n%6==5&&isprime(n)&&isprime(n+2)
    v=List();p=2;forprime(q=3,1e10,if(q-p==2 && istwin(cat(p+1)-1), listput(v,p+1); if(#v==10^4,return));p=q) \\ Charles R Greathouse IV, Jan 03 2014

A234788 Solutions to numerator(Bernoulli(k)) == denominator/6 (Bernoulli(k)) (mod 30).

Original entry on oeis.org

1, 23, 1, 1, 23, 1, 1, 1, 19, 1, 1, 1, 23, 23, 1, 1, 17, 13, 1, 23, 7, 1, 23, 23, 1, 23, 11, 1, 23, 7, 1, 1, 1, 1, 19, 7, 1, 1, 7, 17, 1, 1, 1, 23, 19, 19, 1, 7, 1, 23, 7, 1, 1, 19, 1, 7, 23, 1, 1, 7, 1, 23, 29, 1, 23, 13, 1, 23, 7, 1, 1, 19, 1, 1, 19, 1, 23
Offset: 1

Author

Michael G. Kaarhus, Dec 30 2013

Keywords

Comments

Conjecture: the residues mod 30 of the numerator and the denominator/6 of Bernoulli(20(n-1) + 2) are equal. Conjecture: the only solutions to the above equation are {1, 7, 11, 13, 17, 19, 23 or 29}. Observation: the differences between these solutions are (6, 4, 2, 4, 2, 4, 6), a sequence with bilateral symmetry. Program checks all nonzero Bernoulli numbers except B(1), but if the above conjecture is true, then it needs check only every 20th Bernoulli Number starting with B(2).

Examples

			13 is in this sequence because both the numerator and the denominator/6 of a Bernoulli Number are congruent to 13 mod 30. Using my conjectural formula, you can find which Bernoulli Number: 13 is the 18th number in this sequence. k = 20(18-1) + 2. k = 342. So, both the numerator and the denominator/6 of Bernoulli(342) are congruent to 13 mod 30.
		

Crossrefs

Similar to A233578 and A233579.

Programs

  • Maxima
    k:-2$ for n:1 thru 300 step 0 do (k:k+2, b:bern(k), f:mod(num(b), 30), a:mod(denom(b)/6, 30), if f=a then (print(n, ", ", a), if 20*(n-1)+2#k then (print("Exception at k=", k, " n=", n), n:4000), n:n+1))$

Formula

This formula is conjectural, but the program verified it for each of the first 300 numbers in this sequence: to obtain k from the n of this sequence, k = 20(n-1) + 2.

A233578 n >= 2 such that the denominator/6 of Bernoulli(n) is congruent to {1, 5, 7, 13 or 19} modulo 30.

Original entry on oeis.org

2, 4, 6, 8, 12, 14, 18, 24, 26, 34, 36, 38, 40, 42, 54, 62, 68, 70, 72, 74, 76, 78, 86, 88, 94, 98, 100, 102, 108, 110, 114, 118, 120, 122, 124, 126, 130, 134, 142, 146, 152, 158, 162, 182, 186, 188, 190, 194, 196, 202, 204, 206, 208, 210, 214, 216, 218, 220, 222, 228, 230, 232, 234
Offset: 1

Author

Michael G. Kaarhus, Dec 13 2013

Keywords

Comments

Conjecture: for these and only these n, the absolute value of the numerator of Bernoulli(n) is congruent 1 modulo 6. If my conjecture is true, then you can obtain the residue modulo 6 of the abs. value of Bernoulli numerators by calculating their denominators/6 modulo 30. Program uses the von Staudt-Clausen Theorem. None of these n are in the complementary sequence, A233579 (n such that the denominator/6 of Bernoulli(n) is congruent to {11, 17, 23, 25 or 29} modulo 30). I have checked and verified that, up to n = 50446, the union of A233578 and A233579 is all even numbers >= 2.

Examples

			100 is in this sequence, because the denominator of Bernoulli(100) = 33330, and 33330/6 = 5555, and 5555 is congruent to 5 modulo 30.  As for the conjecture, the abs. val. of the numerator of Bernoulli(100) is congruent to 1 modulo 6.
		

Crossrefs

Cf. A233579, subsequence of A005843.

Programs

  • Maxima
    float(true)$ load(basic)$ i:[1]$ n:2$ for r:1 thru 10000 step 0 do (for p:3 while p-1<=n step 0 do (p:next_prime(p), if mod(n, p-1)=0 then push(p,i)), d:(product(i[k],k,1,length(i))), x:mod(d,30), if (x=1 or x=5 or x=7 or x=13 or x=19) then (print(r, ", ",n), r:r+1), i:[1], n:n+2)$

A233579 Numbers n such that the denominator/6 of Bernoulli(n) is congruent to {11, 17, 23, 25 or 29} modulo 30.

Original entry on oeis.org

10, 16, 20, 22, 28, 30, 32, 44, 46, 48, 50, 52, 56, 58, 60, 64, 66, 80, 82, 84, 90, 92, 96, 104, 106, 112, 116, 128, 132, 136, 138, 140, 144, 148, 150, 154, 156, 160, 164, 166, 168, 170, 172, 174, 176, 178, 180, 184, 192, 198, 200, 212, 224, 226, 238, 240, 242, 246, 252, 260, 262, 268
Offset: 1

Author

Michael G. Kaarhus, Dec 13 2013

Keywords

Comments

Conjecture: for these and only these n, the absolute value of the numerator of Bernoulli(n) is congruent 5 modulo 6. If this is true, then you can obtain the residue modulo 6 of the absolute value of Bernoulli numerators by calculating their denominators/6 modulo 30. The program uses the von Staudt-Clausen Theorem. None of these n are in the complementary sequence, A233578 (n >= 2 such that the denominator/6 of Bernoulli_n is congruent to {1, 5, 7, 13 or 19} modulo 30). I have checked and verified that, up to n = 50446, the union of A233578 and A233579 is all even numbers >= 2.

Examples

			112 is in this sequence, because the denominator of Bernoulli(112) = 1671270, and 1671270/6 = 278545, and 278545 is congruent to 25 modulo 30.  As for the conjecture, the absolute value of the numerator of Bernoulli(112) is congruent to 5 modulo 6.
		

Crossrefs

Cf. A233578, subsequence of A005843.

Programs

  • Maxima
    float(true)$ load(basic)$ i:[1]$ n:2$ for r:1 thru 10000 step 0 do (for p:3 while p-1<=n step 0 do (p:next_prime(p), if mod(n, p-1)=0 then push(p,i)), d:(product(i[k],k,1,length(i))), x:mod(d,30), if (x=11 or x=17 or x=23 or x=25 or x=29) then (print(r, ", ",n), r:r+1), i:[1], n:n+2)$

A231652 Lesser twin prime p such that p^2-p-2 is the average of a larger twin prime pair.

Original entry on oeis.org

5, 11, 17, 29, 71, 197, 269, 1277, 1289, 1607, 2027, 2111, 2267, 2687, 3467, 4649, 6359, 6761, 6827, 7877, 9461, 10529, 12917, 13337, 13691, 13829, 13931, 17291, 17579, 20441, 20771, 26249, 29021, 29129, 34589, 34649, 38237, 39239, 44027, 47417, 49547, 51347
Offset: 1

Author

Michael G. Kaarhus, Nov 12 2013

Keywords

Comments

There are 265364 members of this sequence up to 10^10, so about 1% of twin primes with fewer than 10 digits are in this sequence. - Charles R Greathouse IV, Nov 12 2013

Examples

			17 is in this sequence because 17 is a lesser twin prime and 17^2 - 17 - 2 is the average of 269 and 271 which is a pair of twin primes.
		

Crossrefs

Subsequence of A001359.

Programs

  • Maxima
    y:0$ p:0$ c:0$ f(p):= p^2-p-2$ for p:5 thru 100000 step 6 do (if(primep(p) and primep(p+2)) then (y:f(p), if(primep(y-1) and primep(y+1)) then (c:c+1, print(c,", ",p,", ", y))));
    
  • PARI
    is(n)=isprime(n^2-n-3) && isprime(n^2-n-1) && isprime(n+2) && isprime(n) && n>3 \\ Charles R Greathouse IV, Nov 12 2013

A224481 Positive integers x such that x^2 - 34 is the average of a twin prime pair.

Original entry on oeis.org

8, 26, 46, 58, 74, 76, 82, 92, 134, 164, 236, 248, 304, 314, 362, 368, 394, 416, 454, 496, 502, 512, 544, 568, 592, 598, 632, 668, 706, 734, 772, 776, 788, 818, 824, 844, 898, 944, 986, 1142, 1184, 1324, 1328, 1346, 1426, 1436, 1462, 1502, 1522, 1612, 1766
Offset: 1

Author

Michael G. Kaarhus, Apr 09 2013

Keywords

Comments

y = x^2 - 34 is one of a family of quadratics y = x^2 + c that produces averages of twin prime pairs. The first 24 negative numbers c that produce averages are congruent to either 0 or 2 (mod 6) (as calculated by maxima), and they differ by no more than 6. Other than that, I have not found an order to the sequence of negative numbers c. The first 11 positive numbers c that produce averages are apparently the beginning of all integers >= 2 that are equivalent to {2,0,2,0...} (mod 6).
If c=2, then the x that satisfy y = x^2 + c are A080149.
Apparently, there are infinitely many numbers c that produce twin prime averages. Here are some of them: (-84, -78, -76, -72, -70, -66, -64, -60, -58, -54, -52, -46, -42, -40, -36, -34, -30, -28, -22, -18, -16, -12, -6, -4, 2, 6, 8, 12, 14, 18, 20, 24, 26, 30, 32).
Dickson's conjecture implies that this sequence is infinite. Bateman-Horn-Stemmler gives conjectured growth. - Charles R Greathouse IV, Apr 10 2013

Examples

			26 is in this sequence, because 26^2 - 34 = 642, which is the average of the twin prime pair (641, 643).
		

Crossrefs

Cf. A080149.

Programs

  • Mathematica
    nn=1000; av = Select[Prime[Range[PrimePi[nn^2]]], PrimeQ[# + 2] &] + 1; Select[Range[nn], MemberQ[av, #^2 - 34] &] (* T. D. Noe, Apr 09 2013 *)
    nn = 2000; Select[Range[8, nn, 2], PrimeQ[p = #^2 - 35] && PrimeQ[p + 2] &] (* Zak Seidov, Apr 27 2013 *)
    Select[Range[3,1800],AllTrue[#^2-{35,33},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 14 2020 *)
  • PARI
    is(n)=isprime(n^2-35)&&isprime(n^2-33) \\ Charles R Greathouse IV, Apr 10 2013

A214840 Averages y of twin prime pairs that satisfy y = x^2 + x - 2.

Original entry on oeis.org

4, 18, 108, 180, 270, 810, 4158, 4968, 5850, 7308, 10710, 13338, 17028, 26730, 32940, 38610, 70488, 72090, 102078, 117990, 122148, 128520, 132858, 153270, 228960, 231840, 240588, 246510, 249498, 296478, 326610, 372708, 391248, 417960, 429678, 449568, 453600
Offset: 1

Author

Michael G. Kaarhus, Mar 07 2013

Keywords

Comments

The above equation is one of a family of twin prime average-generating quadratics y = x^2 + x - c, where c can be any even integer not of the form 6d + 4.
For f(x) = x^2 + x - c, f(-x) = f(x-1).
If c = 0, the positive x that satisfy y = x^2 + x - c are A088485.

Examples

			x =  2,  x =  4,  x = 10,  x = 13,  x = 16
x = 28,  x = 64,  x = 70,  x = 76,  x = 85
		

Crossrefs

Subsequence of A014574. Cf. A088485.

Programs

  • Mathematica
    s = {4}; Do[If[PrimeQ[n - 1] && PrimeQ[n + 1] && IntegerQ[Sqrt[9 + 4 n]], AppendTo[s, n]], {n, 18, 453600, 6}]; s (* Zak Seidov, Mar 21 2013 *)
    Select[Mean/@Select[Partition[Prime[Range[100000]],2,1],#[[2]]-#[[1]]==2&],IntegerQ[ Sqrt[ 9+4#]]&] (* Harvey P. Dale, Aug 18 2024 *)
  • PARI
    p=2;forprime(q=3,1e6,if(q-p>2,p=q;next);n=sqrtint(y=(p+q)\2);if(n^2+n-2==y,print1(y", "));p=q) \\ Charles R Greathouse IV, Mar 20 2013
    
  • PARI
    test(y)=if(isprime(y-1)&&isprime(y+1),print1(", "y))
    print1(4);for(n=0,100,test(18*n*(2*n+1));test(18*(2*n^2+3*n+1))) \\ Charles R Greathouse IV, Mar 20 2013

A218046 Primes p such that 8p + 2r is a primorial for some r in A006512.

Original entry on oeis.org

2, 11, 23, 83, 113, 131, 173, 191, 233, 239, 251, 263, 281, 293, 359, 419, 431, 449, 503, 641, 653, 659, 701, 719, 743, 761, 809, 821, 881, 911, 953, 1013, 1019, 1031, 1049, 1103, 1223, 1229, 1289, 1301, 1433, 1439, 1451, 1493, 1511, 1559, 1583, 1601, 1619
Offset: 1

Author

Michael G. Kaarhus, Oct 19 2012

Keywords

Comments

The primes p in this sequence satisfy b#/2 = 4p + r, where p is a prime, b# is a primorial, and r is the second of the twin prime pair (r-2, r).
Each p is therefore associated with at least one primorial, and with a pair of twin primes.
The empirical evidence suggests that each twin prime pair is associated with at least one p, and each p with a twin prime pair. I conjecture that this sequence (and therefore the sequence of twin primes) is infinite.

Examples

			8*2   + 2*7 = 5#
8*11  + 2*61 = 7#
8*23  + 2*13 = 7#
8*83  + 2*823 = 11#
8*113 + 2*14563 = 13#
8*131 + 2*254731 = 17#
8*173 + 2*463 = 11#
8*191 + 2*14251 = 13#
8*233 + 2*14083 = 13#
8*239 + 2*199 = 11#
8*251 + 2*151 = 11#
8*263 + 2*103 = 11#
8*281 + 2*31 = 11#
8*293 + 2*307444891294244533 = 47#
8*359 + 2*253819 = 17#
		

Programs

  • PARI
    list(lim)={
        my(v=List(),P=3,q);
        forprime(p=5,lim,
            P*=p;
            forprime(t=2,min(lim, (P-2)\4),
                q=P-4*t;
                if(q%6==1 && ispseudoprime(q) && ispseudoprime(q-2), listput(v,t))
            )
        );
        vecsort(Vec(v),,8)
    }; \\ Charles R Greathouse IV, Oct 23 2012

Extensions

Terms corrected by Charles R Greathouse IV, Oct 23 2012