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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A281290 Primes p where the difference between the largest digit of p and sum of all other digits equals 4. 1
37, 59, 73, 127, 149, 239, 271, 293, 307, 419, 491, 509, 941, 1049, 1061, 1117, 1171, 1193, 1229, 1319, 1409, 1601, 1913, 1931, 2017, 2039, 2129, 2309, 2903, 3119, 3191, 3209, 3911, 4019, 4091, 5009, 6011, 6101, 9041, 9203, 9221, 9311, 10061, 10139, 10193 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 (terms 1..2579 from Lars Blomberg)

EXAMPLE

37 is a term since 7 - 3 = 4.

9221 is a term, since 9 - (2 + 2 + 1) = 4.

MATHEMATICA

Select[Prime@ Range[10^3], Fold[#1 - #2 &, First@ #, Rest@ #] == 4 &@ Reverse@ Sort@ IntegerDigits@ # &] (* Michael De Vlieger, Feb 08 2017 *)

PROG

(PARI) is(n)=my(d=digits(n)); 2*vecmax(d)==vecsum(d)+4 && isprime(n) \\ Charles R Greathouse IV, Feb 18 2017

(PARI) do(d)=my(v=List()); for(len=1, d, for(b=5, 9, for(e=0, len-1, my(t=b*10^e, n, dig); forvec(u=vector(b-4, i, [0, len-1]), n=t+sum(i=1, #u, 10^u[i]); if(!isprime(n), next); dig=digits(n); if(2*vecmax(dig)==vecsum(dig)+4, listput(v, n)), 1)))); Set(v) \\ Charles R Greathouse IV, Feb 18 2017

CROSSREFS

A subsequence of A280915.

Cf. A000040.

Sequence in context: A090798 A000928 A073276 * A105460 A141851 A105461

Adjacent sequences:  A281287 A281288 A281289 * A281291 A281292 A281293

KEYWORD

nonn,base

AUTHOR

Osama Abuajamieh, Jan 19 2017

EXTENSIONS

More terms from Lars Blomberg, Feb 18 2017

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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy .

Last modified February 24 14:41 EST 2018. Contains 299623 sequences. (Running on oeis4.)