OFFSET
1,2
LINKS
Jon E. Schoenfield, Table of n, a(n) for n = 1..10000 (first 1000 terms from Alois P. Heinz)
FORMULA
MAPLE
b:= proc(n) option remember; local k; for k from
1+`if`(n=1, 0, b(n-1)) while 0=mul(irem(i, 2),
i=convert(k*(k+1)/2, base, 10) ) do od; k
end:
a:= n-> (t-> t*(t+1)/2)(b(n)):
seq(a(n), n=1..50); # Alois P. Heinz, Jul 12 2015
MATHEMATICA
Select[Table[n(n+1)/2, {n, 0, 1650}], ContainsOnly[IntegerDigits[#], {1, 3, 5, 7, 9}]&] (* James C. McMahon, Sep 24 2024 *)
PROG
(PARI) select( {is_A117960(n)=is_A000217(n)&&is_A014261(n)}, [2*n+1|n<-[0..99999]]) \\ M. F. Hasler, Nov 20 2021
(PARI) apply( {A117960_row(n, t=10^n\9, L=List())=forvec(v=vector(n, i, [0, 4]), is_A000217(n=t+fromdigits(v)*2)&&listput(L, n)); L}, [1..6]) \\ row(n) = terms with n digits. Use concat(%) to flatten. - M. F. Hasler, Nov 23 2021
(Python)
from itertools import islice, count
def A117960(): return filter(lambda n: set(str(n)) <= {'1', '3', '5', '7', '9'}, (m*(m+1)//2 for m in count(0)))
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Luc Stevens (lms022(AT)yahoo.com), May 03 2006
EXTENSIONS
Some terms corrected by Alois P. Heinz, Jul 12 2015
STATUS
approved