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.

Previous Showing 21-27 of 27 results.

A158283 Prime numbers p such that 1 = abs(final digit of p - sum of all the other digits of p).

Original entry on oeis.org

23, 43, 67, 89, 113, 157, 179, 199, 223, 269, 313, 337, 359, 379, 449, 607, 719, 739, 809, 829, 919, 1013, 1033, 1103, 1123, 1213, 1237, 1259, 1279, 1303, 1327, 1439, 1459, 1549, 1619, 1709, 2003, 2069, 2089, 2113, 2137, 2179, 2203, 2269, 2339, 2539
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Mar 15 2009

Keywords

Examples

			23(1=3-2), 43(1=abs(3-4)), 67(1=abs(7-6)), 89(1=abs(9-8)), 113(1=3-(1+1)).
		

Crossrefs

Programs

  • Mathematica
    ps1[n_]:=Module[{idn=IntegerDigits[n]},Abs[Last[idn]-Total[Most[idn]]] == 1]; Select[Prime[Range[400]],ps1] (* Harvey P. Dale, Jul 31 2012 *)

Extensions

Entries checked by R. J. Mathar, May 19 2010

A158571 Primes whose digit sum is a single-digit nonprime.

Original entry on oeis.org

13, 17, 31, 53, 71, 103, 107, 211, 233, 251, 431, 503, 521, 701, 1021, 1061, 1151, 1201, 1223, 1511, 1601, 2011, 2141, 2213, 2411, 3001, 3023, 3041, 3203, 3221, 4013, 4211, 5003, 5021, 6011, 6101, 7001, 10007, 10061, 10111, 10133, 10151, 10223, 10313
Offset: 1

Views

Author

Parthasarathy Nambi, Mar 21 2009

Keywords

Comments

It is interesting to observe that it is hard to find (I found none) primes whose digit sum is 6. On the contrary, it is easier to find primes whose digit sum is 8.
The digit sum 6 does not occur here because a number with digit sum 6 is divisible by 3 and therefore not prime. - R. J. Mathar, Mar 26 2009

Examples

			1061 is a prime whose digit sum is 8, which is a single-digit nonprime.
		

Crossrefs

Cf. A158217.

Programs

  • Maple
    for i from 1 to 8 do if member(i,[1,3,7]) then S[1,i]:= {i} else S[1,i]:= {} fi od:
    for d from 2 to 5 do
      for x from 1 to 8 do
        S[d,x]:= {};
        for y from 0 to x-1 do
          S[d,x]:= S[d,x] union map(t -> 10^(d-1)*y + t, S[d-1,x-y])
    od od od:
    select(isprime, S[5,4] union S[5,8]); # Robert Israel, Apr 14 2021

Formula

Union of A062339 and A062343. - R. J. Mathar, Mar 26 2009

Extensions

Extended by R. J. Mathar, Mar 26 2009

A165508 Numbers k such that 10^k + 111 is prime.

Original entry on oeis.org

2, 4, 184, 460, 784, 3248, 5194, 92386, 156428, 228208
Offset: 1

Views

Author

Rick L. Shepherd, Sep 21 2009

Keywords

Comments

Terms must be congruent to 2 or 4 mod 6. Other than the first term, which produces 10^2 + 111 = 211, these terms produce primes whose decimal representation is 1 111 concatenated. These are only known to be highly probable primes for 184 and beyond. No more terms up to 15000.
a(8) > 55000. - Tyler NeSmith, Jul 10 2021
The corresponding primes have digit sum 4 (A062339). - Jeppe Stig Nielsen, Feb 10 2023
a(9) > 10^5. - Jeppe Stig Nielsen, Feb 11 2023
a(11) > 6.6*10^5. - Boyan Hu, Nov 14 2024

Examples

			As 10111 = 10^4 + 111 is a prime, 4 is a term.
		

Crossrefs

Programs

Extensions

a(8) from Jeppe Stig Nielsen, Feb 10 2023
a(9)-a(10) from Boyan Hu, Oct 23 2024

A168587 Smallest digit sum of an n-digit prime with only digits 0 and 1 (or 0, if no such prime exists).

Original entry on oeis.org

0, 2, 2, 0, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
Offset: 1

Views

Author

