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.

A381974 Primes of the form Sum_{k >= 0} floor(m/3^k) for some number m.

Original entry on oeis.org

2, 5, 13, 17, 19, 23, 31, 41, 53, 59, 61, 67, 71, 89, 97, 101, 103, 107, 127, 131, 139, 149, 151, 157, 163, 167, 179, 191, 193, 197, 211, 223, 227, 229, 233, 251, 257, 263, 269, 277, 283, 313, 317, 331, 337, 349, 353, 373, 379, 383, 409, 419, 421, 431, 439
Offset: 1

Views

Author

Clark Kimberling, Apr 01 2025

Keywords

Examples

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

Crossrefs

Cf. A000040, A381973. Includes A076481.

Programs

  • Maple
    f:= proc(n) local k; add(floor(n/3^k),k=0..ilog[3](n)) end proc:
    select(isprime, map(f, [$2..100])); # 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 *)