A376279 Numbers k such that k^k is a cube.
0, 1, 3, 6, 8, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 51, 54, 57, 60, 63, 64, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 111, 114, 117, 120, 123, 125, 126, 129, 132, 135, 138, 141, 144, 147, 150, 153, 156, 159, 162, 165, 168
Offset: 1
Keywords
Programs
-
Maple
q:= n-> andmap(i-> irem(n*i[2], 3)=0, ifactors(n)[2]): select(q, [$0..200])[]; # Alois P. Heinz, Sep 19 2024
-
Mathematica
Join[{0},Select[Range[170], IntegerQ[#^(#/3)] &]] (* Stefano Spezia, Sep 18 2024 *)
-
PARI
isok(k) = ispower(k^k, 3); \\ Michel Marcus, Sep 18 2024
-
Python
from sympy import integer_nthroot def A376279(n): def f(x): return n-1+x-x//3-integer_nthroot(x,3)[0]+integer_nthroot(x//27,3)[0] m, k = n-1, f(n-1) while m != k: m, k = k, f(k) return m
-
Python
from itertools import count, islice from sympy import integer_nthroot def A376279_gen(startvalue=0): # generator of terms >= startvalue return filter(lambda k:not k%3 or integer_nthroot(k,3)[1],count(max(startvalue,0))) A376279_list = list(islice(A376279_gen(),30))
Formula
k is a term if and only if k is a multiple of 3 or k is a cube.
Comments