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.

A007513 a(n) = initial prime of n consecutive primes such that first and last have same digit sum.

This page as a plain text file.
%I A007513 M2186 #27 Feb 27 2023 13:35:05
%S A007513 2,523,109,79,2,13,5,127,47,17,5,127,53,17,7,67,31,37,47,37,83,11,43,
%T A007513 19,157,2,37,5,47,5,19,67,7,29,19,53,31,73,53,29,139,13,67,83,7,47,29,
%U A007513 17,79,7,19,37,59,43,271,19,29,181,167,59,97,5,149,7,59,337,41,53,43,127
%N A007513 a(n) = initial prime of n consecutive primes such that first and last have same digit sum.
%D A007513 J. R. Smart, A new function from a table of primes, J. Rec. Math., 7 (No. 4, 1974), 293-294.
%D A007513 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A007513 Reinhard Zumkeller, <a href="/A007513/b007513.txt">Table of n, a(n) for n = 1..10000</a>
%H A007513 J. R. Smart, <a href="/A007513/a007513.pdf">A new function from a table of primes</a>, J. Recreational Mathematics 7.4 (1974), 293-294. (Annotated scanned copy)
%e A007513 523 and 541 are first pair of consecutive primes with same sum of digits (10).
%p A007513 A007953 := proc(n) local d; add(d,d=convert(n,base,10)) ; end proc: A007605 := proc(n) A007953(ithprime(n)) ; end proc: A007513 := proc(n) for i from 1 do if A007605(i) = A007605(i+n-1) then return ithprime(i) ; end if; end do ; end proc: seq(A007513(n),n=1..120) ; # _R. J. Mathar_, Dec 09 2009
%t A007513 prms=Prime[Range[2000]];First/@Table[First[Select[Partition[prms,n,1], Total[ IntegerDigits[ First[#]]]==Total[IntegerDigits[Last[#]]]&]], {n,75}] (* _Harvey P. Dale_, May 20 2011 *)
%o A007513 (Haskell)
%o A007513 import Data.Function (on)
%o A007513 import Data.List (elemIndex)
%o A007513 import Data.Maybe (fromJust)
%o A007513 a007513 n = a000040_list !! (fromJust $ elemIndex 0 $
%o A007513    zipWith ((-) `on` a007953) a000040_list $ drop (n-1) a000040_list)
%o A007513 -- _Reinhard Zumkeller_, Aug 17 2011
%K A007513 base,nonn,easy,nice,look
%O A007513 1,1
%A A007513 _N. J. A. Sloane_, _Robert G. Wilson v_
%E A007513 Terms beyond a(57) by _R. J. Mathar_, Dec 09 2009