A117838 Smaller of two consecutive prime numbers with the same digital root.
523, 1069, 1259, 1381, 1759, 1913, 2161, 2503, 2861, 3803, 3889, 4159, 4373, 4423, 4463, 4603, 4703, 4733, 5059, 5209, 5483, 6011, 6229, 6451, 6529, 6581, 6619, 7159, 7351, 7393, 7433, 7459, 7621, 7883, 8191, 8761, 9109, 9293, 9551, 9749, 9949
Offset: 1
Examples
523 and 541 are two consecutive prime numbers with the same digital root, namely 1.
Links
- M. F. Hasler, Table of n, a(n) for n = 1..5833.
Programs
-
Mathematica
Select[Prime[Range[1250]],Mod[ # - 1, 9] + 1 ==Mod[NextPrime[#]-1,9]+1&] (* James C. McMahon, Sep 14 2024 *)
-
PARI
isA117838(p)={ (nextprime(p+1)-p)%9==0 } forprime( p=1,10^4, isA117838(p) & print1(p", ")) \\ M. F. Hasler, Apr 13 2008
Formula
Extensions
Corrected by R. J. Mathar and M. F. Hasler, Apr 13 2008
Comments