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.

A167505 Number of primes of the form 2^(n-m) 3^m + 1, 0 <= m <= n.

Original entry on oeis.org

1, 2, 2, 2, 3, 2, 3, 4, 4, 3, 2, 0, 5, 1, 1, 6, 6, 2, 5, 1, 1, 2, 5, 0, 3, 1, 2, 2, 4, 2, 5, 3, 0, 1, 6, 2, 8, 2, 2, 3, 9, 1, 7, 4, 4, 0, 6, 0, 3, 3, 2, 7, 8, 1, 4, 4, 1, 2, 6, 0, 5, 2, 4, 2, 2, 1, 11, 4, 3, 1, 3, 0, 6, 0, 2, 3, 4, 1, 6, 0, 4, 3, 8, 2, 2, 2, 2, 1, 3, 1, 2, 3, 3, 1, 3, 0, 5, 1, 2, 1, 7, 0, 7, 2, 2
Offset: 1

Views

Author

M. F. Hasler, Nov 19 2009

Keywords

Crossrefs

Programs

  • PARI
    A167505(n)=sum(b=0,n,ispseudoprime(3^b<<(n-b)+1))

A167506 Number of m >= 0, m <= n such that 2^(n-m)*3^m + 1 or 2^(n-m)*3^m - 1 is prime.

Original entry on oeis.org

2, 2, 3, 4, 5, 2, 6, 7, 6, 3, 5, 1, 10, 1, 3, 8, 10, 2, 7, 4, 3, 2, 9, 1, 5, 1, 5, 5, 6, 2, 13, 6, 3, 1, 9, 5, 10, 2, 5, 7, 13, 1, 11, 6, 4, 0, 12, 1, 8, 3, 7, 9, 11, 1, 7, 7, 4, 2, 11, 1, 11, 2, 9, 6, 6, 1, 13, 8, 8, 1, 9, 2, 13, 0, 5, 4, 12, 1, 11, 2, 10, 3, 13, 2, 8, 2, 4, 6, 9, 1, 6, 7, 4, 1, 8, 1, 9, 1
Offset: 1

Views

Author

M. F. Hasler, Nov 19 2009

Keywords

Comments

M. Underwood observed that for all primes p < 3187 we have a(p) > 1, and asks whether there is a prime such that a(p) = 0. (This is equivalent to A167504(p) = A167505(p) = 0.)

Crossrefs

Programs

  • Maple
    g:= proc(n,m) local t; t:= 2^(n-m)*3^m; isprime(t+1) or isprime(t-1) end proc:
    f:= proc(n) nops(select(m -> g(n,m), [$0..n])) end proc:
    map(f, [$1..100]); # Robert Israel, Mar 11 2025
  • PARI
    A167505(n)=sum( b=0,n, ispseudoprime(3^b<<(n-b)-1) || ispseudoprime(3^b<<(n-b)+1))

Formula

max { A167504(n), A167505(n) } <= a(n) <= A167504(n)+A167505(n).

A381970 Numbers k such that there are no primes of the form 2^(k-m)*3^m + 1 or 2^(k-m)*3^m - 1 for 0 <= m <= k.

Original entry on oeis.org

46, 74, 102, 118, 130, 142, 162, 165, 166, 186, 200, 234, 242, 252, 258, 306, 318, 358, 370, 374, 414, 462, 478, 494, 506, 518, 522, 538, 540, 550, 578, 594, 618, 630, 654, 662, 666, 672, 690, 738, 750, 768, 778, 780, 790, 802, 810, 826, 834, 858, 886, 902, 912, 938, 942, 958, 982, 990, 1002
Offset: 1

Views

Author

Robert Israel, Mar 11 2025

Keywords

Comments

Numbers k such that A167506(k) = 0.
Mark Underwood observed that there are no primes < 3187 in this sequence.
The first two odd terms are 165 and 3615.
One reason why there are so many more even terms than odd terms is that if k is even, one of 2^(k-m)*3^m + 1 and 2^(k-m)*3^m - 1 is always divisible by 5, while if k is odd, neither is divisible by 5.

Crossrefs

Cf. A167506.

Programs

  • Maple
    g:= proc(n,m) local t; t:= 2^(n-m)*3^m; isprime(t+1) or isprime(t-1) end proc:
    filter:= proc(n) not ormap(m -> g(n,m), [$0..n]) end proc:
    select(filter, [$1..1000]);
Showing 1-3 of 3 results.