login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A178357 Numbers n such that d(1)^1 + d(2)^2 +...+ d(p)^p and d(1)^p + d(2)^p-1 +...+ d(p)^1 are prime numbers, where d(i), i=1..p, are the digits of n. 2
2, 3, 5, 7, 11, 12, 14, 16, 21, 23, 29, 32, 34, 38, 41, 43, 47, 56, 61, 65, 74, 83, 89, 92, 98, 101, 110, 111, 113, 115, 120, 122, 131, 133, 137, 139, 140, 146, 153, 155, 160, 164, 182, 186, 188, 191, 203, 205, 212, 214, 221, 225, 227, 230, 232, 236, 272, 281, 287, 290, 302, 304, 311, 313, 319, 320, 326, 331 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
1583 is in the sequence because :
1 + 5^2 + 8^3 + 3^4 = 619 and 1^4 + 5^3 + 8^2 + 3^1 = 193 are prime numbers.
MAPLE
with(numtheory):for n from 1 to 1000 do:l:=length(n):n0:=n:s1:=0:s2:=0:for
m from 1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10):n0:=v :s1:=s1+u^(l-m+1):s2:=s2+u^m:od:
if type(s1, prime)=true and type(s2, prime)=true then printf(`%d, `, n):else fi:od:
MATHEMATICA
okQ[n_] := Module[{d=IntegerDigits[n], r}, r=Length[d]; PrimeQ[Total[d^Range[r]]] && PrimeQ[Total[d^Range[r, 1, -1]]]]; Select[Range[1000], okQ]
CROSSREFS
Sequence in context: A139750 A330125 A139749 * A205667 A241506 A361851
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Dec 21 2010
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 07:08 EDT 2024. Contains 371698 sequences. (Running on oeis4.)