Lekraj Beedassy, Nov 30 2009

Keywords

Comments

See A168586 for the corresponding primes.

Crossrefs

Cf. A062339.

Extensions

Extended by Ray Chandler, Dec 03 2009

A382073 Semiprimes with sum of digits 4.

Original entry on oeis.org

4, 22, 121, 202, 301, 1003, 1111, 2101, 10003, 10021, 10102, 10201, 11002, 11101, 12001, 30001, 100021, 100102, 100201, 101011, 110002, 110101, 111001, 200011, 200101, 1000021, 1000111, 1000201, 1001002, 1001101, 1110001, 2001001, 3000001, 10000003, 10000021, 10000201, 10010002, 10020001
Offset: 1

Views

Author

Zak Seidov and Robert Israel, Mar 14 2025

Keywords

Examples

			a(3) = 121 is a term because 121 = 11^2 is a semiprime and its sum of digits is 1+2+1=4.
		

Crossrefs

Intersection of A001358 and A052218.
Cf. A062339.

Programs

  • Maple
    qsemi:= proc(n) if numtheory:-bigomega(n) = 2 then n fi end proc:
    F:= proc(d) local i,j;
       seq(seq(qsemi(10^(d-1)+1 + 10^i + 10^j),i=0..j),j=0..d-1)
    end proc:
    map(F, [$1..10]);
  • Mathematica
    Select[Range[10^5],PrimeOmega[#]==2 && DigitSum[#]==4 &] (* Stefano Spezia, Mar 14 2025 *)

A157715 Primes sorted on digit sums, then on the primes.

Original entry on oeis.org

2, 11, 101, 3, 13, 31, 103, 211, 1021, 1201, 2011, 3001, 10111, 20011, 20101, 21001, 100003, 102001, 1000003, 1011001, 1020001, 1100101, 2100001, 10010101, 10100011, 20001001, 30000001, 101001001, 200001001, 1000000021, 1000001011
Offset: 1

Views

Author

Lekraj Beedassy, Mar 04 2009

Keywords

Comments

Beyond n = 4, a(n) is believed to coincide with A062339.
Only correct for n >= 4 if an undiscovered prime of digit sum two (which would have to be a member of A080176) does not exist; this is conjectured but not proved. - Jeppe Stig Nielsen, Mar 30 2018

Examples

			There are only three primes with a digit sum of 2, and those are 2, 11, 101. Therefore these three primes are the first three terms of this sequence.
There is only one prime with a digit sum of 3, and that's 3 itself. Any higher number with a digit sum of 3 is a nontrivial multiple of 3 and therefore composite.
Then follows the first prime with a digit sum of 4, which is 13.
		

Crossrefs

Cf. A062341.

Programs

  • Mathematica
    Prime@ Flatten@ Values@ Take[KeySort@ PositionIndex[Total@ IntegerDigits@ # & /@ Prime@ Range[10^7]], 3] (* Michael De Vlieger, Apr 07 2018 *)

Extensions

Comment edited by Robert Israel, Dec 28 2015

A294396 Numbers k such that 12*10^k + 1 is prime.

Original entry on oeis.org

0, 2, 38, 80, 9230, 25598, 39500
Offset: 1

Views

Author

Patrick A. Thomas, Feb 12 2018

Keywords

Comments

k must be even since 12*10^k + 1 is divisible by 11 if k is odd. - Robert G. Wilson v, Feb 12 2018
a(7) > 27440. - Robert G. Wilson v, Feb 17 2018
a(8) > 10^5. - Jeppe Stig Nielsen, Jan 31 2023

Examples

			13 and 1201 are prime, so 0 and 2 are the initial values.
		

Crossrefs

Programs

  • Mathematica
    ParallelMap[ If[ PrimeQ[12*10^# +1], #, Nothing] &, 2 + 6Range@ 4500] (* Robert G. Wilson v, Feb 13 2018 *)
  • PARI
    isok(k) = isprime(12*10^k + 1); \\ Altug Alkan, Mar 04 2018

Extensions

a(5) from Robert G. Wilson v, Feb 12 2018
a(6) from Robert G. Wilson v, Feb 13 2018
a(7) from Jeppe Stig Nielsen, Jan 28 2023
Previous Showing 21-27 of 27 results.