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-4 of 4 results.

A064911 If n is semiprime (or 2-almost prime) then 1 else 0.

Original entry on oeis.org

0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Patrick De Geest, Oct 13 2001

Keywords

Crossrefs

Programs

  • Haskell
    a064911 = a010051 . a032742 -- Reinhard Zumkeller, Mar 13 2011
    
  • Maple
    with(numtheory):
    a:= n-> `if`(bigomega(n)=2, 1, 0):
    seq(a(n), n=1..120);  # Alois P. Heinz, Mar 16 2011
  • Mathematica
    Table[If[PrimeOmega[n] == 2, 1, 0], {n, 105}] (* Jayanta Basu, May 25 2013 *)
  • PARI
    a(n)=bigomega(n)==2 \\ Charles R Greathouse IV, Mar 13 2011

Formula

a(n) = 1 iff n is in A001358 (semiprimes), a(n) = 0 iff n is in A100959 (non-semiprimes). - Reinhard Zumkeller, Nov 24 2004
Dirichlet g.f.: (primezeta(2s) + primezeta(s)^2)/2. - Franklin T. Adams-Watters, Jun 09 2006
a(n) = A057427(A174956(n)); a(n)*A072000(n) = A174956(n). - Reinhard Zumkeller, Apr 03 2010
a(n) = A010051(A032742(n)) (i.e., largest proper divisor is prime). - Reinhard Zumkeller, Mar 13 2011
From Antti Karttunen, Apr 24 2018 & Apr 22 2022: (Start)
a(n) = A280710(n) + A302048(n) = A101040(n) - A010051(n).
a(n) = A353478(n) + A353480(n) = A353477(n) + A353478(n) + A353479(n).
a(n) = A353475(n) + A353476(n).
(End)
a(n) = [Omega(n) = 2], where [ ] is the Iverson bracket. - Wesley Ivan Hurt, Jul 22 2025

Extensions

Edited by M. F. Hasler, Oct 18 2017

A131284 Numbers n such that difference between prime factors of n-th semiprime is n.

Original entry on oeis.org

5, 80, 86, 613668, 6384425704
Offset: 1

Views

Author

Zak Seidov, Sep 25 2007

Keywords

Comments

The 6384425704th semiprime is 44690979977 = 7*6384425711. 6384425711 - 7 = 6384425704. - Donovan Johnson, Jul 11 2010

Examples

			sp(5) = 14 = 2*7 and 7 - 2 = 5, sp(80) = 249 = 3*83 and 83 - 3 = 80, sp(86) = 267 = 3*89 and 89 - 3 = 86; sp(n) = n-th semiprime.
		

Crossrefs

Programs

  • PARI
    { n=0; j=1; /* n=3068365-1; j=613668;*/
    while( l=(j\10^4+1)*10^4, until( l < j++, until(bigomega(n+=1)==2,);
    if(2!=#f=factor(n)[,1],next); if(j==f[2]-f[1],print("\n",[j,n,f])));
    print1(j-1,":"n", "))} \\ M. F. Hasler, Sep 28 2007

Extensions

a(4) = 613668 (p=5, q=613673) from M. F. Hasler, Sep 28 2007
a(5) from Donovan Johnson, Jul 11 2010

A049236 a(n) is the number of distinct prime factors of prime(n) + 2.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 2, 1, 2, 1, 2, 2, 3, 1, 2, 1, 2, 1, 3, 1, 2, 2, 2, 1, 3, 2, 1, 1, 2, 2, 2, 1, 3, 2, 1, 3, 2, 2, 1, 3, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 3, 2, 3, 2, 2, 1, 2, 1, 3, 2, 2, 2, 2, 1, 3, 2, 2, 2, 2, 2, 2, 2, 1, 3, 2, 2, 2, 2, 1, 2
Offset: 1

Views

Author

Keywords

Examples

			prime(27) = 103, prime(27) + 2 = 105 = 3*5*7 has 3 prime factors, so a(27) = 3.
		

Crossrefs

Programs

  • Mathematica
    Table[Length[FactorInteger[Prime[n] + 2]], {n, 1, 50}] (* G. C. Greubel, May 12 2017 *)
  • PARI
    a(n) = omega(prime(n) + 2); \\ Amiram Eldar, Sep 16 2024

Formula

a(n) = A001221(A052147(n)). - Amiram Eldar, Sep 16 2024

A386256 Smallest semiprime p1*p2 such that p2 mod p1 = n and no prime is used more than once in the sequence.

Original entry on oeis.org

6, 35, 377, 407, 817, 391, 3649, 3131, 4841, 4331, 11461, 5293, 7729, 8051, 12031, 25217, 34417, 29503, 24931, 33389, 26051, 57479, 78227, 44377, 68557, 15707, 78119, 64829, 197401, 77059, 166633, 71371, 140579, 86147, 96427, 109237, 84907, 142523, 213341, 158801
Offset: 1

Views

Author

Tamas Sandor Nagy, Aug 14 2025

Keywords

Comments

Will every prime be used? If so, then the prime factors p1 and p2 of the terms, listed term by term, is a permutation of the primes.

Examples

			a(4) = 407 = 11 * 37 because 37 mod 11 = 4, and neither of these primes were used before in the sequence as a(1) = 2 * 3, a(2) = 5 * 7, and a(3) = 13 * 29, and so 11 and 37 are the earliest possible primes to satisfy the condition.
a(5) = 817 = 19 * 43 because 43 mod 19 = 5. Smaller candidate primes such as 13 and 31 would have been suitable, but 13 was already used for a(3) = 377 = 13 * 29. Therefore 19 and 43 are the earliest possible primes to satisfy the condition.
		

Crossrefs

Programs

  • Mathematica
    q[k_, n_, ps_] := Module[{f = FactorInteger[k], p1, p2}, If[f[[;; , 2]] != {1, 1}, {}, p1 = f[[1, 1]]; p2 = f[[2, 1]]; If[Mod[p2, p1] == n && ! MemberQ[ps, p1] && ! MemberQ[ps, p2], {p1, p2}, {}]]];
    seq[nmax_] := Module[{ps = {}, s = {}, k, p}, Do[k = 6; While[(p = q[k, n, ps]) == {}, k++]; AppendTo[s, Times @@ p]; ps = Join[ps, p], {n, 1, nmax}]; s]; seq[40] (* Amiram Eldar, Aug 14 2025 *)
    nsp[n_Integer] := nsp[n] = Block[{sp = n + 1}, While[ PrimeOmega[sp] != 2, sp++]; sp]; a[n_] := Block[{sp = 4}, While[fi = Flatten[ Table[ #[[1]], {#[[2]]}] & /@ FactorInteger[ sp]]; Mod[ fi[[2]], fi[[1]]] != n || MemberQ[p, fi[[1]]] ||  MemberQ[p, fi[[2]]], sp = nsp[sp]]; AppendTo[p, fi[[1]]]; AppendTo[p, fi[[2]]]; sp]; p = {}; Do[Print[{n, f[n]}], {n, 50}] (* Robert G. Wilson v, Aug 20 2025 *)
Showing 1-4 of 4 results.