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!)
A068017 Composite n such that sigma(n) - 1 and sigma(n) + 1 are twin primes. 5
6, 10, 20, 24, 26, 30, 38, 46, 51, 55, 85, 88, 105, 114, 118, 126, 135, 136, 141, 145, 147, 155, 158, 161, 177, 178, 185, 203, 206, 207, 209, 216, 230, 236, 238, 255, 278, 296, 321, 344, 346, 355, 371, 377, 384, 391, 396, 398, 416, 424, 447, 462, 486, 500 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Harvey P. Dale, Table of n, a(n) for n = 1..1000

EXAMPLE

For n=46, sigma(46)=1+2+23+46=72, for n=51, sigma(51)=1+3+17+51=72 and also for n=55, sigma(55)=1+5+11+55=72 is the middle term of {71,73} twins.

MATHEMATICA

Do[s=-1+DivisorSigma[1, n]; s1=1+DivisorSigma[1, n]; If[PrimeQ[s]&&PrimeQ[s1]&&!PrimeQ[n], Print[n]], {n, 1, 2000}]

cntpQ[n_]:=Module[{ds=DivisorSigma[1, n]}, CompositeQ[n]&&AllTrue[ds+{1, -1}, PrimeQ]]; Select[Range[500], cntpQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 05 2015 *)

PROG

(PARI) isok(n) = my(s=sigma(n)); !isprime(n) && isprime(s-1) && isprime(s+1); \\ Michel Marcus, Apr 24 2019

CROSSREFS

Cf. A000203, A072282.

Sequence in context: A015783 A356055 A300020 * A270544 A181995 A169810

Adjacent sequences: A068014 A068015 A068016 * A068018 A068019 A068020

KEYWORD

nonn

AUTHOR

Labos Elemer, Feb 08 2002

STATUS

approved

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 February 6 20:45 EST 2023. Contains 360111 sequences. (Running on oeis4.)