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

A320866 Primes such that p + digitsum(p, base 4) is again a prime.

Original entry on oeis.org

5, 7, 13, 17, 19, 37, 59, 67, 97, 127, 173, 193, 223, 233, 277, 359, 379, 439, 499, 563, 569, 599, 607, 631, 653, 691, 733, 769, 811, 821, 829, 877, 919, 929, 937, 967, 1009, 1019, 1087, 1093, 1163, 1193, 1213, 1223, 1229, 1297, 1319, 1373, 1399, 1423, 1481, 1483, 1559, 1571, 1597, 1613, 1619, 1627, 1657, 1699, 1733, 1777
Offset: 1

Views

Author

M. F. Hasler, Nov 06 2018

Keywords

Comments

Such primes exist only for even bases b. See A243441, A320867, A320868 and A048519 for the analog in base 2, 6, 8 and 10, respectively. Also, as in base 10, there are no such primes (except 5 and 7) when + is changed to -, see comment in A243442.

Examples

			5 = 4 + 1 = 11[4] (in base 4), and 5 + 1 + 1 = 7 is again prime.
		

Crossrefs

Cf. A047791, A048519 (base 10 analog), A048520, A006378, A107740, A243441 (base 2 analog: p + Hammingweight(p) is prime), A243442 (analog for p - Hammingweight(p)), A320867 (analog for base 6), A320868 (analog for base 8).

Programs

  • Mathematica
    Select[Prime[Range[300]],PrimeQ[#+Total[IntegerDigits[#,4]]]&] (* Harvey P. Dale, Feb 06 2020 *)
  • PARI
    forprime(p=1,1999,isprime(p+sumdigits(p,4))&&print1(p","))

A320867 Primes such that p + digitsum(p, base 6) is again a prime.

Original entry on oeis.org

11, 19, 23, 31, 41, 53, 61, 79, 109, 137, 151, 167, 179, 229, 233, 263, 271, 331, 347, 359, 419, 439, 467, 541, 557, 587, 599, 607, 653, 719, 797, 809, 839, 863, 997, 1019, 1049, 1097, 1109, 1237, 1283, 1291, 1301, 1321, 1373, 1427, 1439, 1487, 1523, 1549, 1607, 1621, 1697, 1709, 1733, 1741, 1867
Offset: 1

Views

Author

M. F. Hasler, Nov 06 2018

Keywords

Comments

Such primes exist only for an even base b. See A048519, A243441, A320866 and A320868 for the analog in base 10, 2, 4 and 8, respectively. Also, as in base 10, there are no such primes (except 7 and 11) when + is changed to -, see comment in A243442.

Examples

			11 = 6 + 5 = 15[6] (in base 6), and 11 + 1 + 5 = 17 is again prime.
		

Crossrefs

Cf. A047791, A048519 (base 10 analog), A048520, A006378, A107740, A243441 (base 2 analog: p + Hammingweight(p) is prime), A243442 (analog for p - Hammingweight(p)), A320866 (analog for base 4), A320868 (analog for base 8).

Programs

  • Maple
    filter:= n -> isprime(n) and isprime(n+convert(convert(n,base,6),`+`)):
    select(filter, [seq(i,i=3..2000,2)]); # Robert Israel, Mar 22 2020
  • PARI
    forprime(p=1,1999,isprime(p+sumdigits(p,6))&&print1(p","))

A320869 Primes such that p + digitsum(p, base 16) is again a prime.

Original entry on oeis.org

17, 19, 23, 29, 31, 53, 59, 89, 127, 149, 151, 157, 179, 181, 211, 223, 241, 251, 263, 269, 331, 359, 367, 397, 419, 431, 449, 457, 461, 463, 487, 541, 563, 571, 593, 599, 601, 631, 659, 661, 701, 733, 761, 769, 809, 811, 839, 907, 911, 941, 971, 997, 1049, 1087, 1109, 1171, 1201, 1237, 1283, 1289, 1291
Offset: 1

Views

Author

M. F. Hasler, Nov 06 2018

Keywords

Comments

Such primes exist only for an even base b. See A048519, A243441, A320866, A320867 and A320868 for the analog in base 10, 2, 4, 6 and 8, respectively. Also, as in base 10, there are no such primes when + is changed to -, see comment in A243442.

Examples

			17 = 16 + 1 = 11[16] (in base 16), and 17 + 1 + 1 = 19 is again prime.
		

Crossrefs

Cf. A047791, A048519 (base 10 analog), A048520, A006378, A107740, A243441 (base 2 analog: p + Hammingweight(p) is prime), A243442 (analog for p - Hammingweight(p)), A320866 (analog for base 4), A320867 (analog for base 6), A320868 (analog for base 8).

Programs

  • Maple
    digsum:= (n,b) -> convert(convert(n,base,b),`+`):
    select(p -> isprime(p) and isprime(p+digsum(p,16)), [2,seq(i,i=3..1000,2)]); # Robert Israel, Nov 07 2018
  • PARI
    forprime(p=1,1999,isprime(p+sumdigits(p,16))&&print1(p","))
Showing 1-3 of 3 results.