|
|
A142347
|
|
Nonprimes of the form (p(n)+r(n))/2, where p(n)=n-th prime and r(n)=n-th nonprime.
|
|
1
|
|
|
1, 22, 32, 42, 58, 66, 88, 99, 104, 114, 119, 144, 166, 196, 200, 214, 221, 253, 279, 287, 291, 300, 314, 326, 345, 352, 372, 400, 407, 418, 426, 442, 454, 472, 482, 502, 506, 513, 538, 556, 566, 573, 580, 590, 602, 612, 618, 625, 630, 669, 698, 708, 717, 725
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
EXAMPLE
|
If n=1, then (p(1)+r(1))/2=(2+0)/2=1=a(1).
If n=10, then (p(10)+r(10))/2=(29+15)/2=22=a(2).
If n=14, then (p(14)+r(14))/2=(43+21)/2=32=a(3).
If n=17, then (p(17)+r(17))/2=(59+25)/2=42=a(4).
If n=23, then (p(23)+r(23))/2=(83+33)/2=58=a(5), etc.
|
|
MAPLE
|
A141468 := proc(n) option remember; if n <= 2 then n-1; else for a from procname(n-1)+1 do if not isprime(a) then return a; end if; end do; end if; end proc:
for n from 1 to 300 do c := (ithprime(n)+A141468(n))/2 ; if type(c, 'integer') then if not isprime(c) then printf("%d, ", c) ; end if; end if; end do: (End)
|
|
MATHEMATICA
|
Module[{nn=1500, pr, np, len}, pr=Prime[Range[PrimePi[nn]]]; np=Complement[ Range[ 0, nn], pr]; len=Min[Length[pr], Length[np]]; Select[Total[#]/2&/@Thread[{Take[pr, len], Take[np, len]}], IntegerQ[#]&&!PrimeQ[#]&]] (* Harvey P. Dale, Jul 28 2014 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
Corrected (119 inserted, 239 removed etc.) by R. J. Mathar, Apr 28 2010
|
|
STATUS
|
approved
|
|
|
|