

A005381


Numbers k such that k and k1 are composite.
(Formerly M4598)


28



9, 10, 15, 16, 21, 22, 25, 26, 27, 28, 33, 34, 35, 36, 39, 40, 45, 46, 49, 50, 51, 52, 55, 56, 57, 58, 63, 64, 65, 66, 69, 70, 75, 76, 77, 78, 81, 82, 85, 86, 87, 88, 91, 92, 93, 94, 95, 96, 99, 100, 105, 106, 111, 112, 115, 116, 117, 118, 119, 120, 121, 122
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


COMMENTS

Position where the composites first outnumber the primes by n, among the first natural numbers.  Lekraj Beedassy, Jul 11 2006


REFERENCES

M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 844.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).


LINKS

J. Stauduhar, Table of n, a(n) for n = 1..10000
M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards, Applied Math. Series 55, Tenth Printing, 1972 [alternative scanned copy].
R. P. Boas & N. J. A. Sloane, Correspondence, 1974
B. W. J. Irwin, Recursive Modular Conjecture for pi(n).


FORMULA

Conjecture: pi(n)=Sum_{k=1..n} k mod a(m) mod a(m1) ... mod a(1) mod 2, for all values 1<n<=a(m), where the mod are evaluated from left to right. Verified for first 10000 a(n).  Benedict W. J. Irwin, May 04 2016
As a check, take n=9, m=2, a(m)=10. Then we must take the numbers 1 through 9 and reduce them mod 10 then mod 9 then mod 2. The results are 1,0,1,0,1,0,1,0,0, whose sum is 4 = pi(9), as predicted.  N. J. A. Sloane, May 05 2016
For an attempt at a proof for the conjecture above, see the link. If it is true, then for n>2, isprime(n)=(n mod x) mod 2, where x is the largest a(n)<=n.  Benedict W. J. Irwin, May 06 2016


MAPLE

isA005381 := proc(n)
not isprime(n) and not isprime(n1) ;
end proc:
A005381 := proc(n)
local a;
option remember;
if n = 1 then
9;
else
for a from procname(n1)+1 do
if isA005381(a) then
return a;
end if;
end do:
end if;
end proc: # R. J. Mathar, Jul 14 2015
# second Maple program:
q:= n> ormap(isprime, [n, n1]):
remove(q, [$2..130])[]; # Alois P. Heinz, Dec 26 2021


MATHEMATICA

Select[Range[2, 200], ! PrimeQ[#  1] && ! PrimeQ[#] &]


PROG

(PARI) is(n)=!isprime(n)&&!isprime(n1) \\ M. F. Hasler, Jan 07 2019
(Python)
from sympy import isprime
def ok(n): return n > 3 and not isprime(n) and not isprime(n1)
print([k for k in range(122) if ok(k)]) # Michael S. Branicky, Dec 26 2021


CROSSREFS

Equals A068780 + 1. Cf. A007921.
Cf. A093515 (complement, apart from 1 which is in neither sequence), A323162 (characteristic function).
Sequence in context: A227943 A114844 A194593 * A175090 A197113 A099616
Adjacent sequences: A005378 A005379 A005380 * A005382 A005383 A005384


KEYWORD

nonn,easy


AUTHOR

N. J. A. Sloane


STATUS

approved



