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

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

A167459 Composite numbers in A166504, i.e., whose decimal expansion can be split up into prime numbers, with leading zeros allowed.

Original entry on oeis.org

22, 25, 27, 32, 33, 35, 52, 55, 57, 72, 75, 77, 112, 115, 117, 132, 133, 135, 172, 175, 177, 192, 195, 202, 203, 205, 207, 213, 217, 219, 222, 225, 231, 232, 235, 237, 243, 247, 252, 253, 255, 259, 261, 267, 272, 273, 275, 279, 289, 292, 295, 297, 302, 303
Offset: 1

Views

Author

M. F. Hasler, Nov 19 2009

Keywords

Comments

In contrast to A066737 (which is a subsequence of this one), we allow for leading zeros in the "prime" substrings; the two sequences differ from n=24 on, with a(24)=202 which is not in A066737.
Sequence A166505 gives the difference, A167459 \ A066737 = A166504 \ A152242. Sequence A167458 gives the indices of the terms not in A066737.

Crossrefs

Programs

Formula

A167459 = A002808 n A166504, where "n" means intersection.
Showing 1-2 of 2 results.