login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A199593 Numbers n such that 3n-2, 3n-1 and 3n are all composite. 3

%I #64 Apr 16 2022 16:46:12

%S 9,12,17,19,22,26,29,31,32,39,40,41,42,45,48,49,52,54,57,59,62,63,68,

%T 69,70,72,73,74,79,82,83,85,87,89,92,96,97,99,100,101,102,107,108,109,

%U 110,112,114,115,119,121,122,124,126,129,131,132,135,136,138,139,142,143,146,149,151,152,157,158,159,161,162,165,166,169,171,172,173,176,177,178

%N Numbers n such that 3n-2, 3n-1 and 3n are all composite.

%C From _Antti Karttunen_, Apr 17 2015: (Start)

%C Other, equivalent definitions:

%C Numbers n such that A007310(n) is composite, from which it follows that the function c(1) = 0, c(n) = 1-A075743(n-1) is the characteristic function of this sequence.

%C Numbers n such that A084967(n) has at least three prime factors (when counted with bigomega, A001222).

%C Numbers n such that A249823(n) is composite.

%C (End)

%C There are n - pi(3n) + 1 terms in this sequence up to n; with an efficient algorithm for pi(x) this allows isolated large values to be computed. Using _David Baugh_ and Kim Walisch's calculation that pi(10^27) = 16352460426841680446427399 one can see that a(316980872906491652886905934) = 333333333333333333333333333 (since 999999999999999999999999997 is composite). - _Charles R Greathouse IV_, Sep 13 2016

%D Ernest V. Miliauskas, letter to _N. J. A. Sloane_, Dec 21 1985.

%H Charles R Greathouse IV, <a href="/A199593/b199593.txt">Table of n, a(n) for n = 1..10000</a>

%H Bogart B. Strauss, Formula Explanation, pp. <a href="/A199593/a199593.jpg">1</a>, <a href="/A199593/a199593_1.jpg">2</a>, <a href="/A199593/a199593_2.jpg">3</a>.

%F ((1+(-1)^k)((-1)^n)(2n+3)+2k(6n+9+(-1)^n)+((-1)^k)+(12n^2)+36n+29)/4 n,k are all natural numbers and zero. - _Bogart B. Strauss_, Jul 10 2013

%F a(n) = n + 3n/log n + o(n/log n). - _Charles R Greathouse IV_, Oct 27 2013, corrected Aug 07 2016

%p remove(t -> isprime(3*t-1 - (t mod 2)),{$2..2000}); # _Robert Israel_, Apr 17 2015

%t Select[Range[200], Union[PrimeQ[{3# - 2, 3# - 1, 3#}]] == {False} &] (* _Alonso del Arte_, Jul 06 2013 *)

%o (PARI) is(n)=!isprime(bitor(3*n-2,1)) && n>1 \\ _Charles R Greathouse IV_, Oct 27 2013

%o (Scheme, after Greathouse's PARI-program above, requiring also Antti Karttunen's IntSeq-library)

%o (define A199593 (MATCHING-POS 1 2 (lambda (n) (not (prime? (A003986bi (+ n n n -2) 1)))))) ;; A003986bi implements binary inclusive or (A003986).

%o ;; _Antti Karttunen_, Apr 17 2015

%o (Magma) [n: n in [1..200] | not IsPrime(3*n) and not IsPrime(3*n-1) and not IsPrime(3*n-2)]; // _Vincenzo Librandi_, Apr 18 2015

%o (Python)

%o from sympy import isprime

%o def ok(n): return n > 0 and not any(isprime(3*n-i) for i in [2, 1, 0])

%o print([k for k in range(179) if ok(k)]) # _Michael S. Branicky_, Apr 16 2022

%Y Cf. A053726, A199595, A001222, A007310, A075743, A084967, A249823.

%K nonn,easy

%O 1,1

%A _N. J. A. Sloane_, Nov 08 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 6 10:06 EDT 2024. Contains 375712 sequences. (Running on oeis4.)