login
A376279
Numbers k such that k^k is a cube.
3
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,3
COMMENTS
Strict subsequence of A267415. For instance, 76, 112, 172, 364, 427, 532 are not terms of this sequence, but are terms of A267415.
LINKS
Chai Wah Wu, Algorithms for Complementary Sequences, Integers (2025) Vol. 25, Art. No. A95. See p. 21. (Because of a misprint, the article refers to A376379 instead of A376279.)
FORMULA
k is a term if and only if k is a multiple of 3 or k is a cube.
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 *)
PROG
(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))
(PARI) isok(k) = ispower(k^k, 3); \\ Michel Marcus, Sep 18 2024
(PARI) is(n)=n%3==0 || ispower(n, 3) \\ Charles R Greathouse IV, Nov 04 2025
CROSSREFS
Union of A000578 and A008585.
Sequence in context: A189637 A182338 A267415 * A140516 A310140 A231006
KEYWORD
nonn,easy
AUTHOR
Chai Wah Wu, Sep 18 2024
STATUS
approved