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.

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

This page as a plain text file.
%I A136353 #18 Jul 11 2019 19:21:21
%S A136353 9,15,105,1155,15015,255255,4849845,111546435,9704539845,100280245065,
%T A136353 18551845337025,152125131763605,98120709987525225,7071232499767651215,
%U A136353 16294579238595022365,33648306127698721183725,527797716117331369424715
%N A136353 First odd composite N divisible by precisely the first n odd primes with N-2 prime.
%C A136353 This sequence is different from A070826 and A118750.
%C A136353 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
%H A136353 Charles R Greathouse IV, <a href="/A136353/b136353.txt">Table of n, a(n) for n = 1..200</a>
%F A136353 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.
%e A136353 The first odd prime is 3, 3*3-2 = 7 is prime so a(1) = 9.
%e A136353 The product of the first two odd primes is 15, and 15-2 is prime, so a(2) = 15.
%t A136353 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 *)
%o A136353 (PARI) sm(n,x)=forprime(p=2,x, n/=p^valuation(n,p)); n==1
%o A136353 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
%Y A136353 Cf. A136349, A136350, A136351, A136352, A136354, A136355, A136356, A136357, A136358.
%Y A136353 Cf. A070826, A118750.
%K A136353 nonn
%O A136353 1,1
%A A136353 _Enoch Haga_, Dec 25 2007
%E A136353 More terms, better title, and Mathematica program from _Farideh Firoozbakht_ received Jun 30 2009. - _Enoch Haga_, Jul 02 2009
%E A136353 Further editing by _Charles R Greathouse IV_, Oct 05 2009