cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A117838 Smaller of two consecutive prime numbers with the same digital root.

This page as a plain text file.
%I A117838 #14 Sep 15 2024 01:38:59
%S A117838 523,1069,1259,1381,1759,1913,2161,2503,2861,3803,3889,4159,4373,4423,
%T A117838 4463,4603,4703,4733,5059,5209,5483,6011,6229,6451,6529,6581,6619,
%U A117838 7159,7351,7393,7433,7459,7621,7883,8191,8761,9109,9293,9551,9749,9949
%N A117838 Smaller of two consecutive prime numbers with the same digital root.
%C A117838 Contains all sequences with primes that are followed by a prime gap which is a multiple of 18 - since adding multiples of 9 does not change the digital root and the gaps are even. So A031936 (gap 18) and A134117 (gap 36) are subsequences and lower primes of prime gap 54 (35617, 40289, 40639, 86869, 100853,...), prime gap 72 (31397, 360091, 507217, 517639, 633667, 650107, 705317....) or prime gap 90 (404851,576791,..), for example, are also in here (cf. A000230). - _R. J. Mathar_, Apr 14 2008
%H A117838 M. F. Hasler, <a href="/A117838/b117838.txt">Table of n, a(n) for n = 1..5833</a>.
%F A117838 {A000040(i): 18 | A001223(i), any i}. - _R. J. Mathar_, Apr 14 2008
%e A117838 523 and 541 are two consecutive prime numbers with the same digital root, namely 1.
%t A117838 Select[Prime[Range[1250]],Mod[ # - 1, 9] + 1 ==Mod[NextPrime[#]-1,9]+1&] (* _James C. McMahon_, Sep 14 2024 *)
%o A117838 (PARI) isA117838(p)={ (nextprime(p+1)-p)%9==0 }
%o A117838 forprime( p=1,10^4, isA117838(p) & print1(p", ")) \\ _M. F. Hasler_, Apr 13 2008
%K A117838 base,nonn
%O A117838 1,1
%A A117838 Luc Stevens (lms022(AT)yahoo.com), Apr 30 2006
%E A117838 Corrected by _R. J. Mathar_ and _M. F. Hasler_, Apr 13 2008