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!)
A157678 Numbers k such that k + floor(average of digits of k) is prime. 1

%I #8 Jan 27 2019 21:03:01

%S 1,12,16,27,30,34,38,41,56,63,67,70,74,89,92,96,101,102,105,107,112,

%T 125,128,130,136,146,147,154,161,164,168,175,186,188,190,193,208,210,

%U 219,226,229,231,236,237,247,254,258,265,273,276,278,280,290,305,308,309

%N Numbers k such that k + floor(average of digits of k) is prime.

%H Charles R Greathouse IV, <a href="/A157678/b157678.txt">Table of n, a(n) for n = 1..10000</a>

%e n = 89 -> 89 + floor((8+9)/2) = 89 + 8 = 97 (prime).

%e n = 190 -> 190 + floor((1+9+0)/3) = 190 + 3 = 193 (prime).

%p a := proc (n) local nn: nn := convert(n, base, 10): if isprime(n+floor(add(nn[j], j = 1 .. nops(nn))/nops(nn))) = true then n else end if end proc: seq(a(n), n = 1 .. 350); # _Emeric Deutsch_, Mar 07 2009

%o (PARI) is(n)=isprime(sumdigits(n)\#digits(n)+n) \\ _Charles R Greathouse IV_, Dec 27 2013

%Y Cf. A172367.

%K nonn,base

%O 1,2

%A _Kyle D. Balliet_, Mar 04 2009

%E Corrected and extended by _Emeric Deutsch_, Mar 07 2009

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 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)