cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A281226 Primes p where largest digit of p minus sum of all other digits is equal to 1.

Original entry on oeis.org

23, 43, 67, 89, 113, 131, 157, 179, 197, 241, 263, 269, 311, 337, 359, 373, 421, 449, 461, 571, 593, 607, 641, 719, 733, 751, 809, 953, 971, 1013, 1031, 1097, 1103, 1163, 1237, 1259, 1301, 1327, 1361, 1439, 1471, 1493, 1613, 1619, 1709, 1723, 1741, 1907, 2003, 2063, 2069, 2137
Offset: 1

Views

Author

Osama Abuajamieh, Jan 18 2017

Keywords

Examples

			a(19) = 461, as 6 - (4 + 1) = 1
		

Crossrefs

A subsequence of A280915.
Cf. A000040.

Programs

  • Mathematica
    Select[Prime@ Range[10^3], Fold[#1 - #2 &, First@ #, Rest@ #] == 1 &@ Reverse@ Sort@ IntegerDigits@ # &] (* Michael De Vlieger, Feb 08 2017 *)
    ldod1Q[n_]:=Module[{idn=Sort[IntegerDigits[n]]},Last[idn]-Total[Most[ idn]] == 1]; Select[Prime[Range[400]],ldod1Q] (* Harvey P. Dale, Sep 14 2019 *)

A281290 Primes p where the difference between the largest digit of p and sum of all other digits equals 4.

Original entry on oeis.org

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
Offset: 1

Views

Author

Osama Abuajamieh, Jan 19 2017

Keywords

Examples

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

Crossrefs

A subsequence of A280915.
Cf. A000040.

Programs

  • Mathematica
    Select[Prime@ Range[10^3], Fold[#1 - #2 &, First@ #, Rest@ #] == 4 &@ Reverse@ Sort@ IntegerDigits@ # &] (* Michael De Vlieger, Feb 08 2017 *)
  • 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

Extensions

More terms from Lars Blomberg, Feb 18 2017
Showing 1-2 of 2 results.