This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A320771 Primes p for which p-1 and p+1 are Niven numbers. 1
 2, 3, 5, 7, 11, 19, 41, 71, 101, 109, 113, 151, 191, 199, 223, 229, 307, 401, 409, 449, 593, 701, 881, 911, 1009, 1013, 1091, 1129, 1231, 1301, 1303, 1451, 1559, 1811, 1999, 2029, 2089, 2213, 2281, 2311, 2351, 2399, 2531, 2609, 2711, 2753, 3037, 3079, 3109, 3221, 3251, 3329 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS All of the prime numbers in sequences A253213, A199684, A199687 are part of the sequence. LINKS Marius A. Burtea, Table of n, a(n) for n = 1..11188 EXAMPLE For p = 11, p-1 = 10 and p + 1 = 12. 10 is divisible by 1 = 1 + 0, 12 is divisible by 3 = 1 + 2. Thus, p = 11 is a term. For p = 229, p-1 = 228 and p + 1 = 230. 228 is divisible by 12 = 2 + 2 + 8, and 230 is divisible by 5 = 2 + 3 + 0. Thus, p = 229 is a term. MATHEMATICA nivenQ[n_] := Divisible[n, Total[IntegerDigits[n]]]; Select[Range[10000], PrimeQ[#] && nivenQ[#-1] && nivenQ[#+1] &] (* Amiram Eldar, Oct 31 2018 *) PROG (PARI) isniven(n) = frac(n/sumdigits(n)) == 0; isok(p) = isprime(p) && isniven(p-1) && isniven(p+1); \\ Michel Marcus, Oct 22 2018 (GAP) Filtered([2..2400], p->IsPrime(p) and (p-1) mod List(List([1..p-1], ListOfDigits), Sum)[p-1]=0 and (p+1) mod List(List([1..p+1], ListOfDigits), Sum)[p+1]=0); # Muniru A Asiru, Oct 29 2018 (MAGMA) [p: p in PrimesUpTo(2000) | IsIntegral((p-1)/&+Intseq(p-1)) and IsIntegral((p+1)/&+Intseq(p+1))]; // Marius A. Burtea, Jan 06 2019 CROSSREFS Cf. A000040, A005349, A007953, A253213, A177506, A199684, A199687. Sequence in context: A033274 A071062 A320725 * A002231 A087769 A084736 Adjacent sequences:  A320768 A320769 A320770 * A320772 A320773 A320774 KEYWORD nonn,base AUTHOR Marius A. Burtea, Oct 21 2018 STATUS approved

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

Last modified April 20 03:36 EDT 2019. Contains 322294 sequences. (Running on oeis4.)