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: Keith Backman

Keith Backman's wiki page.

Keith Backman has authored 7 sequences.

A346676 Numbers expressible as 2^x + 3^y where both x and y are positive integers.

Original entry on oeis.org

5, 7, 11, 13, 17, 19, 25, 29, 31, 35, 41, 43, 59, 67, 73, 83, 85, 89, 91, 97, 113, 131, 137, 145, 155, 209, 245, 247, 251, 259, 265, 275, 283, 307, 337, 371, 499, 515, 521, 539, 593, 731, 733, 737, 745, 755, 761, 793, 857, 985, 1027, 1033, 1051, 1105, 1241
Offset: 1

Author

Keith Backman, Jul 28 2021

Keywords

Comments

All terms have the form 6k +- 1.

Crossrefs

Programs

  • PARI
    f(x,y) = 2^x + 3^y;
    lista(nn) = select(x->(x<=nn), setbinop(f, [1..logint(nn, 2)], [1..logint(nn, 3)])); \\ Michel Marcus, Jul 29 2021
    
  • Python
    def aupto(lim):
        s, pow3 = set(), 3
        while pow3 < lim:
            for j in range(1, (lim-pow3).bit_length()):
                s.add(2**j + pow3)
            pow3 *= 3
        return sorted(set(s))
    print(aupto(1242)) # Michael S. Branicky, Jul 29 2021

Formula

{ A004050 } minus { A000079, A000244 }.

A332777 a(n) = k^2 mod p where p is the n-th prime and of the form 6k-1 or 6k+1.

Original entry on oeis.org

1, 1, 4, 4, 9, 9, 16, 25, 25, 36, 8, 6, 17, 28, 41, 39, 54, 2, 71, 11, 30, 47, 62, 87, 83, 3, 106, 22, 60, 91, 118, 112, 29, 21, 48, 77, 116, 149, 5, 176, 69, 59, 104, 94, 170, 31, 82, 70, 123, 166, 154, 7, 50, 95, 142, 128, 177, 242, 228, 57, 145, 216, 200, 273
Offset: 3

Author

Keith Backman, Jun 08 2020

Keywords

Comments

Offset is 3 because 5=prime(3) is the first prime of the given form. It is provable that if 6m-1 and 6m+1 are a pair of twin primes, then for all k, 0

Crossrefs

Programs

  • PARI
    a(n) = {my(p=prime(n), k); if (((p-1) % 6) == 0, k = (p-1)/6, k = (p+1)/6); k^2 % p;} \\ Michel Marcus, Jun 09 2020

Extensions

More terms from Michel Marcus, Jun 09 2020

A283555 Even numbers that cannot be expressed as p+3, p+5, or p+7, with p prime.

Original entry on oeis.org

98, 122, 124, 126, 128, 148, 150, 190, 192, 208, 210, 212, 220, 222, 224, 250, 252, 292, 294, 302, 304, 306, 308, 326, 328, 330, 332, 346, 348, 368, 398, 410, 418, 420, 430, 432, 458, 476, 478, 480, 488, 500, 518, 520, 522, 532, 534, 536, 538, 540, 542, 556
Offset: 1

Author

Keith Backman, Mar 10 2017

Keywords

Comments

Any even number 2n which fails the Goldbach condition (i.e., is not expressible as the sum of two primes) cannot be a prime plus 3 (by definition), but it must also be the case that the two even numbers immediately smaller than 2n (i.e., 2n-2 and 2n-4) also cannot be a prime plus 3, because if they were, 2n would be a prime plus 5 or a prime plus 7 and would satisfy Goldbach. Thus any even number which fails the Goldbach condition must fall in this sequence. Note: none of the given members of the sequence fails Goldbach.

Crossrefs

Cf. A279040.

