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

A071216 a(n) is the largest prime factor of prime(n) + prime(n+1).

Original entry on oeis.org

5, 2, 3, 3, 3, 5, 3, 7, 13, 5, 17, 13, 7, 5, 5, 7, 5, 2, 23, 3, 19, 3, 43, 31, 11, 17, 7, 3, 37, 5, 43, 67, 23, 3, 5, 11, 5, 11, 17, 11, 5, 31, 3, 13, 11, 41, 31, 5, 19, 11, 59, 5, 41, 127, 13, 19, 5, 137, 31, 47, 3, 5, 103, 13, 7, 3, 167, 19, 29, 13, 89, 11, 37, 47, 127, 193, 131, 19
Offset: 1

Views

Author

Labos Elemer, May 17 2002

Keywords

Crossrefs

Programs

  • Mathematica
    pf[x_] := Part[Reverse[Flatten[FactorInteger[x]]],2]; Table[pf[Prime[w+1]+Prime[w]], {w,1,128}]
  • PARI
    a(n) = vecmax(factor(prime(n)+prime(n+1))[,1]); \\ Michel Marcus, Aug 29 2019

Formula

a(n) = A006530(A001043(n)).

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

A105418 Smallest prime p such that the sum of it and the following prime has n prime factors including multiplicity, or 0 if no such prime exists.

Original entry on oeis.org

2, 0, 3, 11, 53, 71, 61, 191, 953, 1151, 3833, 7159, 4093, 30713, 36857, 110587, 360439, 663547, 2064379, 786431, 3932153, 5242877, 9437179, 63700991, 138412031, 169869311, 436207613, 3875536883, 1358954453, 1879048183, 10066329587, 8053063661, 14495514619
Offset: 1

Views

Author

Keywords

Comments

a(2) = 0 since it is impossible.

Examples

			a(5) = 53 because (53 + 59) = 112 = 2^4*7.
a(24) = 63700991 because (63700991 + 63700993) = 127401984 = 2^19*3^5.
a(28) = 3875536883 because (3875536883 + 3875536909) = 7751073792 = 2^25*3*7*11.
a(29) = 1358954453 because (1358954453 + 1358954539) = 2717908992 = 2^25*3^4.
a(30) = 1879048183 because (1879048183 + 1879048201) = 3758096384 = 2^29*7.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ Flatten[ Table[ #[[2]], {1}] & /@ FactorInteger[n]]; t = Table[0, {40}]; Do[a = f[Prime[n] + Prime[n + 1]]; If[a < 41 && t[[a]] == 0, t[[a]] = Prime[n]; Print[{a, Prime[n]}]], {n, 111500000}]; t
  • PARI
    almost_primes(A, B, n) = A=max(A, 2^n); (f(m, p, n) = my(list=List()); if(n==1, forprime(q=max(p, ceil(A/m)), B\m, listput(list, m*q)), forprime(q=p, sqrtnint(B\m, n), list=concat(list, f(m*q, q, n-1)))); list); vecsort(Vec(f(1, 2, n)));
    a(n) = if(n==2, return(0)); my(x=2^n, y=2*x); while(1, my(v=almost_primes(x, y, n)); for(k=1, #v, my(p=precprime(max(v[k]>>1, 2)), q=nextprime(p+1)); if(p+q == v[k], return(p))); x=y+1; y=2*x); \\ Daniel Suteu, Aug 06 2024

Extensions

a(28)=3875536883 from Ray Chandler and Robert G. Wilson v, Apr 10 2005
Edited by Ray Chandler, Apr 10 2005
a(31)-a(33) from Daniel Suteu, Nov 18 2018
Definition slightly modified by Harvey P. Dale, Jul 17 2024

A230518 Smallest prime p = a(n) such that the sum of p and the next prime has n distinct prime factors.

Original entry on oeis.org

2, 5, 13, 103, 1783, 15013, 285283, 9699667, 140645501, 4127218087, 100280245063, 5625398263453, 202666375276361, 11602324073775431, 438272504610946003, 21828587281891445047, 1156915125940246587913, 66595945348137856405747, 4632891063696575353839163
Offset: 1

Views

Author

Jean-François Alcover, Oct 22 2013

Keywords

Examples

			30 = 13+17 is the earliest case with 3 prime divisors, so a(3) = 13.
		

Crossrefs

Programs

  • Mathematica
    Clear[a]; a[_] = 0; Do[p = Prime[k]; q = Prime[k+1]; n = PrimeNu[p+q]; If[a[n] == 0, a[n] = p; Print["a(", n, ") = p = ", p, ", q = ", q]], {k, 1, 10^9}]; Table[a[n], {n, 1, 10}]
  • PARI
    a(n) = {p = 2; while (omega(p+nextprime(p+1)) != n, p = nextprime(p+1)); p;} \\ Michel Marcus, Oct 22 2013
    
  • PARI
    step(Fvec)=my([n,f]=Fvec,v=List(),t);for(i=1,#f~,t=f;t[i,2]++;listput(v,[n*f[i,1],t]);t=f;t[i,1]=nextprime(t[i,1]+1);if(i==#f~||t[i,1]1,1,prime(i))),v=[[factorback(f),f]],t); if(!bad(v[1][1]),return(precprime(v[1][1]/2))); v=vecsort(step(v[1]),1); while(bad(v[1][1]), v=vecsort(concat(step(v[1]),v[2..#v]),1,8)); precprime(v[1][1]/2); \\ Charles R Greathouse IV, Oct 22 2013

Formula

a(n) > (1/2 + o(1)) n^n. - Charles R Greathouse IV, Oct 22 2013

Extensions

a(11)-a(19) from Charles R Greathouse IV, Oct 22 2013

A378123 a(n) = number of prime divisors of the sum of the first n odd primes.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 3, 2, 2, 2, 1, 3, 1, 2, 2, 3, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 1, 3, 2, 3, 2, 2, 3, 3, 2, 3, 3, 3, 2, 4, 2, 2, 2, 3, 4, 3, 2, 3, 1, 3, 1, 3, 2, 3, 2, 5, 1, 5, 2, 4, 1, 3, 2, 3, 3, 3, 1, 3, 2, 3, 1, 3, 2, 3, 2, 4, 3, 3, 2, 2, 2, 4
Offset: 1

Views

Author

Clark Kimberling, Nov 17 2024

Keywords

Examples

			3+5+7+11+13 = 39 = 3*13, so a(5) = 2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := PrimeNu[Total[Prime[1+Range[n]]]]; Array[a, 500]
  • PARI
    a378123(n)=omega(sum(k=2,n+1,prime(k))) \\ Hugo Pfoertner, Nov 19 2024

Formula

a(n) = A001221(A071148(n)).

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

A378122 a(n) = number of prime divisors of the sum of the first n primes.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Nov 17 2024

Keywords

Examples

			2+3+5+7+11 = 28 = 2*2*7, so a(5) = 2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := PrimeNu[Total[Prime[Range[n]]]]; Array[a, 500]
Showing 1-7 of 7 results.