|
|
A349243
|
|
Indices of triangular numbers A000217 with only odd digits.
|
|
6
|
|
|
1, 2, 5, 10, 13, 17, 18, 26, 34, 58, 62, 101, 109, 138, 149, 154, 177, 178, 186, 189, 250, 257, 266, 382, 554, 586, 589, 621, 622, 862, 893, 1013, 1050, 1057, 1069, 1258, 1354, 1370, 1634, 1658, 1738, 1754, 1777, 1786, 1853, 1885, 1965, 2657, 2666, 2741, 2818, 3218, 3346, 3445, 3457, 3794, 3845
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
|
|
MAPLE
|
a:= 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:
|
|
MATHEMATICA
|
Select[Range[4000], AllTrue[IntegerDigits[#*(# + 1)/2], OddQ] &] (* Amiram Eldar, Nov 20 2021 *)
Position[Accumulate[Range[4000]], _?(AllTrue[IntegerDigits[#], OddQ]&)]//Flatten (* Harvey P. Dale, Sep 06 2023 *)
|
|
PROG
|
(PARI) select( {is_A349243(n)=Set(digits(n*(n+1)\2)%2)==[1]}, [1..9999])
(Python)
from itertools import islice, count
def A349243(): return filter(lambda n: set(str(n*(n+1)//2)) <= {'1', '3', '5', '7', '9'}, count(0))
|
|
CROSSREFS
|
Cf. A000217 (triangular numbers), A014261 (numbers with only odd digits), A117960 (triangular numbers with only odd digits).
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|