Programs

  • Mathematica
    Select[2 Range[400], ! Or @@ PrimeQ[# - {3, 5, 7}] &] (* Giovanni Resta, Mar 10 2017 *)

A205728 Number of odd, nonsquare semiprimes <= n^2.

Original entry on oeis.org

0, 0, 0, 1, 2, 4, 5, 8, 11, 16, 19, 24, 28, 32, 41, 46, 50, 60, 66, 73, 81, 89, 100, 110, 118, 126, 140, 151, 163, 174, 187, 197, 210, 224, 239, 253, 269, 286, 298, 312, 326, 344, 363, 380, 399, 414, 435, 451, 468, 491, 513, 530, 546, 567, 591, 619, 643, 664
Offset: 1

Author

Keith Backman, Jan 30 2012

Keywords

Comments

Like A205727 (see comments thereto), this looks at odd semiprimes, but excludes squares. This then relates to the Goldbach conjecture 2j=p+q with the additional restriction that j, p, and q are not equal.

Crossrefs

Programs

  • Mathematica
    SemiPrimeQ[n_Integer] := If[Abs[n] < 2, False, (2 == Plus @@ Transpose[FactorInteger[Abs[n]]][[2]])]; nn = 100;  t = Select[Range[1, nn^2, 2], SemiPrimeQ[#] && ! IntegerQ[Sqrt[#]] &]; Table[Length[Select[t, # <= n^2 &]], {n, nn}] (* T. D. Noe, Jan 30 2012 *)

A205726 Number of semiprimes <= n^2.

Original entry on oeis.org

0, 1, 3, 6, 9, 13, 17, 22, 26, 34, 40, 48, 56, 62, 75, 82, 90, 103, 114, 126, 135, 149, 164, 179, 190, 202, 220, 236, 253, 270, 289, 304, 320, 340, 360, 381, 404, 425, 443, 462, 484, 508, 533, 556, 581, 604, 634, 655, 678, 709, 738, 761, 783, 813, 846, 881
Offset: 1

Author

Keith Backman, Jan 30 2012

Keywords

Comments

See A205727 and A205728 for related sequences and relationship to Goldbach conjecture.

Crossrefs

Programs

  • Mathematica
    SemiPrimeQ[n_Integer] := If[Abs[n] < 2, False, (2 == Plus @@ Transpose[FactorInteger[Abs[n]]][[2]])]; nn = 100;  t = Select[Range[nn^2], SemiPrimeQ]; Table[Length[Select[t, # <= n^2 &]], {n, nn}] (* T. D. Noe, Jan 30 2012 *)
    Module[{nn=60,sp},sp=Accumulate[Table[If[PrimeOmega[n]==2,1,0],{n,nn^2}]];Table[sp[[i^2]],{i,nn}]] (* Harvey P. Dale, May 29 2014 *)
  • Python
    from sympy import prime, primepi
    def A205726(n): return int(sum(primepi(n**2//prime(k))-k+1 for k in range(1,primepi(n)+1))) # Chai Wah Wu, Jul 23 2024

Formula

a(n) = A072000(A000290(n)). - Michel Marcus, Sep 02 2013

A205727 Number of odd semiprimes <= n^2.

Original entry on oeis.org

0, 0, 1, 2, 4, 6, 8, 11, 14, 19, 23, 28, 33, 37, 46, 51, 56, 66, 73, 80, 88, 96, 108, 118, 126, 134, 148, 159, 172, 183, 197, 207, 220, 234, 249, 263, 280, 297, 309, 323, 338, 356, 376, 393, 412, 427, 449, 465, 482, 505, 527, 544, 561, 582, 606, 634, 658
Offset: 1

Author

Keith Backman, Jan 30 2012

Keywords

Comments

The Goldbach conjecture being true would imply that for every integer j, there exists at least one integer k such that (j^2)-(k^2) is an odd semiprime; i.e., for 2j=p+q, j=(p+q)/2 and k=(p-q)/2 results in (j^2)-(k^2)=pq. [Note that in many cases, 2j can be expressed as the sum of more than one set of two primes.] See A205728 for related series where p must be distinct from q.

Crossrefs

Programs

  • Mathematica
    SemiPrimeQ[n_Integer] := If[Abs[n] < 2, False, (2 == Plus @@ Transpose[FactorInteger[Abs[n]]][[2]])];nn = 100;  t = Select[Range[1, nn^2, 2], SemiPrimeQ]; Table[Length[Select[t, # <= n^2 &]], {n, nn}] (* T. D. Noe, Jan 30 2012 *)
    With[{osp=Table[{n,PrimeOmega[n]},{n,1,10001,2}]},Table[ Count[ Select[ osp,#[[1]]<=k^2&],?(#[[2]]==2&)],{k,60}]] (* _Harvey P. Dale, Dec 29 2017 *)
  • PARI
    a(n) = sum(k=1, n^2, (k%2) && (bigomega(k) == 2)); \\ Michel Marcus, Feb 24 2018

A174840 Least k such that the primes 3 to prime(k+1) form a complete residue system (mod prime(n)).

Original entry on oeis.org

3, 7, 9, 13, 26, 26, 42, 32, 65, 63, 84, 74, 89, 162, 110, 126, 177, 169, 144, 171, 214, 196, 237, 238, 323, 297, 363, 344, 327, 515, 441, 543, 420, 481, 612, 494, 604, 543, 646, 552, 645, 644, 519, 742, 593, 737, 644, 851, 1012, 787, 1204, 727, 899, 800, 1046
Offset: 1

Author

Keith Backman, Mar 30 2010

Keywords

Comments

If the value of the terminal prime is given rather than its index in the list of odd primes, the sequence becomes 7 19 29 43 103 103 191 137 347 311 439
In other words, the odd primes no larger than 7 form a complete residue set mod 3, the odd primes no larger than 19 form a complete residue set mod 5, and so forth

Programs

  • Mathematica
    Table[p=Prime[n]; k=1; While[u=Union[Mod[Prime[Range[2,k]], p]]; u != Range[0,p-1], k++ ]; k-1, {n,2,100}] (* T. D. Noe, Apr 02 2010 *)

Extensions

Name improved by T. D. Noe, Apr 05 2010
Corrected and extended by T. D. Noe, Apr 02 2010