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-5 of 5 results.

A166561 Primes p such that sum of digits + 1 is prime.

Original entry on oeis.org

2, 11, 13, 19, 31, 37, 73, 79, 97, 101, 103, 109, 127, 163, 181, 211, 271, 277, 307, 349, 367, 433, 439, 457, 499, 523, 541, 547, 613, 619, 631, 673, 691, 709, 727, 769, 787, 811, 853, 859, 877, 907, 967, 1009
Offset: 1

Views

Author

Vincenzo Librandi, Oct 28 2009

Keywords

Examples

			2 belongs to this sequence because 2+1=3 prime; 11 because 1+1+1=3; 127 because 1+2+7+1=11; 1009 because 1+0+0+9+1=11.
		

Crossrefs

Cf. similar sequences listed in A243586.

Programs

  • Magma
    [p: p in PrimesUpTo(1500) | IsPrime(q) where q is 1+(&+Intseq(p))]; // Vincenzo Librandi, Jun 07 2014
  • Mathematica
    Select[Prime[Range[210]], PrimeQ[Plus @@IntegerDigits[#] + 1]&] (* Vincenzo Librandi, Sep 15 2013 *)

A176985 Primes p such that sum of digits + 5 is prime.

Original entry on oeis.org

2, 11, 17, 53, 59, 71, 101, 107, 149, 167, 233, 239, 251, 257, 293, 347, 383, 419, 431, 491, 503, 509, 521, 563, 617, 653, 701, 743, 761, 941, 1049, 1061, 1151, 1193, 1223, 1229, 1283, 1319, 1373, 1409, 1427, 1481, 1511, 1553, 1571, 1601, 1607, 1733
Offset: 1

Views

Author

Vincenzo Librandi, Apr 30 2010

Keywords

Crossrefs

Cf. similar sequences listed in A243586.

Programs

  • Magma
    [p: p in PrimesUpTo(1500) | IsPrime(q) where q is 5+&+Intseq(p)]; // Vincenzo Librandi, Jun 07 2014
  • Mathematica
    Select[Prime[Range[2000]], PrimeQ[Plus@@IntegerDigits[#] + 5] &] (* Vincenzo Librandi, Feb 15 2014 *)

A243587 Primes p such that sum of digits + 7 is prime.

Original entry on oeis.org

13, 19, 31, 37, 73, 79, 97, 103, 109, 127, 163, 181, 211, 271, 277, 307, 349, 367, 433, 439, 457, 499, 523, 541, 547, 613, 619, 631, 673, 691, 709, 727, 769, 787, 811, 853, 859, 877, 907, 967, 1009, 1021, 1063, 1069, 1087, 1117, 1153, 1171, 1201, 1249, 1399
Offset: 1

Views

Author

Vincenzo Librandi, Jun 07 2014

Keywords

Crossrefs

Cf. similar sequences listed in A243586.

Programs

  • Magma
    [p: p in PrimesUpTo(1500) | IsPrime(q) where q is 7+(&+Intseq(p))];
  • Mathematica
    Select[ Prime[Range[600]], PrimeQ[Plus@@IntegerDigits[#] + 7] &]

A243588 Primes p such that sum of digits + 9 is prime.

Original entry on oeis.org

2, 11, 13, 17, 19, 31, 37, 53, 59, 71, 73, 101, 103, 107, 109, 127, 149, 163, 167, 181, 211, 233, 239, 251, 257, 271, 293, 307, 347, 383, 389, 419, 431, 433, 479, 491, 499, 503, 509, 521, 523, 541, 563, 569, 587, 613, 617, 631, 653, 659, 677, 701, 743
Offset: 1

Views

Author

Vincenzo Librandi, Jun 07 2014

Keywords

Crossrefs

Cf. similar sequences listed in A243586.

Programs

  • Magma
    [p: p in PrimesUpTo(1500) | IsPrime(q) where q is 9+&+Intseq(p)];
  • Maple
    filter:= n -> isprime(convert(convert(n,base,10),`+`)+9):
    select(isprime and filter,[$1..1000]); # Robert Israel, Jun 08 2014
  • Mathematica
    Select[Prime[Range[200]], PrimeQ[Plus@@IntegerDigits[#] + 9] &]

A253848 Primes p such that the digit sums of p, p + 4 and p^2 + 4 are all prime.

Original entry on oeis.org

43, 61, 151, 197, 199, 397, 601, 661, 733, 823, 883, 1051, 1093, 1123, 1297, 1381, 1453, 1471, 1543, 1831, 1873, 2281, 2371, 2551, 2683, 2713, 2953, 2971, 3181, 3343, 3361, 3583, 3613, 3631, 4003, 4153, 4261, 4513, 4603, 4621, 4801, 4951, 5011, 5101, 5323, 5413
Offset: 1

Views

Author

K. D. Bajpai, Jan 16 2015

Keywords

Examples

			a(1) = 43: 43+4 = 47; 43^2+4 = 1853. Their digit sums 4+3 = 7, 4+7 = 11 and 1+8+5+3 = 17 are all prime.
a(2) = 61: 61+4 = 65; 61^2+4 = 3725. Their digit sums 6+1 = 7, 6+5 = 11 and 3+7+2+5 = 17 are all prime.
		

Crossrefs

Programs

  • Maple
    digsum:= n -> convert(convert(n,base,10),`+`):
    select(p -> isprime(p) and isprime(digsum(p)) and isprime(digsum(p+4)) and isprime(digsum(p^2+4)), [2,seq(2*k+1, k=1..10^4)]); # Robert Israel, Jan 16 2015
  • Mathematica
    k = 4; Select[Prime[Range[1, 2000]], PrimeQ[Plus @@ IntegerDigits[#]] && PrimeQ[Plus @@ IntegerDigits[k+#]] && PrimeQ[Plus @@ IntegerDigits[k+#^2]] &]
    Select[Prime[Range[800]],AllTrue[Total/@IntegerDigits[{#,#+4,#^2+4}], PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Aug 14 2015 *)
  • PARI
    for( n=1, 10^2, p=prime(n);  k=4; if(isprime(eval(Str(sumdigits(p)))) & isprime(eval(Str(sumdigits(p+k)))) &isprime(eval(Str(sumdigits(p^2+k)))), print1(p,"  ",) ) )
    
  • PARI
    forprime(p=1,10000,if(isprime(sumdigits(p)) && isprime(sumdigits(p+4)) && isprime(sumdigits(p^2+4)),print1(p", "))) \\ Dana Jacobsen, Sep 07 2015
    
  • Perl
    use ntheory ":all"; forprimes { say if is_prime(sumdigits($)) && is_prime(sumdigits($+4)) && is_prime(sumdigits($*$+4)) } 1000; # Dana Jacobsen, Sep 07 2015
Showing 1-5 of 5 results.