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

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","))

A320868 Primes such that p + digitsum(p, base 8) is again a prime.

Original entry on oeis.org

13, 29, 31, 41, 47, 61, 67, 71, 83, 97, 157, 193, 229, 241, 271, 283, 373, 397, 409, 431, 449, 467, 503, 587, 601, 607, 761, 787, 929, 971, 991, 1039, 1087, 1091, 1163, 1181, 1213, 1217, 1237, 1249, 1289, 1291, 1307, 1423, 1453, 1471, 1511, 1543, 1553, 1559, 1627, 1657, 1741, 1811, 1847, 1867, 1973, 1999
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 A320867 for the analog in base 10, 2, 4 and 6, respectively. Also, as in base 10, there are no such primes (except 11 and 13) when + is changed to -, see comment in A243442.

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).

Programs

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

A321392 a(n) is the number of bases b > 1 such that prime(n) + digitsum(prime(n), base b) is prime (where prime(n) denotes the n-th prime number).

Original entry on oeis.org

1, 1, 2, 1, 2, 3, 4, 4, 3, 5, 6, 7, 7, 7, 7, 10, 11, 10, 12, 11, 11, 12, 11, 13, 16, 14, 13, 10, 14, 13, 21, 19, 19, 17, 20, 21, 24, 26, 25, 25, 25, 23, 26, 26, 24, 26, 29, 33, 27, 30, 31, 28, 32, 33, 32, 34, 34, 34, 32, 31, 34, 37, 37, 41, 36, 38, 41, 44, 45
Offset: 1

Views

Author

Rémy Sigrist, Nov 08 2018

Keywords

Comments

For any prime number p and base b > p, p + digitsum(p, base b) equals twice p and is not prime, hence the sequence is well defined.
For prime(n) + digitsum(prime(n), base b) to be prime, b must be even (see A320866).

Examples

			For n = 6, we have prime(6) = 13 and:
  b     13 + sumdigits(13, base b)
  ----  --------------------------
     2  16
     4  17 (prime)
     6  16
     8  19 (prime)
    10  17 (prime)
    12  15
  >=14  26
Hence, a(6) = 3.
		

Crossrefs

Programs

  • PARI
    a(n) = my (p=prime(n)); sum(b=1, p\2, isprime(p+sumdigits(p, 2*b)))

Formula

a(n) = A321393(A000040(n)).

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