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.

A136358 Increasing sequence obtained by union of two sequences {b(n)} and {c(n)}, where b(n) is the smallest odd composite number m such that both m-2 and m+2 are prime and the set of distinct prime factors of m consists of the first n odd primes and c(n) is the smallest composite number m such that both m-1 and m+1 are primes and the set of the distinct prime factors of m consists of the first n primes.

Original entry on oeis.org

4, 6, 9, 15, 30, 105, 420, 2310, 3465, 15015, 180180, 765765, 4084080, 106696590, 247342095, 892371480, 3011753745, 9704539845, 100280245065, 103515091680, 4412330782860, 29682952539240, 634473110526255, 22514519501013540
Offset: 1

Views

Author

Enoch Haga, Dec 25 2007

Keywords

Comments

This sequence is different from A070826 and A118750.

Examples

			a(1)=4 is preceded by 3 and followed by 5, both primes; a(3)=9, preceded by 7 and followed by 11, both primes.
		

Crossrefs

Programs

  • Mathematica
    b[n_]:=(d=Product[Prime[k],{k,n}]; For[m=1,!(!PrimeQ[d*m]&&PrimeQ[d*m-1] &&PrimeQ[d*m+1]&&Length[FactorInteger[c*m]]==n),m++ ]; d*m); c[n_]:=(d=Product [Prime[k],{k,2,n+1}]; For[m=1,!(!PrimeQ[d*(2*m-1)]&&PrimeQ[d(2m-1)-2]&&PrimeQ [d(2m-1)+2]&&Length[FactorInteger[d(2m-1)]]==n),m++ ]; d(2m-1)); Take[Union[Table [b[k],{k,24}],Table[c[k],{k,24}]],24] (* Farideh Firoozbakht, Aug 13 2009 *)
  • UBASIC
    10 'A136358, Enoch Haga, Jun 19 2009'
    11 'compute and combine input 2 or 3 separately; begin with 4 and 9
    20 input "prime, 2 or 3";A
    30 if A=2 or A=3 then B=nxtprm(A)
    40 print A;B;:R=A*B:print R;:stop
    50 if even(R)=1 then if R-1=prmdiv(R-1) and R+1=prmdiv(R+1) then print "*"
    60 if even(R)=0 then if R-2=prmdiv(R-2) and R+2=prmdiv(R+2) then print "+"
    61 print R:stop
    70 B=nxtprm(B):R=B*R
    90 print B;R:stop
    100 goto 50
    - Enoch Haga, Jul 11 2009

Extensions

Edited, corrected and extended by Farideh Firoozbakht, Aug 13 2009

A136353 First odd composite N divisible by precisely the first n odd primes with N-2 prime.

Original entry on oeis.org

9, 15, 105, 1155, 15015, 255255, 4849845, 111546435, 9704539845, 100280245065, 18551845337025, 152125131763605, 98120709987525225, 7071232499767651215, 16294579238595022365, 33648306127698721183725, 527797716117331369424715
Offset: 1

Views

Author

Enoch Haga, Dec 25 2007

Keywords

Comments

This sequence is different from A070826 and A118750.
A clearer definition of the sequence: a(n) is the smallest odd composite number m such that m - 2 is prime and the set of the distinct prime factors of m equals the set of the first n odd primes. - Farideh Firoozbakht, Jun 30 2009

Examples

			The first odd prime is 3, 3*3-2 = 7 is prime so a(1) = 9.
The product of the first two odd primes is 15, and 15-2 is prime, so a(2) = 15.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=(c=Product[Prime[k],{k,2,n+1}];For[m=1,!(!PrimeQ[c (2m-1)]&&PrimeQ[c(2m-1)-2]&&Length[FactorInteger[c(2m-1)]]==n),m++ ];c(2m-1));Table[a[n],{n,20}] (* Enoch Haga, Jul 02 2009 *)
  • PARI
    sm(n,x)=forprime(p=2,x, n/=p^valuation(n,p)); n==1
    a(n)=my(m=factorback(primes(n+1)[2..n+1]),k,p=prime(n+1)); while(!isprime(k++*m-2) && sm(k,p),); k*m \\ Charles R Greathouse IV, Sep 14 2015

Formula

Compute N = product of the first n odd primes. If N-2 is prime, add N to the sequence. Otherwise test 3N, 5N, 7N, 9N, ... until kN - 2 is prime, subject to A006530(k) <= n+1.

Extensions

More terms, better title, and Mathematica program from Farideh Firoozbakht received Jun 30 2009. - Enoch Haga, Jul 02 2009
Further editing by Charles R Greathouse IV, Oct 05 2009

A136356 Increasing sequence obtained by union of two sequences A136353 and {b(n)}, where b(n) is the smallest composite number m such that m-1 is prime and the set of distinct prime factors of m consists of the first n primes.

Original entry on oeis.org

4, 6, 9, 15, 30, 105, 420, 1155, 2310, 15015, 30030, 255255, 1021020, 4849845, 19399380, 111546435, 669278610, 9704539845, 38818159380, 100280245065, 601681470390, 14841476269620, 18551845337025, 152125131763605
Offset: 1

Views

Author

Enoch Haga, Dec 25 2007

Keywords

Comments

This sequence is different from A070826 and A118750.

Examples

			a(4)=15 because k=2 and prime factors are 3 and 5; 15 is odd and n-2=13, prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=(c=Product[Prime[k],{k,n}]; For[m=1,!(!PrimeQ[c*m]&&PrimeQ[c*m-1]&&Length[FactorInteger[c*m]]==n),m++ ]; c*m);
    b[n_]:=(c=Product[Prime[k],{k,2,n+1}]; For[m=1,!(!PrimeQ[c(2m-1)]&&PrimeQ[c(2m-1)-2]&&Length[FactorInteger[c(2*m-1)]]==n),m++ ]; c(2m-1));
    Take[Union[Table[a[k],{k,24}],Table[b[k],{k,24}]],24] (* Farideh Firoozbakht, Aug 13 2009 *)

Extensions

Edited, corrected and extended by Farideh Firoozbakht, Aug 13 2009
Showing 1-3 of 3 results.