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

A098037 Number of prime divisors, counted with multiplicity, of the sum of two consecutive primes.

Original entry on oeis.org

1, 3, 3, 3, 4, 3, 4, 3, 3, 4, 3, 3, 4, 4, 4, 5, 5, 7, 3, 6, 4, 5, 3, 3, 4, 4, 4, 6, 3, 6, 3, 3, 4, 7, 5, 4, 7, 4, 4, 6, 6, 4, 8, 4, 5, 3, 3, 5, 5, 4, 4, 7, 4, 3, 5, 4, 6, 3, 4, 4, 8, 6, 3, 6, 5, 7, 3, 5, 5, 5, 4, 4, 4, 5, 3, 3, 3, 4, 6, 5, 6, 4, 8, 4, 5, 3, 3, 5, 5, 4, 3, 4, 3, 5, 3, 4, 3, 5, 5, 7, 6, 7, 3, 5, 4
Offset: 1

Views

Author

Cino Hilliard, Sep 10 2004

Keywords

Comments

Clearly sum of two consecutive primes prime(x) and prime(x+1) has more than 2 prime divisors for all x > 1.

Examples

			Prime(2) + prime(3) = 2*2*2, 3 factors, the second term in the sequence.
		

Crossrefs

Cf. A071215, A251600 (greedy inverse).

Programs

  • Maple
    A098037 := proc(n)
        ithprime(n)+ithprime(n+1) ;
        numtheory[bigomega](%) ;
    end proc:
    seq(A098037(n),n=1..40) ; # R. J. Mathar, Jan 20 2025
  • Mathematica
    PrimeOmega[Total[#]]&/@Partition[Prime[Range[110]],2,1] (* Harvey P. Dale, Jun 14 2011 *)
  • PARI
    b(n) = for(x=1,n,y1=(prime(x)+prime(x+1));print1(bigomega(y1)","))

Formula

a(n) = A001222(A001043(n)). - Michel Marcus, Feb 15 2014

Extensions

Definition corrected by Andrew S. Plewe, Apr 08 2007

A251609 Least k such that prime(k) + prime(k+1) contains n distinct prime divisors.

Original entry on oeis.org

1, 3, 6, 27, 276, 1755, 24865, 646029, 7946521, 195711271, 4129119136, 198635909763, 6351380968517, 322641218722443, 11068897188590241, 501741852481602261, 24367382928343066431, 1292304206793356882286
Offset: 1

Views

Author

Michel Lagneau, Dec 05 2014

Keywords

Examples

			a(1) = 1 because prime(1) + prime(2) = 2 + 3 = 5, which is a prime power and so has one distinct prime divisor; the other prime indices yielding a prime power are 2, 18, 564,...(A071352) since prime(2) + prime(3) = 3 + 5 = 2^3, prime(18) + prime(19) = 61 + 67 = 2^7, prime(564) + prime(565)= 4093 + 4099 = 2^13,...
		

Crossrefs

Programs

  • Maple
    N:= 10^6: # to use primes <= N
    Primes:= select(isprime, [2,seq(2*i+1,i=1..(N-1)/2)]):
    for i from 1 to nops(Primes)-1 do
      f:= nops(numtheory:-factorset(Primes[i]+Primes[i+1]));
      if not assigned(A[f]) then A[f]:= i fi
    od:
    seq(A[j],j=1..max(indices(A))); # Robert Israel, Dec 05 2014
  • Mathematica
    lst={};Do[k=1;While[Length[FactorInteger[Prime[k]+Prime[k+1]]]!=n,k++];AppendTo[lst,k],{n,1,5}];lst

Formula

a(n) = A000720(A230518(n)). - Amiram Eldar, Feb 17 2019

Extensions

a(10)-a(18) from Amiram Eldar, Feb 17 2019

A288507 Least number k such that both prime(k+1) -/+ prime(k) are products of n prime factors (counting multiplicity).

Original entry on oeis.org

24, 319, 738, 57360, 1077529, 116552943
Offset: 3

Views

Author

Zak Seidov, Jun 10 2017

Keywords

Comments

Prime(k) + prime(k+1) cannot be semiprime, so the offset is 3.
For n=3 to 8, all terms k happen to satisfy prime(k+1) - prime(k) = 2^n. - Michel Marcus, Jul 24 2017

Examples

			n = 8: k = 116552943, p = prime(k) = 2394261637, q = prime(k+1) = 2394261893; both q-p = 2^8 and  p+q = 2*3^2*5*7^3*155119 are 8-almost primes (A046310).
		

Crossrefs

Programs

  • PARI
    a(n) = my(k = 1, p = 2, q = nextprime(p+1)); while((bigomega(p+q)!= n) || (bigomega(p-q)!= n), k++; p = q; q = nextprime(p+1)); k; \\ Michel Marcus, Jul 24 2017
    
  • Python
    from sympy import factorint, nextprime
    def A288507(n):
        k, p, q = 1, 2, 3
        while True:
            if sum(factorint(q-p).values()) == n and sum(factorint(q+p).values()) == n:
                return k
            k += 1
            p, q = q, nextprime(q) # Chai Wah Wu, Jul 23 2017
Showing 1-3 of 3 results.