login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual Appeal: Today, Nov 11 2014, is the 4th anniversary of the launch of the new OEIS web site. 70,000 sequences have been added in these four years, all edited by volunteers. Please make a donation (tax deductible in the US) to help keep the OEIS running.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007513 a(n) = initial prime of n consecutive primes such that first and last have same digit sum.
(Formerly M2186)
2
2, 523, 109, 79, 2, 13, 5, 127, 47, 17, 5, 127, 53, 17, 7, 67, 31, 37, 47, 37, 83, 11, 43, 19, 157, 2, 37, 5, 47, 5, 19, 67, 7, 29, 19, 53, 31, 73, 53, 29, 139, 13, 67, 83, 7, 47, 29, 17, 79, 7, 19, 37, 59, 43, 271, 19, 29, 181, 167, 59, 97, 5, 149, 7, 59, 337, 41, 53, 43, 127 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

REFERENCES

J. R. Smart, A new function from a table of primes, J. Rec. Math., 7 (No. 4, 1974), 293-294.

N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

EXAMPLE

523 and 541 are first pair of consecutive primes with same sum of digits (10).

MAPLE

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) ; [From R. J. Mathar, Dec 09 2009]

MATHEMATICA

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 *)

PROG

(Haskell)

import Data.Function (on)

import Data.List (elemIndex)

import Data.Maybe (fromJust)

a007513 n = a000040_list !! (fromJust $ elemIndex 0 $

   zipWith ((-) `on` a007953) a000040_list $ drop (n-1) a000040_list)

-- Reinhard Zumkeller, Aug 17 2011

CROSSREFS

Sequence in context: A182446 A218436 A080778 * A071613 A202277 A177836

Adjacent sequences:  A007510 A007511 A007512 * A007514 A007515 A007516

KEYWORD

base,nonn,easy,nice,look

AUTHOR

N. J. A. Sloane, Robert G. Wilson v

EXTENSIONS

Terms beyond a(57) by R. J. Mathar, Dec 09 2009

STATUS

approved

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

Content is available under The OEIS End-User License Agreement .

Last modified December 20 02:13 EST 2014. Contains 252240 sequences.