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.

A098048 Numbers k such that A098037(k) sets a new record. A098037 is the number of prime divisors (counting multiplicity) of the sums of two consecutive primes.

Original entry on oeis.org

1, 2, 5, 16, 18, 43, 162, 190, 532, 564, 3314, 3908, 10499, 30789, 53828, 62946, 278737, 364195, 629686, 3768344, 7827416, 9496221, 23159959, 68035462, 92566977, 370110663, 648634305, 4032924162, 7748432257, 17324573653, 19879357650, 34988238805
Offset: 1

Views

Author

Jason Earls, Sep 11 2004

Keywords

Crossrefs

Programs

  • Mathematica
    s = PrimeOmega[Total[#]] & /@ Partition[Prime[Range[10^5]], 2, 1]; Map[FirstPosition[s, #][[1]] &, Union@FoldList[Max, s]] (* Amiram Eldar, Feb 07 2020 *)
    With[{nn=10^6},DeleteDuplicates[Thread[{Range[nn-1],PrimeOmega[Total[#]]&/@Partition[Prime[ Range[nn]],2,1]}],GreaterEqual[ #1[[2]],#2[[2]]]&][[;;,1]]] (* The program generates the first 19 terms of the sequence. *) (* Harvey P. Dale, Sep 20 2024 *)

Extensions

a(17)-a(29) from Donovan Johnson, Sep 27 2008
a(30)-a(32) from Amiram Eldar, Feb 07 2020

A251600 Least k such that prime(k) + prime(k+1) contains n prime divisors (with multiplicity), otherwise 0.

Original entry on oeis.org

1, 0, 2, 5, 16, 20, 18, 43, 162, 190, 532, 916, 564, 3314, 3908, 10499, 30789, 53828, 153384, 62946, 278737, 364195, 629686, 3768344, 7827416, 9496221, 23159959, 184328920, 68035462, 92566977, 457932094, 370110663, 648634305, 4032924162, 7841376455
Offset: 1

Views

Author

Michel Lagneau, Dec 05 2014

Keywords

Comments

If p and q are two consecutive odd primes, then p + q is the product of at least three primes (not necessarily distinct) because p + q = 2*(p + q)/2 => (p + q)/2 is a composite integer between two consecutive primes p and q that is the product of at least two prime numbers. Thus 2*(p + q)/2 has at least three prime factors => a(1) = 1 because prime(1) is even => prime(1) + prime(2) = 5 is prime and a(2) = 0, probably the only 0 of the sequence.

Examples

			a(5) = 16 because prime(16) + prime(17) = 53 + 59 = 112 = 7*2^4 with 5 prime divisors.
		

Crossrefs

Programs

  • Mathematica
    A251600 = {1, 0}; Do[k = 1; While[PrimeOmega[Prime[k] + Prime[k + 1]] != n, k++]; AppendTo[A251600, k], {n, 3, 10}]; A251600

Extensions

a(28)-a(33) from Daniel Suteu, Nov 18 2018
a(34)-a(35) from Giovanni Resta, Nov 19 2018

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