login
A389956
Odd numbers that are one less than the square of a perfect power.
3
15, 63, 255, 1023, 1295, 4095, 9999, 16383, 20735, 38415, 46655, 65535, 104975, 159999, 234255, 262143, 331775, 456975, 614655, 809999, 999999, 1048575, 1336335, 1679615, 2085135, 2559999, 2985983, 3111695, 3748095, 4194303, 4477455, 5308415, 6249999, 7311615, 7529535, 8503055, 9834495
OFFSET
1,1
LINKS
FORMULA
a(n) = A389765(n) * A389957(n).
Sum_{n>=1} 1/a(n) = 1/2 - Pi^2/24 = 1/2 - A222171 = A354238 / 2.
MATHEMATICA
seq[lim_] := Union[Table[m^(2*k) - 1, {k, 2, Log2[lim + 1]/2}, {m, 2, Surd[lim + 1, 2*k], 2}] // Flatten]; seq[10^7]
PROG
(PARI) list(lim) = {my(s = List()); for(k = 2, logint(lim+1, 2)\2, forstep(m = 2, sqrtnint(lim+1, 2*k), 2, listput(s, m^(2*k) - 1))); Set(s); }
(Python)
from math import isqrt
from sympy import mobius, integer_nthroot
from oeis_sequences.OEISsequences import bisection
def A389956(n): return bisection(lambda x:int(n+x+sum(mobius(k)*(integer_nthroot(isqrt(x+1), k)[0]>>1) for k in range(2, isqrt(x+1).bit_length()))), n, n) # Chai Wah Wu, Oct 21 2025
CROSSREFS
Intersection of A005408 and A062965.
Complement of A389955 within A062965.
Sequence in context: A305616 A104473 A135972 * A138104 A152099 A119496
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Oct 20 2025
STATUS
approved