login
A262251
Triangular numbers representable as 2^x + 3^y.
1
3, 10, 28, 91
OFFSET
1,1
COMMENTS
No other terms such that 0 <= x,y < 2000.
No other terms such that 0 <= x,y < 5250. - Michael S. Branicky, Mar 10 2021
EXAMPLE
a(1) = 3 = 2^1 + 3^0.
a(4) = 91 = 2^6 + 3^3.
PROG
(PARI) isok(t) = {for (k=0, logint(t, 2), my(tt = t - 2^k); if (tt, p = valuation(tt, 3); if (tt == 3^p, return(1))); ); }
lista(nn) = for (n=1, nn, if (isok(t=n*(n+1)/2), print1(t, ", "))); \\ Michel Marcus, Sep 20 2015
(PARI) select(x->ispolygonal(x, 3), setbinop(f, [0..20], [0..20])) \\ Michel Marcus, Mar 10 2021
(Python)
from sympy import integer_nthroot
def auptoexponent(maxexp):
sums = set(2**x + 3**y for x in range(maxexp) for y in range(maxexp))
iroots = set(integer_nthroot(2*s, 2)[0] for s in sums)
return sorted(set(r*(r+1)//2 for r in iroots if r*(r+1)//2 in sums))
print(auptoexponent(500)) # Michael S. Branicky, Mar 10 2021
CROSSREFS
Intersection of A000217 and A004050.
Sequence in context: A104574 A307063 A239885 * A246974 A278294 A260811
KEYWORD
nonn,more
AUTHOR
Alex Ratushnyak, Sep 16 2015
STATUS
approved