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.

This page as a plain text file.
%I A381974 #12 Aug 05 2025 00:11:45
%S A381974 2,5,13,17,19,23,31,41,53,59,61,67,71,89,97,101,103,107,127,131,139,
%T A381974 149,151,157,163,167,179,191,193,197,211,223,227,229,233,251,257,263,
%U A381974 269,277,283,313,317,331,337,349,353,373,379,383,409,419,421,431,439
%N A381974 Primes of the form Sum_{k >= 0} floor(m/3^k) for some number m.
%H A381974 Robert Israel, <a href="/A381974/b381974.txt">Table of n, a(n) for n = 1..10000</a>
%e A381974 [9/1] + [9/3] + [9/9] = 13, where [ ] = floor, so 13 is in the sequence.
%p A381974 f:= proc(n) local k; add(floor(n/3^k),k=0..ilog[3](n)) end proc:
%p A381974 select(isprime, map(f, [$2..100])); # _Robert Israel_, Apr 21 2025
%t A381974 f[n_] := Sum[Floor[n/3^k], {k, 0, Floor[Log[3, n]]}]  (* A004128 *)
%t A381974 u = Select[Range[400], PrimeQ[f[#]] &]  (* A381973 *)
%t A381974 Map[f, u]   (* A381974 *)
%Y A381974 Cf. A000040, A381973. Includes A076481.
%K A381974 nonn
%O A381974 1,1
%A A381974 _Clark Kimberling_, Apr 01 2025