login
Nonprimes that are the sum of two consecutive nonprimes.
3

%I #38 Feb 06 2024 08:11:16

%S 1,10,14,22,26,34,38,46,49,51,55,58,62,65,69,74,77,82,86,91,94,99,106,

%T 111,115,118,122,125,129,134,142,146,153,155,158,161,166,169,171,175,

%U 178,183,185,187,189,194,202,206,209,214,218,221,226,231,235,237,243

%N Nonprimes that are the sum of two consecutive nonprimes.

%C One and composite numbers that are the sum of two consecutive composite numbers.

%C Essentially the same as A151740 (except for initial term 1). - _Georg Fischer_, Oct 01 2018

%H Karl-Heinz Hofmann, <a href="/A167611/b167611.txt">Table of n, a(n) for n = 1..10000</a>

%e a(1) = 1st nonprime + 2nd nonprime = 0 + 1 = 1, which is nonprime;

%e a(2) = 3rd nonprime + 4th nonprime = 4 + 6 = 10, which is nonprime.

%o (Magma) m:=150; NonPrime:=[i: i in [0..m] | not IsPrime(i)]; [q: n in [1..#NonPrime-1] | not IsPrime(q) where q is NonPrime[n]+NonPrime[n+1]]; // _Bruno Berselli_, Apr 05 2014

%o (Python)

%o from sympy import isprime, composite

%o print([1] + [totest for k in range(1,91) if not isprime(totest := composite(k) + composite(k+1))]) # _Karl-Heinz Hofmann_, Jan 25 2024

%Y Cf. A018252, A141468, A151740.

%K nonn

%O 1,2

%A _Juri-Stepan Gerasimov_, Nov 07 2009

%E Entries confirmed by _R. J. Mathar_, May 30 2010