login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A187553 Smallest prime p such that the sum of the squares of the digits of p equals n (or 0 if no such prime exists). 0
0, 11, 0, 2, 101111, 211, 2111, 101111111, 3, 13, 113, 112121, 23, 21221, 1123, 11213, 41, 1223, 313, 10133, 241, 233, 112223, 21313, 5, 431, 151, 1151, 13313, 251, 2333, 11251, 2243, 53, 1433, 1153, 61, 523, 1523, 11161, 443, 541, 353, 33413, 2621, 163, 1163, 13523, 7, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

a(3) = 0 because the numbers of the form 10..010..01 are divisible by 3. Conjecture : except for the numbers 1 and 3, for every possible square digit sum there exists a prime.

LINKS

Table of n, a(n) for n=1..50.

EXAMPLE

a(13) = 23 because 2^2 + 3^2 = 13, and 23 is the least such prime.

MAPLE

with(numtheory):for k from 2 to 100 do: id:=0:for p from 1 to 100000 while(id=0)

  do:n:=ithprime(p):l:=length(n):n0:=n:s:=0:for m from 1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v :s:=s+u^2:od: if s=k then id:=1:printf(`%d, `, n):else fi:od:od:

CROSSREFS

Cf. A003132, A020449, A055016, A067180.

Sequence in context: A173189 A115595 A342123 * A003621 A338827 A055963

Adjacent sequences:  A187550 A187551 A187552 * A187554 A187555 A187556

KEYWORD

nonn,base

AUTHOR

Michel Lagneau, Mar 26 2011

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 13 02:47 EDT 2021. Contains 342934 sequences. (Running on oeis4.)