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.

A381973 Numbers m such that Sum_{k >= 0} floor(m/3^k) is prime.

Original entry on oeis.org

2, 4, 9, 12, 14, 17, 22, 28, 36, 41, 42, 46, 49, 61, 66, 69, 71, 73, 86, 89, 94, 101, 102, 107, 110, 113, 121, 129, 131, 134, 143, 151, 153, 155, 158, 169, 173, 177, 181, 187, 190, 211, 214, 223, 227, 235, 238, 250, 254, 257, 274, 281, 282, 289, 295, 301
Offset: 1

Views

Author

Clark Kimberling, Apr 01 2025

Keywords

Comments

Includes 3^(k-1) for k in A028491. - Robert Israel, Apr 21 2025

Examples

			[9/1] + [9/3] + [9/9] = 13, where [ ] = floor, so 9 is in the sequence.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) add(floor(n/3^k),k=0..ilog[3](n)) end proc:
    select(m -> isprime(f(n)), [$2..1000]); # Robert Israel, Apr 21 2025
  • Mathematica
    f[n_] := Sum[Floor[n/3^k], {k, 0, Floor[Log[3, n]]}]  (* A004128 *)
    u = Select[Range[400], PrimeQ[f[#]] &]  (* A381973 *)
    Map[f, u]   (* A381974 *)